Commit Graph

3612 Commits

Author SHA1 Message Date
Ting-Yu Lin
102fdd9e44 Bug 1797011 Part 4 - Rename AbsoluteFrameList::containingBlock to mContainingBlock to match coding style. r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D160104
2022-10-24 19:14:33 +00:00
Ting-Yu Lin
5806248676 Bug 1797011 Part 3 - Delete nsFrameList's copy assigment operator. r=emilio
This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D160015
2022-10-24 19:14:33 +00:00
Ting-Yu Lin
810423461b Bug 1797011 Part 2 - Make AbsoluteFrameList a move-only class; improve nsFrameConstructorSaveState and PushAbsoluteContainingBlock(). r=emilio
This patch doesn't change behavior.

AbsoluteFrameList is a derived class of nsFrameList, so we change it a move-only
class in order to nsFrameList move-only in Part 3.

Some detail of this patch:

- Define move constructor and move assignment operator for AbsoluteFrameList.
  This effectively disables the auto generated copy constructor and copy
  assignement operator.

- Initialize nsFrameConstructorSaveState's member variables in class definition,
  and remove its constructor.

- Remove `mSavedFixedList` since we can rewire the logic in
  `~nsFrameConstructorSaveState` and `PushAbsoluteContainingBlock()` to make it
  redundant.

- Make self-assignment correct in nsFrameList's move assignment operator.

Differential Revision: https://phabricator.services.mozilla.com/D160014
2022-10-24 19:14:32 +00:00
Ting-Yu Lin
9ff6e4d1d3 Bug 1794035 Part 4 - Use range-based for loops to iterate nsFrameList. r=emilio
After this patch, we still need nsFrameList::Enumerator to iterate
nsFrameList::Slice. We might enhance nsFrameList::Iterator to support Slice, but
I'll leave this for another day.

Differential Revision: https://phabricator.services.mozilla.com/D158809
2022-10-07 01:41:41 +00:00
Ting-Yu Lin
03f14da806 Bug 1794035 Part 1 - Rename nsFrameList::ExtractHead to TakeFramesBefore. r=emilio
I feel it's hard to understand the purpose of ExtractHead(), especially where
aFrame is going after the call. Therefore, I rename it to TakeFramesBefore(),
and have it complement the existing RemoveFramesAfter(), which will be rename
later. No behavioral change intended.

Also, slightly reword the method's documentation to reflect the its new
name. (Remove the "sibling" wording from the comment since it's an
implementation details that frames are actually a doubly linked list.)

Differential Revision: https://phabricator.services.mozilla.com/D158806
2022-10-07 01:41:40 +00:00
Ting-Yu Lin
cb77f25153 Bug 1793826 Part 2 - Remove nsFrameList::FrameLinkEnumerator. r=emilio
Change the last caller of FrameLinkEnumerator to use Iterator instead, and we
are ready to remove it.

Differential Revision: https://phabricator.services.mozilla.com/D158701
2022-10-06 06:47:25 +00:00
Ting-Yu Lin
6656a45e40 Bug 1793826 Part 1 - Change nsFrameList::ExtractHead and ExtractTail to take nsIFrame* argument. r=emilio
This is a preparation to remove nsFrameList::FrameLinkEnumerator in the next
part.

Differential Revision: https://phabricator.services.mozilla.com/D158700
2022-10-06 06:47:25 +00:00
Csoregi Natalia
52af6a2134 Backed out 2 changesets (bug 1793826) for causing build bustages. CLOSED TREE
Backed out changeset 9e398426c46f (bug 1793826)
Backed out changeset 01820845ab62 (bug 1793826)
2022-10-06 03:41:00 +03:00
Ting-Yu Lin
1a94611c63 Bug 1793826 Part 2 - Remove nsFrameList::FrameLinkEnumerator. r=emilio
Change the last caller of FrameLinkEnumerator to use Iterator instead, and we
are ready to remove it.

Differential Revision: https://phabricator.services.mozilla.com/D158701
2022-10-06 00:19:42 +00:00
Ting-Yu Lin
c1ba6068b9 Bug 1793826 Part 1 - Change nsFrameList::ExtractHead and ExtractTail to take nsIFrame* argument. r=emilio
This is a preparation to remove nsFrameList::FrameLinkEnumerator in the next
part.

FrameLinkEnumerator::Find() can be replaced with std::find/std::find_if.

Differential Revision: https://phabricator.services.mozilla.com/D158700
2022-10-06 00:19:41 +00:00
Emily McDonough
68042c67af Bug 1782597 Part 2 - Use null to indicate page value equal to the auto value for CSS named pages r=dholbert
This applies both to the individual mStartPageValue and mEndPageValue fields
of the nsIFrame::PageValues struct, and for the nsIFrame::PageValuesProperty
being null to indicate both mStartPageValue and mEndPageValue are auto.

Fetching this is handled by nsIFrame::GetStartPageValue and
nsIFrame::GetEndPageValue, which also ensure the use of first-in-flow frames.

Differential Revision: https://phabricator.services.mozilla.com/D157873
2022-10-05 22:07:47 +00:00
Emily McDonough
eb0252b850 Bug 1782597 Part 1 - Store auto page value on each frame when in a paginated context. r=dholbert,emilio
Differential Revision: https://phabricator.services.mozilla.com/D157872
2022-10-05 22:07:46 +00:00
Emilio Cobos Álvarez
3e1871e216 Bug 1792741 - Remove nsDocElementBoxFrame. r=TYLin
After bug 1665476, it's pretty much a regular XUL box with a couple
special-cases that we can use IsRootElementStyle for. Do that, and allow
using nsFlexContainerFrame when using flexbox emulation.

Differential Revision: https://phabricator.services.mozilla.com/D158288
2022-10-01 02:35:31 +00:00
Csoregi Natalia
fce6bd8d7a Backed out changeset 63fbc22d2223 (bug 1792741) for causing assertion failures on nsCSSFrameConstructor.cpp. CLOSED TREE 2022-10-01 04:22:22 +03:00
Emilio Cobos Álvarez
c581af533f Bug 1792741 - Remove nsDocElementBoxFrame. r=TYLin
After bug 1665476, it's pretty much a regular XUL box with a couple
special-cases that we can use IsRootElementStyle for. Do that, and allow
using nsFlexContainerFrame when using flexbox emulation.

Differential Revision: https://phabricator.services.mozilla.com/D158288
2022-10-01 00:28:13 +00:00
Butkovits Atila
6bc5a308b4 Backed out changeset 511ee0f8727c (bug 1792741) for causing failures at browser_aboutDialog_distribution. 2022-09-30 03:56:41 +03:00
Emilio Cobos Álvarez
2f2a2aaece Bug 1792741 - Remove nsDocElementBoxFrame. r=TYLin
After bug 1665476, it's pretty much a regular XUL box with a couple
special-cases that we can use IsRootElementStyle for. Do that, and allow
using nsFlexContainerFrame when using flexbox emulation.

Differential Revision: https://phabricator.services.mozilla.com/D158288
2022-09-29 23:34:41 +00:00
Emilio Cobos Álvarez
cf5db1fc05 Bug 1665476 - Remove nsRootBoxFrame to unify background propagation between XUL and non-XUL documents. r=layout-reviewers,mats
It's unused on mozilla-central, and Thunderbird can just use the canvas
frame as regular (X)HTML documents, so just use a canvas frame instead
of an nsRootBoxFrame for XUL as well.

nsRootBoxFrame was needed because of various XUL-specific things like
tooltips and so on lived there. But with the move away from XUL, that
functionality has been added to nsCanvasFrame already, behind a
principal check instead.

This also allows simplifying our background propagation setup, which was
only half-working for XUL documents (this bug is a consequence of that).

With this, most of the callers of nsCSSRendering::IsCanvasFrame can go.
They're only two of the frames that would return true for that that
actually paint backgrounds (nsCanvasFrame and nsRootBoxFrame), so the
codepaths in display list building and painting can just check
frame->IsCanvasFrame() instead.

The remaining caller to that function is
nsContainerFrame::SyncWindowProperties, and the change is also legit, in
the sense that the only thing SyncWindowProperties() really cares about
is propagating the max/min-width constraints from the root element's
style to the view/widget, and the only frame that would return true from
IsCanvasFrame and have a view is the viewport frame which is the root of
the frame tree.

Differential Revision: https://phabricator.services.mozilla.com/D90846
2022-09-28 02:56:41 +00:00
Butkovits Atila
16e79cfbe3 Backed out changeset 503c84054f68 (bug 1665476) for causing mochitest mass failures. CLOSED TREE 2022-09-27 13:04:54 +03:00
Emilio Cobos Álvarez
9a226c835b Bug 1665476 - Remove nsRootBoxFrame to unify background propagation between XUL and non-XUL documents. r=layout-reviewers,mats
It's unused on mozilla-central, and Thunderbird can just use the canvas
frame as regular (X)HTML documents, so just use a canvas frame instead
of an nsRootBoxFrame for XUL as well.

nsRootBoxFrame was needed because of various XUL-specific things like
tooltips and so on lived there. But with the move away from XUL, that
functionality has been added to nsCanvasFrame already, behind a
principal check instead.

This also allows simplifying our background propagation setup, which was
only half-working for XUL documents (this bug is a consequence of that).

With this, most of the callers of nsCSSRendering::IsCanvasFrame can go.
They're only two of the frames that would return true for that that
actually paint backgrounds (nsCanvasFrame and nsRootBoxFrame), so the
codepaths in display list building and painting can just check
frame->IsCanvasFrame() instead.

The remaining caller to that function is
nsContainerFrame::SyncWindowProperties, and the change is also legit, in
the sense that the only thing SyncWindowProperties() really cares about
is propagating the max/min-width constraints from the root element's
style to the view/widget, and the only frame that would return true from
IsCanvasFrame and have a view is the viewport frame which is the root of
the frame tree.

Differential Revision: https://phabricator.services.mozilla.com/D90846
2022-09-27 08:18:58 +00:00
Emilio Cobos Álvarez
4ab80589c9 Bug 1689816 - Implement <tabpanels> and <deck> without XUL layout. r=Gijs,Jamie,morgan,preferences-reviewers,mconley,TYLin
Gijs for front-end bits, layout for the new CSS properties and the
removal of nsDeckFrame / nsStackLayout, Jamie and Morgan for the a11y
changes.

As discussed in the bug, the main tricky part here is handling a11y
correctly. For <deck>, that's trivial (just use `visibility: hidden` to
hide the panels visually, while removing the unselected panels from the
a11y tree).

For <tabpanels> however we need to do something special. We do want to
hide stuff visually, but we want to preserve the contents in the a11y
tree.

For that, the easiest fix is introducing a new privileged CSS property
(-moz-subtree-hidden-only-visually), which takes care of not painting
the frame, but marks stuff offscreen in the accessibility tree. This is
not intended to be a property used widely.

Other than that, the changes are relatively straight-forward, though
some of the accessible/mac changes I could get a sanity-check on.

Differential Revision: https://phabricator.services.mozilla.com/D157875
2022-09-27 04:18:16 +00:00
Marian-Vasile Laza
338fc0a451 Backed out changeset 2f74f8f2ed19 (bug 1689816) for causing reftest failures on skip-ink-multiline-position.html. 2022-09-26 23:24:03 +03:00
Emilio Cobos Álvarez
ba878e30c1 Bug 1689816 - Implement <tabpanels> and <deck> without XUL layout. r=Gijs,Jamie,morgan,preferences-reviewers,mconley,TYLin
Gijs for front-end bits, layout for the new CSS properties and the
removal of nsDeckFrame / nsStackLayout, Jamie and Morgan for the a11y
changes.

As discussed in the bug, the main tricky part here is handling a11y
correctly. For <deck>, that's trivial (just use `visibility: hidden` to
hide the panels visually, while removing the unselected panels from the
a11y tree).

For <tabpanels> however we need to do something special. We do want to
hide stuff visually, but we want to preserve the contents in the a11y
tree.

For that, the easiest fix is introducing a new privileged CSS property
(-moz-subtree-hidden-only-visually), which takes care of not painting
the frame, but marks stuff offscreen in the accessibility tree. This is
not intended to be a property used widely.

Other than that, the changes are relatively straight-forward, though
some of the accessible/mac changes I could get a sanity-check on.

Differential Revision: https://phabricator.services.mozilla.com/D157875
2022-09-26 17:40:30 +00:00
Emily McDonough
5464ceedde Bug 1764437 - Check for prev/next sibling when propagating start/end page values for frames r=dholbert
This also properly handles placeholder frames, and ensures that when checking
next/prev sibling we ignore placeholder frames.

To properly test this for multiple levels of page value propagation, we also
need to use FirstInFlow to get page values when checking for breaks in block
frames.

Differential Revision: https://phabricator.services.mozilla.com/D157175
2022-09-20 21:42:34 +00:00
Emilio Cobos Álvarez
1d46b07024 Bug 1790920 - Remove nsButtonBoxFrame. r=smaug
Create XULButtonElement instead to do the event handling. Pretty much a
straight port, this allows these elements to respect CSS display
properly (and use modern flexbox rather than old XUL layout).

Differential Revision: https://phabricator.services.mozilla.com/D157509
2022-09-19 17:02:37 +00:00
Emilio Cobos Álvarez
bbb56ef32a Bug 1308080 - Make <details> use a shadow tree as per spec. r=TYLin,smaug
The behavior changes match WebKit and Blink. I can look into upstreaming
some of these to WPT.

Differential Revision: https://phabricator.services.mozilla.com/D34754
2022-09-16 14:54:12 +00:00
Sandor Molnar
99feb142d1 Backed out changeset 27c0485f1740 (bug 1308080) for causing assertion failure in dom/ShadowRoot.h & wr failures in /css/css-multicol/multicol-span-all-dynamic CLOSED TREE 2022-09-14 05:47:49 +03:00
Emilio Cobos Álvarez
9673ac8ad9 Bug 1308080 - Make <details> use a shadow tree as per spec. r=TYLin,smaug
The behavior changes match WebKit and Blink. I can look into upstreaming
some of these to WPT.

Differential Revision: https://phabricator.services.mozilla.com/D34754
2022-09-13 21:52:50 +00:00
Emily McDonough
092af88db6 Bug 1786399 - Check for block layout when applying and propagating page-name properties r=dholbert
The page-name property only applies to boxes which can create class A
breakpoints. One of the qualifiers for this is a block-level item, which is
the child of a block frame. Additionally, page-name propagation only occurs
through frames for which the page-name property applies, because where it does
not apply the auto page-name is propagated instead.

This means we only need to worry about block frames, and only use specified
page-name for BlockOutside frames.

Differential Revision: https://phabricator.services.mozilla.com/D155285
2022-09-13 21:29:38 +00:00
Emily McDonough
e248fcfa7a Bug 1779645 Part 1 - Switch CSS named page fragmentation to happen at reflow instead of frame construction r=dholbert
This also adds a small post-processing step for frame-construction to ensure
that replaced frames (or more generally frames with content but no children)
have the auto page-name set on them.

When page-name value tracking is switched to be lazy, this post-processing step
will likely be redundant and can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D152701
2022-09-13 21:29:37 +00:00
criss
51143b2b24 Backed out 3 changesets (bug 1786399, bug 1779645) for causing reftest failures on page-name-zero-height-001.html. CLOSED TREE
Backed out changeset 81c8d6a2d6f9 (bug 1786399)
Backed out changeset 3ee5fb016aa0 (bug 1779645)
Backed out changeset b626e11a262d (bug 1779645)
2022-09-13 04:19:42 +03:00
Emily McDonough
f356859737 Bug 1786399 - Check for block layout when applying and propagating page-name properties r=dholbert
The page-name property only applies to boxes which can create class A
breakpoints. One of the qualifiers for this is a block-level item, which is
the child of a block frame. Additionally, page-name propagation only occurs
through frames for which the page-name property applies, because where it does
not apply the auto page-name is propagated instead.

This means we only need to worry about block frames, and only use specified
page-name for BlockOutside frames.

Differential Revision: https://phabricator.services.mozilla.com/D155285
2022-09-12 22:44:49 +00:00
Emily McDonough
e114010ff0 Bug 1779645 Part 1 - Switch CSS named page fragmentation to happen at reflow instead of frame construction r=dholbert
This also adds a small post-processing step for frame-construction to ensure
that replaced frames (or more generally frames with content but no children)
have the auto page-name set on them.

When page-name value tracking is switched to be lazy, this post-processing step
will likely be redundant and can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D152701
2022-09-12 22:44:48 +00:00
Emilio Cobos Álvarez
f6ef818f6b Bug 1789123 - Make anonymous box wrapping inside XUL boxes be similar to modern flex boxes. r=dholbert
I haven't spotted any UI regression from this, and this should generally
make the XUL -> modern flex transition easier, and simplify some
of the relevant code.

This does fix a few layout issues with emulated flexbox.

For the most part, this shouldn't change behavior without that. This
changes behavior if you have mixed inline/non-inline content in the same
XUL box (before they'd get a single item, now you'd get the flexbox /
grid behavior of one item per inline run), and multiple inline-elements
(which would become their own flex items). But I pushed a patch with
some asserts and they didn't fire on our browser mochitests, so I think
we're good.

The UA rule refactoring (removing the inherit from xul anon blocks)
shouldn't matter in practice, since we only have one item (so
box-ordinal is irrelevant) and they have overflow: visible (so
text-overflow and overflow-clip-box shouldn't have an effect).

Differential Revision: https://phabricator.services.mozilla.com/D156375
2022-09-08 11:51:15 +00:00
Emilio Cobos Álvarez
a714922f5c Bug 1789123 - Unify anonymous flex/grid items. r=dholbert
This has no behavior change, just unifies the pseudo-element used for
these.

Differential Revision: https://phabricator.services.mozilla.com/D156736
2022-09-08 11:45:31 +00:00
Frederic Wang
0d6dd90e26 Bug 1588733 - Make maction/semantics elements behave as an mrow with the first child. r=emilio
See https://groups.google.com/forum/#!topic/mozilla.dev.platform/BWUvjERSXUM

Differential Revision: https://phabricator.services.mozilla.com/D49285
2022-09-06 04:32:15 +00:00
Emilio Cobos Álvarez
eb1cf2aaf7 Bug 1788785 - Skip placeholders for first-letter-finding code. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D156294
2022-09-02 15:07:15 +00:00
Emilio Cobos Álvarez
d8341bcf96 Bug 1787072 - Avoid useless reframes setting the src attribute of a broken image that already has an image frame. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D155533
2022-09-02 09:39:38 +00:00
Andreas Farre
3cab76dcc7 Bug 1595491 - Part 1: Make <embed> and <object> behave more like <iframe>. r=smaug,emilio
By making image loading in <embed> and <object> behave more like when
an <iframe> loads an image, we can make sure that the synthetic
document generated is process switched if the image is cross
origin. This is done by making image loading in nsObjectLoadingContent
follow the document loading path.

We also make sure that we pass the image size back to the embedder
element to not get stuck with the intrinsic size.

To avoid named targeting being able to target these synthetic
documents, as well as showing up in `Window.frames` and being counted
in `Window.length`, we keep a filtered list of non-synthetic browsing
contexts for that use-case.

This feature is controlled by two prefs:

* browser.opaqueResponseBlocking.syntheticBrowsingContext

  This triggers the creation of synthetic documents for images loaded
  in <object> or embed.

* browser.opaqueResponseBlocking.syntheticBrowsingContext.filter

  This turns on the filtering of synthetic browsing contexts in named
  targeting, `Window.length` and `Window.frames`.

Differential Revision: https://phabricator.services.mozilla.com/D148117
2022-08-16 16:42:58 +00:00
Emilio Cobos Álvarez
1bb1235122 Bug 1783934 - Add a chrome-only -moz-box-layout: legacy | flex, and use that to implement flexbox emulation. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D154153
2022-08-10 19:46:37 +00:00
Marian-Vasile Laza
d2a92d9049 Backed out changeset 449fe2d946ea (bug 1783934) for causing mochitest failures on test_animation-type-longhand.html. CLOSED TREE 2022-08-10 19:48:38 +03:00
Emilio Cobos Álvarez
f3e1d55f44 Bug 1783934 - Add a chrome-only -moz-box-layout: legacy | flex, and use that to implement flexbox emulation. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D154153
2022-08-10 15:47:41 +00:00
Emily McDonough
29aff7dfd1 Bug 1783783 - Add null-check for aParentFrame when computing used page values in nsCSSFrameConstructor r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D154135
2022-08-09 22:23:17 +00:00
Emily McDonough
4e666dcfeb Bug 1766685 - Do not perform page-breaks in the destructor of the page name tracker RAII struct r=dholbert
Instead, do this just before we addd the frame construction items, where CSS
break-after/break-before is handled.

This also fixes the expectations of three tests where our expectations have
changed. The test page-name-img-001 now succeeds with correct results because
of this change, though the other img and the canvas tests fail due issues with
fragmentation named pages and replaced frames.

The issues with replaced frames are currently caused because our page-break
logic occurs in nsCSSFrameConstructor::AddFrameConstructionItemsInternal, but
this is performed for the parent frame. As the replaced frames have no
children, we never process their children in
nsCSSFrameConstructor::AddFrameConstructionItemsInternal.

The issue with replaced frames will be fixed by
https://bugzilla.mozilla.org/1779645

Differential Revision: https://phabricator.services.mozilla.com/D151331
2022-08-01 20:17:34 +00:00
Emily McDonough
b9d58c6a78 Bug 1781957 - Remove argument to nsCSSFrameConstructor::AddFCItemsForAnonymousContent which is not useful r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D152952
2022-07-28 20:21:49 +00:00
Emily McDonough
c34eab4d95 Bug 1780671 - Make EnsureAutoPageName walk back up the frame tree only when necessary r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D152471
2022-07-22 05:01:40 +00:00
Emilio Cobos Álvarez
e7f6bbb863 Bug 1778965 - Clean-up a bit alt text code. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D151482
2022-07-11 17:29:31 +00:00
Martin Robinson
797bb26bc0 Bug 1463600 - Implement CSS 'contain: style' r=emilio
Add an implementation of CSS `contain: style`. This introduces two new
data structures, the ContainStyleScope and ContainStyleScopeManager.

ContainStyleScope manages one `contain: style` "world" which has its own
counter and quote lists. The contents of these lists depend on their
parent scopes, but are not affected by their children.
ContainStyleScopeManager manages a tree of scopes starting at a root
scope which is outside of any `contain: style` element.

Scopes are stored in a hash table that is keyed off of the nsIContent
which establishes the `contain: style` scope. When modifying quote or
content lists, the ContainStyleScopeManager is responsible for finding
the appropriate `contain: style` scope to modify.

Perhaps the most complex part of this is that counters and quotes have
read access to the state of counters and quotes that are in ancestor
`contain: style` scopes. In the case of counters, USE nodes that are at
the beginning of counter lists might have a counter scope that starts in
an ancestor `contain: style` scope. When nsCounterNode::SetScope() is
called, the code may look upward in the `contain: style` scope tree to
find the start of the counter scope. In the case of quotes, the first
node in the quote list must look for the state of quotes in ancestor
`contain: style` scopes.

Differential Revision: https://phabricator.services.mozilla.com/D149508
2022-06-22 16:16:59 +00:00
Bogdan Szekely
df95a0440d Backed out changeset 86e9449aba35 (bug 1463600) for causing xpcshell failures on test_css-properties-db.js 2022-06-22 15:35:33 +03:00
Martin Robinson
508be872da Bug 1463600 - Implement CSS 'contain: style' r=emilio
Add an implementation of CSS `contain: style`. This introduces two new
data structures, the ContainStyleScope and ContainStyleScopeManager.

ContainStyleScope manages one `contain: style` "world" which has its own
counter and quote lists. The contents of these lists depend on their
parent scopes, but are not affected by their children.
ContainStyleScopeManager manages a tree of scopes starting at a root
scope which is outside of any `contain: style` element.

Scopes are stored in a hash table that is keyed off of the nsIContent
which establishes the `contain: style` scope. When modifying quote or
content lists, the ContainStyleScopeManager is responsible for finding
the appropriate `contain: style` scope to modify.

Perhaps the most complex part of this is that counters and quotes have
read access to the state of counters and quotes that are in ancestor
`contain: style` scopes. In the case of counters, USE nodes that are at
the beginning of counter lists might have a counter scope that starts in
an ancestor `contain: style` scope. When nsCounterNode::SetScope() is
called, the code may look upward in the `contain: style` scope tree to
find the start of the counter scope. In the case of quotes, the first
node in the quote list must look for the state of quotes in ancestor
`contain: style` scopes.

Differential Revision: https://phabricator.services.mozilla.com/D149508
2022-06-22 10:42:34 +00:00