Commit Graph
3791 Commits
Author SHA1 Message Date
Keith Cirkel a804178a61 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-12 02:15:08 +00:00
Silaghi 98bf5b0321 Revert "Bug 204494, Bug 2041004 - Add <select> pseudo elements to devtools style inspector r=devtools-reviewers,nchevobbe"
This reverts commit 739a225b8a.

Revert "Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio"

This reverts commit 4b7b2a4083.
2026-06-10 16:55:02 +00:00
Keith Cirkel 4b7b2a4083 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-10 15:27:45 +00:00
Silaghi 50913f8313 Revert "Bug 2044945, Bug 2041004 - Add <select> psuedo elements to devtools style inspector r=devtools-reviewers,nchevobbe" for causing wr failures at select-appearance-disabled.html
This reverts commit 6b8775f47f.

Revert "Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio"

This reverts commit e3529d76f3.
2026-06-10 10:08:51 +00:00
Keith Cirkel e3529d76f3 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-10 08:20:21 +00:00
Alexandru Marc ca229e12ac Revert (Bug 2044945, Bug 2041004) for causing wr failures @ select-explicit-size.html
This reverts commit b434b10988.

Revert "Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio"

This reverts commit e92bda8433.
2026-06-09 19:14:13 +00:00
Keith Cirkel e92bda8433 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-09 17:37:46 +00:00
Sandor Molnar 15b6e590cd Revert "Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio" for causing wpt failures
This reverts commit 8ecfcdcb81.
2026-06-08 17:32:43 +00:00
Keith Cirkel 8ecfcdcb81 Bug 2041004 - Make ::picker-icon generated content, add UA styles r=layout-reviewers,firefox-style-system-reviewers,emilio
This refactors the `::picker-icon` to be a generated content tree
abiding pseudo, rather than an element backed. This is in order for us
to support the specified `content:` UA styles.

This change also introduces said UA styles.

Differential Revision: https://phabricator.services.mozilla.com/D304450
2026-06-08 16:00:35 +00:00
Tiaan Louw aa4033b3f8 Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D295550
2026-06-02 09:40:28 +00:00
Atila Butkovits b2571923b9 Revert "Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe" for causing failures at browser_parsable_css.js.
This reverts commit 3e903c86a3.
2026-06-02 01:46:29 +00:00
Tiaan Louw 3e903c86a3 Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D295550
2026-06-01 20:56:54 +00:00
rperta 32326b72c7 Revert "Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe" for causing mass failures
This reverts commit 498b28b9e5.
2026-06-01 16:14:26 +00:00
Tiaan Louw 498b28b9e5 Bug 1974792 - Implement ::checkmark pseudo selector for customizable select r=layout-reviewers,devtools-reviewers,firefox-style-system-reviewers,emilio,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D295550
2026-06-01 15:22:26 +00:00
Ting-Yu Lin 880ce33432 Bug 2043445 - Simplify nsCSSFrameConstructor::GetAbsoluteContainingBlock() by removing type local variable. r=layout-reviewers,AlaskanEmily
This doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D303223
2026-05-29 20:39:39 +00:00
Ting-Yu Lin 071f7c450f Bug 2042572 - Teach nsCSSFrameConstructor::GetAbsoluteContainingBlock() the concept of IB-split. r=dholbert,layout-reviewers
The bug happens when we reconstruct the abspos element inside the IB-split
block-wrapper where the inline element is an absolute containing block.

In `GetAbsoluteContainingBlock()`, when `absPosCBCandidate` is the
`MozBlockInsideInlineWrapper`, redirect the candidate to the first IB-split
sibling that is the absolute containing block. Otherwise, the function will
continue going up the parent chain until it finds `nsCanvasFrame` (the initial
containing block).

Differential Revision: https://phabricator.services.mozilla.com/D303124
2026-05-28 19:39:16 +00:00
Emilio Cobos Álvarez 39ef69b1ab Bug 2040020 - Fix the special-case in bug 2014986 when inserting in overflow containers. r=TYLin
See AdjustSiblingFrame for context. Includes crashtest for bug 2040029.

Differential Revision: https://phabricator.services.mozilla.com/D301055
2026-05-19 11:19:53 +00:00
Emilio Cobos Álvarez 64f8770e45 Bug 2039504 - Don't allow <input> / <textarea> to have a first-line/letter. r=layout-reviewers,jfkthame
This matches WebKit and our previous behavior.

These are replaced elements and those generally don't support them. It's
not defined that these elements are block containers, we just switched
to implement them as such.

Differential Revision: https://phabricator.services.mozilla.com/D300559
2026-05-14 15:39:22 +00:00
Emilio Cobos Álvarez 139d1a428f Bug 2023450 - Honor CSS display on <select> with appearance: base/base-select. r=keithamus
Differential Revision: https://phabricator.services.mozilla.com/D287828
2026-05-06 20:12:48 +00:00
Emilio Cobos Álvarez 9f8191aba1 Bug 2033384 - Tweak colgroup child suppression. r=layout-reviewers,dshin
This code comes all the way back from bug 480979.

What happens here is as follows:

 * There are two table-column items, with their relevant anonymous
   wrapper. Why the page uses `display: table-column` for this escapes
   my understanding.
 * We insert the header next to them. We compute the parent frame to be
   the (anonymous) nsTableColumnGroup frame, because it's our sibling's
   parent.
 * We decide you're not a column, and thus you get suppressed. We don't
   create FrameConstructionItems for it.
 * We don't realize in WipeContainingBlock that things went wrong, and
   fail miserably.

Fortunately we can tweak this to perform the suppression later in the
pipeline.

Differential Revision: https://phabricator.services.mozilla.com/D295265
2026-04-21 14:09:33 +00:00
Hiroyuki Ikezoe 7e6466078f Bug 2031798 - Replace bool aAllowCounters parameter with enum class AllowCounters. r=layout-reviewers,TYLin
Boolean parameters are opaque at call sites. AllowCounters::Yes/No makes
the intent clear without consulting the function signature.

Differential Revision: https://phabricator.services.mozilla.com/D294554
2026-04-17 02:55:11 +00:00
Emilio Cobos Álvarez 34b249c82e Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin
This also should fix bug 1881942 (placeholder is now scrollable
alongside the textarea).

This makes nsTextControlFrame a subclass of ScrollContainerFrame (with
an inner block), and tweaks layout to match.

It lays out the inner content using block layout and align-content,
rather than bespoke reflow primitives. This makes field-sizing trivial
to implement on top.

This is a bit scary, but simpler in most ways. In particular, it needs
to teach ScrollContainerFrame of the button, because that goes outside
the scrollable area, like scrollbars. That said it needs less
special-cases added than those removed, and it should also be faster
(needs less frames to layout an input with placeholder etc), and match
other browsers better.

The general set-up is:

  <text-control-editing-root/>
  <placeholder/>
  <autofill-preview/>

text-control-editing-root is always inline-block and always displayed
(since it's what grabs the focus / shows the caret). If the
autofill-preview or placeholder are displayed, the editing-root is
zero-width and clipped (note that for placeholder that's guaranteed
because placeholder is only shown with an empty value, but
autofill-preview needs it).

placeholder and autofill-preview are hidden via `display` rather than
visibility. This doesn't make a difference with this patch but it
matters for bug 1977176.

Caret painting needs an extra hop to paint atop the placeholder (no
observable behavior change, but worth calling out).

There is one subtle behavior change, which is that single-line inputs
never report scrollable overflow in the block axis. This matches other
browsers (see the tweak in nsBlockFrame's overflow computation) and is
needed to avoid regressing scrollable-overflow-padding-input.html.

The changes in window_composition_text_querycontent.xhtml are needed
because before this patch, the height of the control editing root was
always the height of the whole textarea. The characters you're composing
might legitimately be taller than the line. Bump the line height so that
that doesn't happen in this test.

Differential Revision: https://phabricator.services.mozilla.com/D293666
2026-04-16 17:09:40 +00:00
Serban Stanca 5d4176345b Revert "Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin" for causing several failures.
This reverts commit 81ef425716.
2026-04-16 09:31:32 +00:00
Emilio Cobos Álvarez 81ef425716 Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin
This also should fix bug 1881942 (placeholder is now scrollable
alongside the textarea).

This makes nsTextControlFrame a subclass of ScrollContainerFrame (with
an inner block), and tweaks layout to match.

It lays out the inner content using block layout and align-content,
rather than bespoke reflow primitives. This makes field-sizing trivial
to implement on top.

This is a bit scary, but simpler in most ways. In particular, it needs
to teach ScrollContainerFrame of the button, because that goes outside
the scrollable area, like scrollbars. That said it needs less
special-cases added than those removed, and it should also be faster
(needs less frames to layout an input with placeholder etc), and match
other browsers better.

The general set-up is:

  <text-control-editing-root/>
  <placeholder/>
  <autofill-preview/>

text-control-editing-root is always inline-block and always displayed
(since it's what grabs the focus / shows the caret). If the
autofill-preview or placeholder are displayed, the editing-root is
zero-width and clipped (note that for placeholder that's guaranteed
because placeholder is only shown with an empty value, but
autofill-preview needs it).

placeholder and autofill-preview are hidden via `display` rather than
visibility. This doesn't make a difference with this patch but it
matters for bug 1977176.

Caret painting needs an extra hop to paint atop the placeholder (no
observable behavior change, but worth calling out).

There is one subtle behavior change, which is that single-line inputs
never report scrollable overflow in the block axis. This matches other
browsers (see the tweak in nsBlockFrame's overflow computation) and is
needed to avoid regressing scrollable-overflow-padding-input.html.

The changes in window_composition_text_querycontent.xhtml are needed
because before this patch, the height of the control editing root was
always the height of the whole textarea. The characters you're composing
might legitimately be taller than the line. Bump the line height so that
that doesn't happen in this test.

Differential Revision: https://phabricator.services.mozilla.com/D293666
2026-04-16 08:10:39 +00:00
agoloman dfead40619 Revert "Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin" for causing crashtest assertions @399262.html.
This reverts commit 51d51c3b33.
2026-04-16 00:28:13 +00:00
Emilio Cobos Álvarez 51d51c3b33 Bug 2031757 - Rejigger text input / textarea rendering to make field-sizing easier. r=layout-reviewers,devtools-reviewers,fxview-reviewers,firefox-style-system-reviewers,ochameau,jsudiaman,dshin
This also should fix bug 1881942 (placeholder is now scrollable
alongside the textarea).

This makes nsTextControlFrame a subclass of ScrollContainerFrame (with
an inner block), and tweaks layout to match.

It lays out the inner content using block layout and align-content,
rather than bespoke reflow primitives. This makes field-sizing trivial
to implement on top.

This is a bit scary, but simpler in most ways. In particular, it needs
to teach ScrollContainerFrame of the button, because that goes outside
the scrollable area, like scrollbars. That said it needs less
special-cases added than those removed, and it should also be faster
(needs less frames to layout an input with placeholder etc), and match
other browsers better.

The general set-up is:

  <text-control-editing-root/>
  <placeholder/>
  <autofill-preview/>

text-control-editing-root is always inline-block and always displayed
(since it's what grabs the focus / shows the caret). If the
autofill-preview or placeholder are displayed, the editing-root is
zero-width and clipped (note that for placeholder that's guaranteed
because placeholder is only shown with an empty value, but
autofill-preview needs it).

placeholder and autofill-preview are hidden via `display` rather than
visibility. This doesn't make a difference with this patch but it
matters for bug 1977176.

Caret painting needs an extra hop to paint atop the placeholder (no
observable behavior change, but worth calling out).

There is one subtle behavior change, which is that single-line inputs
never report scrollable overflow in the block axis. This matches other
browsers (see the tweak in nsBlockFrame's overflow computation) and is
needed to avoid regressing scrollable-overflow-padding-input.html.

The changes in window_composition_text_querycontent.xhtml are needed
because before this patch, the height of the control editing root was
always the height of the whole textarea. The characters you're composing
might legitimately be taller than the line. Bump the line height so that
that doesn't happen in this test.

Differential Revision: https://phabricator.services.mozilla.com/D293666
2026-04-15 23:25:11 +00:00
Emilio Cobos Álvarez cbd055339f Bug 2031110 - Remove -moz-scrolled-canvas and make viewport styles non-inheriting. r=jwatt
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
2026-04-13 20:27:47 +00:00
agoloman ea033e9232 Revert "Bug 2031110 - Remove -moz-scrolled-canvas and make viewport styles non-inheriting. r=jwatt" for causing multiple failures.
This reverts commit e3869b3af5.
2026-04-13 16:47:39 +00:00
Emilio Cobos Álvarez e3869b3af5 Bug 2031110 - Remove -moz-scrolled-canvas and make viewport styles non-inheriting. r=jwatt
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
2026-04-13 15:44:33 +00:00
Jonathan Kew a35c53c2b3 Bug 2029446 - Don't create frames for elements that are not allowed in an svg-glyphs document. r=firefox-svg-reviewers,layout-reviewers,longsonr,emilio
Differential Revision: https://phabricator.services.mozilla.com/D293133
2026-04-10 09:08:15 +00:00
Emilio Cobos Álvarez 5016086e1a Bug 2025089 - Remove some includes from nsINode.h and Element.h. r=dom-core,dom-storage-reviewers,firefox-svg-reviewers,janv,smaug
Differential Revision: https://phabricator.services.mozilla.com/D289049
2026-03-22 23:45:55 +00:00
Emilio Cobos Álvarez eb87d1158b Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 17:44:30 +00:00
Serban Stanca e5d7b9992f Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wpt failures in closed-listbox-rendering.html.
This reverts commit 2b592196ab.
2026-03-17 15:26:31 +00:00
Emilio Cobos Álvarez 2b592196ab Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 12:11:53 +00:00
Sylvestre Ledru 55481ac4b5 Bug 2023419 - Remove Emacs/Vim modelines from layout/ r=emilio,firefox-style-system-reviewers,layout-reviewers
replaced by .editorconfig

Differential Revision: https://phabricator.services.mozilla.com/D287852
2026-03-17 12:05:43 +00:00
Serban Stanca 756241a7ce Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wpt failures in select-appearance-sizing-in-flex.html.
This reverts commit 7669d5a11e.
2026-03-17 11:49:24 +00:00
Emilio Cobos Álvarez 7669d5a11e Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 10:14:28 +00:00
rperta 2362c10a63 Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wr failures at closed-listbox-rendering.html
This reverts commit b957d18e90.
2026-03-17 01:32:58 +00:00
Emilio Cobos Álvarez b957d18e90 Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-16 22:41:27 +00:00
Norisz Fay a86d829321 Revert "Bug 2012637 - part 9: Add a Firefox Source Docs documentation page for TreeKind and notable issues r=smaug,dom-core" as requested by dev
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.
2026-03-13 02:52:45 +00:00
Emilio Cobos Álvarez 1e7c1504ae Bug 343048 - Get rid of ColGroup list. r=layout-reviewers,dshin
Having two lists that the frame constructor is not aware is a quirk that
causes correctness issues like bug 2021043.

Instead, sort rowgroups and colgroups once in the common case during
table layout. This also fixed some visibility collapse things because
now we compute overflow just once after collapsing. It also caused some
unexpected passes in some editing tests.

Add a test for bug 2021043, which is fixed by this.

Differential Revision: https://phabricator.services.mozilla.com/D286457
2026-03-12 09:37:21 +00:00
Masayuki Nakano 9e71cb77fb 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
`FlattenedChildIterator` is a non-template class and work only for the
flattened tree (i.e., in the `TreeKind::Flat` mode).

To centralize the implementation to access children from a parent node
in the various kinds of tree except `ShadowIncludingDOM`, this patch
makes it a template class and support the simple DOM (for
`TreeKind::DOM`), the flattened tree (for`TreeKind::Flat`) and also the
flattened tree for selection whose `TreeKind` will be added by the next
patch.

The reason why this patch does not support
`TreeKind::ShadowIncludingDOM` is, it is not clear that which children
should be handled when the parent is a shadow host, i.e., whether the
children of the host or the `ShadowRoot`. Therefore, the caller should
use `ShadowRoot` if the users want to list up the the children from a
host. Then, the code is really clear about what it does.

Differential Revision: https://phabricator.services.mozilla.com/D281303
2026-03-12 03:01:45 +00:00
Emilio Cobos Álvarez 51b0a19aaa Bug 2017711 - Create <input> shadow tree lazily from frame construction. r=masayuki,dom-core
Speedometer3's TodoMVC-jQuery hits basically the worst case of my
change, which is creating a hidden text input per row. That causes tons
of extra time spent in BindToTree and so on because we now create the
shadow tree for all of those. It is specially bad because the shadow
tree is particularly expensive (see bug 2017005).

For now, keep creating the <input> shadow tree lazily from layout, but
with a key difference: Once created, we keep it around.

This should still allow us to fix the reframing issues linked from
bug 2016280 and hopefully won't be too painful. It is a bit annoying
that TextControlElement can't rely on the shadow tree existing, but that
seems ok...

Of course preferred outcome is to make shadow trees less costly. Most of
the cost is still allocation of the slots, afaict from the profiles.

Differential Revision: https://phabricator.services.mozilla.com/D284039
2026-02-19 20:40:48 +00:00
Emilio Cobos Álvarez 27f627c543 Bug 2017836 - very minor frame constructor clean-ups. r=layout-reviewers,dholbert
Noticed while looking at bug 2017711, no behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D284040
2026-02-19 13:47:55 +00:00
Emilio Cobos Álvarez 5624defbfd Bug 2016280 - Use shadow DOM for editor. r=masayuki,dom-core,smaug,Jamie
There's still a ton of things that can be cleaned up after this, but
this setup is nicer.

For now, editor keeps getting set-up / torn down on BindToFrame. Seems
all that could be untangled, but step by step.

The preview stuff and placeholder can just be created on demand now,
rather than requiring frame reconstruction.

Also, nsSearchControlFrame and co no longer do anything of interest, so
move the still relevant bits elsewhere and remove them.

test_bug1248459.html is removed because it messes with the editor
selection using SpecialPowers, in a way such that it crosses shadow
boundaries, and messes up the selected state triggering debug asserts.

test_focus_docnav.xhtml now triggers a different code-path because of
the shadow root (rather than the frame tree traversal). Keep it working
for now by replacing it with something that isn't a shadow root.

Differential Revision: https://phabricator.services.mozilla.com/D282953
2026-02-17 09:53:01 +00:00
Emilio Cobos Álvarez 577ff73659 Bug 2015898 - Remove popup special cases from frame construction. r=dshin,layout-reviewers
Popups are already regular abspos elements in the top layer,
these aren't necessary.

They are also abspos and fixed pos containing blocks
(via contain: paint).

Differential Revision: https://phabricator.services.mozilla.com/D282682
2026-02-11 01:08:30 +00:00
Emilio Cobos Álvarez 6f65f203f8 Bug 2015898 - Remove ChildListID::Fixed. r=dshin,TYLin,layout-reviewers
We already rely on one frame having at most one
absolute list, so there's no point in this distinction.

In the future, with position-visibility, we might want
to make fixed and abspos containing block effectively the same.

But one step at a time.

Differential Revision: https://phabricator.services.mozilla.com/D282681
2026-02-11 01:08:27 +00:00
Emilio Cobos Álvarez bb530e5269 Bug 2015488 - Add backdrop support for checkboxes and radio buttons. r=layout-reviewers,firefox-style-system-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D282501
2026-02-10 23:43:46 +00:00
Emilio Cobos Álvarez 7f208fd8b0 Bug 2015488 - Support backdrop on outer <svg> / <iframe> / <img>. r=layout-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,dshin,longsonr
Add exceptions for a few elements that do rely on their frame tree
size (mostly text controls). These are fixable but separate bug at the
very least.

Add reftests for <iframe> and <img>. Also, test all HTML elements in all
writing modes to ensure that they don't trigger assertions.

The <svg> case can't be easily reftested, afaict, because fullscreen
will change the size of the reftest window and <svg> doesn't support
popover.

Differential Revision: https://phabricator.services.mozilla.com/D282451
2026-02-10 11:08:52 +00:00
Emilio Cobos Álvarez 222f8d185a Bug 2014986 - Improve prev sibling computation for flex / grid containers. r=jwatt
The situation this patch deals with is when you have the following frame
tree structure:

  ns{Flex,Grid}ContainerFrame
   ::-moz-anonymous-item
     Some text

And you append something after "Some text".

Before the regressing bug, we ended up in different codepaths for
insertion and append: Append always ended with the grid container as a
parent (and the anonymous item as a prev sibling), while insert ended
with the current nightly behavior of choosing the text frame as a
sibling, and the anonymous item as a parent.

WipeContainingBlock has code to deal with the wrong choice, but that
forces the container to be reconstructed, which is inefficient and in
cases like this one has correctness implications (because we store the
"view transition live capture bit" on the frame). I filed bug 2015007
for that since that's technically wrong too.

This is the relatively-minimal upliftable fix to minimize reframes in
both cases, which of course fixes the regression. I think it might be
worth looking into whether we can make the right decision later in the
pipeline (e.g., making WipeContainingBlock override the insertion parent
rather than bailing out). But that seems riskier.

Add a test for the different cases here.

Differential Revision: https://phabricator.services.mozilla.com/D282161
2026-02-06 21:03:13 +00:00