`GetMatchingContainingBlock()` may return a continuation of `aContainingBlock`.
Since we do not yet support splitting inline containing blocks across multicol,
it is sufficient to translate the rect from the matching containing block to the
original containing block. This fixes `anchor-getComputedStyle-002.html`.
Differential Revision: https://phabricator.services.mozilla.com/D303081
`IsProperAncestorFrameConsideringContinuations()` gets the ability to traverse
IB-split. This doesn't change behavior for existing callers because they are all
within `MOZ_ASSERT`.
Delete `TraverseUpToContainerChild()` since it is not aware of continuations nor
IB-split, and we don't need a returned child frame pointer. Fixing it properly
makes its functionally equivalent to
`IsProperAncestorFrameConsideringContinuations()`.
Differential Revision: https://phabricator.services.mozilla.com/D303080
The pref was enabled by default in bug 2002115 and shipped in Firefox 151. Since
it has been two releases, we can remove it to simplify the code path.
Differential Revision: https://phabricator.services.mozilla.com/D302349
... This passes `Element` instead of `nsIContent`, but all view-transition
and anchor-positioning properties should apply only to (pseudo-)elements.
Differential Revision: https://phabricator.services.mozilla.com/D299487
They never inherit anything (except background, but that is a no-op
because viewport inherits from nullptr, which is the initial style).
It seems in the past we relied on recomputing some of this for direction
propagation or so, according to the comments, but that's definitely no
longer true.
Also the comment about needing overflow: auto is wrong, because we've
since always created scrollbars for the root (and avoided reframes).
Similarly, the assertion about viewport is kinda unnecessary. It was
introduced in:
https://hg.mozilla.org/mozilla-central/rev/8fd06045940a05d56d833a0488262fe2279d3702
But since then we always skip fixup for all anon boxes anyways, and
specify display: block explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D293710
They never inherit anything (except background, but that is a no-op
because viewport inherits from nullptr, which is the initial style).
It seems in the past we relied on recomputing some of this for direction
propagation or so, according to the comments, but that's definitely no
longer true.
Also the comment about needing overflow: auto is wrong, because we've
since always created scrollbars for the root (and avoided reframes).
Differential Revision: https://phabricator.services.mozilla.com/D293710
With the TreeScopedTag + the extra tag, these end up being massive.
Compact their representation by reusing the array. Since they're dashed idents
we can just store the regular values however we want.
Differential Revision: https://phabricator.services.mozilla.com/D290101
This patch tweaks the internal representation of CascadeLevel to use a
set of bitflags for the origin and importance rather than making it part
of the discriminant.
This will allow to encode more information on CascadePriority without
growing it, like for example whether we're in an @starting-style block,
or a potentially new @appearance-base block for customizable select.
Differential Revision: https://phabricator.services.mozilla.com/D287610
This reverts commit 88008cd8ca.
Revert "Bug 2012637 - part 8: Make `nsContentUtils::ComparePoints` handle `TreeKind::Flat` and `TreeKind::FlatForSelection` correctly r=smaug,dom-core"
This reverts commit 73e6f6587b.
Revert "Bug 2012637 - part 7: Make `RangeUtils::CompareNodeToRangeBoundaries()` use `nsContentUtils::ComparePoints` with valid point in the tree r=smaug"
This reverts commit 6985d5e80f.
Revert "Bug 2012637 - part 6: Make `nsRange::CutContents()` convert the range boundaries to the ones in the DOM before comparing r=smaug"
This reverts commit 73b585af3d.
Revert "Bug 2012637 - part 5: Delete the default template parameter of `nsContentUtils::ComparePoints` and relatives r=smaug,dom-core"
This reverts commit 1a7f24e5b5.
Revert "Bug 2012637 - part 4: Make `nsContentUtils` use `nsIContent` for taking a child node as a parameter r=smaug"
This reverts commit a6ea8d6824.
Revert "Bug 2012637 - part 3: Add template `nsINode` API which can switch to call API from `TreeKind` r=smaug,dom-core,webidl"
This reverts commit a4211e9df0.
Revert "Bug 2012637 - part 2: Add `TreeKind::FlatForSelection` and change the template parameter of `ChildIteratorBase` to `TreeKind` r=smaug,dom-core"
This reverts commit 0241749ee7.
Revert "Bug 2012637 - part 1: Make `ChildIterBase` template class to re-implement `FlattenedChildIterator` for DOM, Flat and FlatForSelection TreeKind r=smaug,dom-core,layout-reviewers,emilio"
This reverts commit 9e71cb77fb.
This will make the main patch simpler. However, some of them do not
support `TreeKind::ShadowIncludingDOM` because it's unclear what
should return as a parent node of a child of `ShadowRoot`, what should
return as a child node of a shadow host. To avoid the developers to use
them on wrong assumptions, this patch makes the users use `DOM`, `Flat`
or `FlatForSelection` explicitly.
Differential Revision: https://phabricator.services.mozilla.com/D281305
This reverts commit 103fd273bc.
Revert "Bug 2016245: Add parsing for timeline-scope. r=layout-scroll-driven-animation-reviewers,firefox-style-system-reviewers,boris"
This reverts commit 8e5fa13d51.
Revert "Bug 2016245: Rename anchor-scope's backing type for general use. r=layout-scroll-driven-animation-reviewers,firefox-style-system-reviewers,layout-reviewers,boris"
This reverts commit 7b7e701073.
This reverts commit 4caefb9c09.
Revert "Bug 2016245: Add parsing for timeline-scope. r=layout-scroll-driven-animation-reviewers,firefox-style-system-reviewers,boris"
This reverts commit c6f5455dd1.
Revert "Bug 2016245: Rename anchor-scope's backing type for general use. r=layout-scroll-driven-animation-reviewers,firefox-style-system-reviewers,layout-reviewers,boris"
This reverts commit 007f70e272.
This reverts commit bcf761a291.
Revert "Bug 2016245: Add parsing for timeline-scope. r=layout-scroll-driven-animation-reviewers,firefox-style-system-reviewers,boris"
This reverts commit d42607ba35.
Revert "Bug 2016245: Rename anchor-scope's backing type for general use. r=layout-scroll-driven-animation-reviewers,firefox-style-system-reviewers,layout-reviewers,boris"
This reverts commit 228f755dd6.
This will cause an issue for evaluating fallbacks changing default anchors, but
that is something we can easily detect and handle down the line.
Differential Revision: https://phabricator.services.mozilla.com/D281718
This reverts commit 962e149e3e.
Revert "Bug 1991489: Ensure that when checking for anchor visibility, the intersection root rect takes union of all of its in-flow rects. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio"
This reverts commit 481e451d10.
Revert "Bug 1991489: Ensure that fragmented anchors are combined when checking for overflow. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio,TYLin"
This reverts commit d0f5ec1114.
Revert "Bug 1991489: During fragmentation of abspos frames, reuse anchor pos references populated during unfragmented reflow. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio,TYLin"
This reverts commit 4e522e9695.
Revert "Bug 1991489: nsIFrame::ComputeSize uses anchor resolution cache. r=layout-anchor-positioning-reviewers,layout-reviewers,emilio"
This reverts commit 4ec2727999.
This will cause an issue for evaluating fallbacks changing default anchors, but
that is something we can easily detect and handle down the line.
Differential Revision: https://phabricator.services.mozilla.com/D281718
The invoker can be anywhere in the dom, have to confirm that it's an
acceptable anchor. I _think_ pseudo elements should always pass this
check but worth doing regardless.
This also fixes bug 2013896, while at it, gotta add a test for that, if
this doesn't cause any progression.
Differential Revision: https://phabricator.services.mozilla.com/D282173
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.
This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.
But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.
Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.
Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.
This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.
Differential Revision: https://phabricator.services.mozilla.com/D282076
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.
This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.
But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.
Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.
Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.
This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.
Differential Revision: https://phabricator.services.mozilla.com/D282076