Commit Graph

902 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
872737ec7a Bug 1957900 - Ensure view transition snapshots capture opacity / clips / masks. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D244127
2025-04-02 13:05:23 +00:00
Jan-Niklas Jaeschke
94f7a92240 Bug 1724299, part 1 - Implement auto-expanding details. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D241454
2025-04-02 08:22:48 +00:00
Jan-Niklas Jaeschke
a876c168a1 Bug 1761043, part 6 - hidden=until-found: Implementedhidden=until-found in nsFind. r=emilio
This fixes Text Fragments tests as well since
that feature relies on `nsFind`.

Differential Revision: https://phabricator.services.mozilla.com/D241452
2025-04-02 08:22:47 +00:00
Emilio Cobos Álvarez
d025ded17c Bug 1953823 - When the root is snapshotted, snapshot the root contents but not top layer(s). r=view-transitions-reviewers,boris
For fallback snapshots, for now just snapshot the canvas frame.

Differential Revision: https://phabricator.services.mozilla.com/D242016
2025-03-25 14:03:19 +00:00
Jonathan Watt
24e5a0acae Bug 1954764. Rename needAnchorSuppression in nsIFrame::DidSetComputedStyle. r=dshin
This code will soon deal with both scroll anchoring and position anchoring.
Renaming the existing scroll anchoring variable to avoid confusion.

Differential Revision: https://phabricator.services.mozilla.com/D242004
2025-03-24 13:20:07 +00:00
Masayuki Nakano
0ef5624d51 Bug 1954020 - Rename "limiter" of nsFrameSelection to "independent selection root element" r=emilio
It's currently always set to the native anonymous `<div>` for editable content
of text control element.  So, it means that it's an independent selection root.

Depends on D241587

Differential Revision: https://phabricator.services.mozilla.com/D241775
2025-03-17 12:49:58 +00:00
Masayuki Nakano
a5637890c7 Bug 1946001 - Fix some points which may cross independent selection boundary r=emilio,jjaschke
This patch fixes multiple points which may cross independent selection
boundaries which is element boundary of the native anonymous `<div>` for
editable content in text controls.  The reason why I don't split this patch is,
fixing one of them leads another assertion failure.  So, I couldn't pass all
tests with separated patches.

1. `nsFrameTraversal` should take `Element` instead of `nsIFrame` for the
limiter because e.g., inline editing host like `<span contenteditable>` may
have multiple frames if it's wrapped.  Therefore, we should make it take
an element as the ancestor limiter, and check it when getting parent frame
or after getting previous or next frame.
2. `nsIFrame::PeekBackwardAndForward` may cross the boundary because it does not
take the anonymous `<div>` element as ancestor limiter of the selection.  It's
currently used only for extending selection.  Therefore, I rename it to make
it clearer.
3. `SelectionMovementUtils::GetPrevNextBidiLevel` to take the ancestor limiter
for calling `nsIFrame::GetFrameFromDirection()`.
4. `nsINode` should have a method to return the `nsFrameSelection` instance
which manages the selection in the node.  This makes the check simpler, and
this is not expensive.  Then, for making it clearer, I rename
`TextControlElement::GetConstFrameSelection()` to
`GetIndependentFrameSelection()`.
5. `nsINode::GetSelectionRootContent()` should have an option to return
independent selection root when the node is its host for
`nsFrameSelection::ConstrainFrameAndPointToAnchorSubtree()`
6. `nsFrameSelection::ConstrainFrameAndPointToAnchorSubtree()` should not
retrieve independent selection root when the given frame is a text control
frame.
7. `RangeUtils` should get parent with checking the independent selection
boundaries.
8. `Selection::Extend` should assert if the destination is managed by its
frame selection to detect a bug.

Differential Revision: https://phabricator.services.mozilla.com/D241587
2025-03-17 12:49:57 +00:00
Emilio Cobos Álvarez
0ff8015e82 Bug 1922333 - Land view transition plumbing for live capture behind a default-off pref. r=view-transitions-reviewers,boris
It is mostly working, but there are some tests that hit crashes and
asserts that we should sort out. For now, land it default-off.

This does implement other bits that are on by default tho, like creating
image frames for ::view-transition-new() pseudo-elements and so on. I
think that is fine (it's just that for now they are all transparent).

Differential Revision: https://phabricator.services.mozilla.com/D239382
2025-03-05 11:18:18 +00:00
Emilio Cobos Álvarez
f5b2976c45 Bug 1922298 - Add a fast way of tagging frames as captured, and make that view-transition-name a stacking-context-creating property. r=view-transitions-reviewers,boris
Differential Revision: https://phabricator.services.mozilla.com/D239377
2025-02-26 12:29:49 +00:00
Cristina Horotan
5bc51022a0 Backed out 9 changesets (bug 1922300, bug 1950362, bug 1919333, bug 1950176, bug 1948058, bug 1950177, bug 1922298) for causing multiple Wr failures
Backed out changeset 54c87e09251a (bug 1919333)
Backed out changeset 813274ba35a0 (bug 1919333)
Backed out changeset a37d91fc2a7a (bug 1950362)
Backed out changeset 97f67f9048b5 (bug 1922298)
Backed out changeset 4c11b366fcaf (bug 1919333)
Backed out changeset dbde76fa73a9 (bug 1948058)
Backed out changeset ba3d9d95cd56 (bug 1922300)
Backed out changeset 0fe786bf2709 (bug 1950177)
Backed out changeset 8d9f52e91779 (bug 1950176)
2025-02-26 06:23:09 +02:00
Emilio Cobos Álvarez
90fa7916f7 Bug 1922298 - Add a fast way of tagging frames as captured, and make that view-transition-name a stacking-context-creating property. r=view-transitions-reviewers,boris
Differential Revision: https://phabricator.services.mozilla.com/D239377
2025-02-25 22:48:31 +00:00
Sean Feng
d8ecdd8d22 Bug 1930931 - Make the dragging interaction still happens when the event target frame is moved/destroyed upon mousedown r=masayuki,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D238318
2025-02-21 18:25:06 +00:00
Hiroyuki Ikezoe
265c0dd6a2 Bug 1943597 - Avoid creating nsDisplayFixedPotion display items for popup. r=botond,emilio
Differential Revision: https://phabricator.services.mozilla.com/D236812
2025-02-14 02:26:56 +00:00
Norisz Fay
2ba59a28fb Backed out 6 changesets (bug 1943597) for causing Wd,bc process-crashes
Backed out changeset 198a709574b4 (bug 1943597)
Backed out changeset bed944b2f025 (bug 1943597)
Backed out changeset 6bf1e7b3c631 (bug 1943597)
Backed out changeset ef120d0f1555 (bug 1943597)
Backed out changeset a8d8fc79f935 (bug 1943597)
Backed out changeset d3daad7d905d (bug 1943597)
2025-02-13 13:14:26 +02:00
Hiroyuki Ikezoe
d792929dde Bug 1943597 - Avoid creating nsDisplayFixedPotion display items for popup. r=botond,emilio
Differential Revision: https://phabricator.services.mozilla.com/D236812
2025-02-13 08:26:03 +00:00
Alexandru Marc
4e77c545ce Backed out 6 changesets (bug 1943597) for causing bc failures @ browser_test_popup_menu_in_position_fixed.js CLOSED TREE
Backed out changeset e08b121d73a9 (bug 1943597)
Backed out changeset 805c841108cf (bug 1943597)
Backed out changeset 4ab954f5a0e7 (bug 1943597)
Backed out changeset 58dded9a06f8 (bug 1943597)
Backed out changeset fabc3f833a51 (bug 1943597)
Backed out changeset 77607ad7a2c2 (bug 1943597)
2025-02-12 09:03:24 +02:00
Hiroyuki Ikezoe
538f74ce71 Bug 1943597 - Avoid creating nsDisplayFixedPotion display items for popup. r=botond,emilio
Differential Revision: https://phabricator.services.mozilla.com/D236812
2025-02-12 05:30:32 +00:00
David Shin
4dc4e2d920 Bug 1942715: Part 4 - Switch to using a more transparent wrapper. r=firefox-style-system-reviewers,emilio
Don't have to write more one-off wrappers for size and margin.
It does cost having to copy fallback values, but that may
not be a huge tradeoff.

Differential Revision: https://phabricator.services.mozilla.com/D237097
2025-02-12 01:31:30 +00:00
Butkovits Atila
e51ff081c6 Backed out 6 changesets (bug 1942715) for causing build bustages. CLOSED TREE
Backed out changeset 1433202bd2f3 (bug 1942715)
Backed out changeset d9ce2be09cd0 (bug 1942715)
Backed out changeset 9789581a42a3 (bug 1942715)
Backed out changeset 9a18f1aca5d5 (bug 1942715)
Backed out changeset 46bd0cb031f4 (bug 1942715)
Backed out changeset 73fec8bae045 (bug 1942715)
2025-02-12 01:45:46 +02:00
David Shin
c536f3deb5 Bug 1942715: Part 4 - Switch to using a more transparent wrapper. r=firefox-style-system-reviewers,emilio
Don't have to write more one-off wrappers for size and margin.
It does cost having to copy fallback values, but that may
not be a huge tradeoff.

Differential Revision: https://phabricator.services.mozilla.com/D237097
2025-02-11 21:06:24 +00:00
Butkovits Atila
fd3125f8e5 Backed out 6 changesets (bug 1942715) for causing build bustages. CLOSED TREE
Backed out changeset 7c5cfe6bbaeb (bug 1942715)
Backed out changeset cc5530b02046 (bug 1942715)
Backed out changeset 5a534f455cc3 (bug 1942715)
Backed out changeset ecdd7307c9f1 (bug 1942715)
Backed out changeset 05a62c484807 (bug 1942715)
Backed out changeset a9825ee69550 (bug 1942715)
2025-02-11 22:17:26 +02:00
David Shin
96712d3db0 Bug 1942715: Part 4 - Switch to using a more transparent wrapper. r=firefox-style-system-reviewers,emilio
Don't have to write more one-off wrappers for size and margin.
It does cost having to copy fallback values, but that may
not be a huge tradeoff.

Differential Revision: https://phabricator.services.mozilla.com/D237097
2025-02-11 18:19:56 +00:00
Otto Länd
601b7c4b76 Bug 1945944: apply code formatting via Lando
# ignore-this-changeset
2025-02-06 15:52:02 +00:00
David Shin
61d5b05704 Bug 1945944: Add flag to dump frame tree with only deterministic information for diffing. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D236797
2025-02-06 15:34:27 +00:00
David Shin
3d615cb7f6 Bug 1923763: Part 5 - Replace inset evaluations with anchor-resolved inset evaluations. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D231259
2025-01-21 15:11:25 +00:00
Stanca Serban
4a35296e0c Backed out 7 changesets (bug 1923763) for causing build bustages in nsStyleStruct.cpp. CLOSED TREE
Backed out changeset d55070e64ced (bug 1923763)
Backed out changeset a92a0bc6047f (bug 1923763)
Backed out changeset 2203e2c5268e (bug 1923763)
Backed out changeset 0cc5e744c01a (bug 1923763)
Backed out changeset d2139afa933b (bug 1923763)
Backed out changeset 93e59980eac1 (bug 1923763)
Backed out changeset 8018734b5491 (bug 1923763)
2025-01-21 11:10:22 +02:00
David Shin
6b9f17e7ff Bug 1923763: Part 5 - Replace inset evaluations with anchor-resolved inset evaluations. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D231259
2025-01-20 23:54:50 +00:00
David Shin
7b3846c45d Bug 1941075: Let -moz-available in abs-positioned element block-size behave as stretch-fit. r=dholbert,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D234057
2025-01-15 18:17:25 +00:00
Stanca Serban
e00a8a6c89 Backed out changeset 17664755d23f (bug 1941075) for causing multiple wpt failures. 2025-01-14 02:23:01 +02:00
David Shin
b2967d0178 Bug 1941075: Let -moz-available in abs-positioned element block-size behave as auto. r=dholbert,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D234057
2025-01-13 21:26:02 +00:00
David Shin
f48b3b8c8b Bug 1940084: Print whether a frame's content has a display port to debug frame dump. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D233262
2025-01-07 18:32:33 +00:00
Daniel Holbert
d153465dd3 Bug 1933408 part 1: Implement layout support for 'stretch' as a block-axis size (with '-webkit-fill-available' as an alias). r=TYLin
Note that both keywords are disabled in the CSS parser for now, behind
these about:config prefs:
layout.css.stretch-size-keyword.enabled
layout.css.webkit-fill-available.enabled

Prior to this patch, we handled both keywords as pure aliases for
'-moz-available' (which has the correct 'stretch' behavior in the inline axis
but which just behaves like the initial value in the block axis).

This patch changes that so that 'stretch' and '-webkit-fill-available' will now
actually do the right thing in the block axis (if they're enabled at all, via
their aforementioned about:config prefs).

The relevant spec text here is:
https://drafts.csswg.org/css-sizing-4/#valdef-width-stretch
https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing

Differential Revision: https://phabricator.services.mozilla.com/D217688
2024-12-14 06:35:06 +00:00
David Shin
339508eeab Bug 1936450: Change abspos fit-content sizing so as not to provide a basis for percent resolution in its children. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D231996
2024-12-13 14:00:02 +00:00
Timothy Nikkel
1e6ed2fe24 Bug 1935988. Don't bother trying to remove a frame property in InvalidateDirectRenderingObservers if the frame is being destroyed. r=layout-reviewers,emilio
The frame destroy will tear down all the properties, no need to search for one specific property and maybe remove it before that.

This shows up in profiles.

Differential Revision: https://phabricator.services.mozilla.com/D231531
2024-12-11 13:12:53 +00:00
Alexandru Marc
a090fc9187 Backed out changeset 5f819082a015 (bug 1936189) for causing reftest failures @ native-theme/470711-1.xhtml CLOSED TREE 2024-12-11 14:59:54 +02:00
Timothy Nikkel
8c283349ba Bug 1936189. Only do -moz-subtree-hidden-only-visually checks in the parent process. r=layout-reviewers,emilio
This is a chrome only css property (so it could still be used in a UA sheet that is applied to a content document) that was created solely to tabs/xul decks in a fashion that is more like the rest of css/html. And it still only has that single use in our tree. A UA sheet applying this property to content it doesn't control doesn't seem like it could be very useful.

Even those these checks are simple they are relatively costly because we check them on every frame and when we are traversing the frame tree (for display list building or setting a displayport) we are often memory bound, so pulling in another bit of otherwise cold memory for a rare style struct makes us wait for loading more memory and pushes more useful stuff out of caches. The parent process check remains very quick as verified by profiling.

Differential Revision: https://phabricator.services.mozilla.com/D231648
2024-12-11 09:35:37 +00:00
Timothy Nikkel
342427dbca Bug 1933423. Only create nsDisplayFixedPosition if painting to the window. r=botond
The only thing that useFixedPosition controls is whether we create a nsDisplayFixedPosition item. The only things that nsDisplayFixedPosition does different are things that only affect painting to the window (CreateWebRenderCommands, UpdateScrollData, ShouldGetFixedAnimationId).

I don't think this causes any behaviour difference, but we only need a nsDisplayFixedPosition item if we are painting to the window.

Differential Revision: https://phabricator.services.mozilla.com/D230243
2024-12-07 11:26:11 +00:00
Daniel Holbert
bec95b2ab5 Bug 1935547 part 2: Introduce a "ComputeStretchContentBoxSize" helper to use in places where we're resolving something like the 'stretch' keyword. r=layout-reviewers,emilio
This patch doesn't change behavior[1]; it's just a refactor.

[1] Minor caveat: the "availBased" variables in this patch are now floored-to-0
whereas previously they were not.  In cases where these variables weren't
getting seprately-clamped, this is a bit of a behavior-change, but it's a step
towards correctness to floor this size-measurement to be nonnegative.

Differential Revision: https://phabricator.services.mozilla.com/D230228
2024-12-06 08:03:15 +00:00
Daniel Holbert
1072365adc Bug 1935547 part 1: Rename several "bool stretch" vars to clarify that they're about the alignment keyword and not the sizing keyword. r=layout-reviewers,emilio
This is just a variable rename to help avoid ambiguity when we add support for
the 'stretch' size keyword. This has no functional change.

Differential Revision: https://phabricator.services.mozilla.com/D230227
2024-12-06 08:03:15 +00:00
Jan-Niklas Jaeschke
32b0a740b7 Bug 1933738, part 2 - Change all calls to nsFrameSelection::GetSelection(eNormal) to nsFrameSelection::NormalSelection(). r=emilio
`nsFrameSelection::NormalSelection()` returns a `Selection&`, which eliminates the need for nullptr check at call sites.
This simplifies the code in some places and removes unnecessarily indented blocks.

Differential Revision: https://phabricator.services.mozilla.com/D230583
2024-11-29 07:31:58 +00:00
Emilio Cobos Álvarez
539611ead9 Bug 1931301 - Notify of removals on a stable state, not mid-remove. r=smaug,masayuki,dshin
This simplifies some observers, and makes others a bit more subtle, but I think
over-all it is an improvement.

Differential Revision: https://phabricator.services.mozilla.com/D229008
2024-11-26 09:39:52 +00:00
Jonathan Kew
55066c9ce0 Bug 1887465 - Introduce UsedFloat and UsedClear types in layout, for the used values of CSS float and clear properties after resolving logical values. r=layout-reviewers,emilio
No change in behavior, just makes it clearer when we're working with used values
where the inline-* logical values have been resolved.

Differential Revision: https://phabricator.services.mozilla.com/D230029
2024-11-25 22:58:47 +00:00
Jonathan Kew
0813b3e111 Bug 1887465 - Use the containing block's writing mode to resolve logical values for CSS float and clear properties. r=layout-reviewers,emilio
And don't resolve them prematurely; the computed value should remain
logical, and only be mapped to physical sides at use time.

Differential Revision: https://phabricator.services.mozilla.com/D229998
2024-11-25 22:58:46 +00:00
Sandor Molnar
4edbb82211 Backed out changeset 3d4472548fb9 (bug 1931301) for causing assertion failures @ Document.cpp 2024-11-25 23:06:55 +02:00
Emilio Cobos Álvarez
a9411f45b2 Bug 1933230 - Remove unused -moz-window-transform-origin property. r=devtools-reviewers,jwatt
The only transforms we use are translation transforms which don't
change, so we can just remove it.

Differential Revision: https://phabricator.services.mozilla.com/D230128
2024-11-25 19:44:02 +00:00
Emilio Cobos Álvarez
0651582f86 Bug 1931301 - Notify of removals on a stable state, not mid-remove. r=smaug,masayuki,dshin
This simplifies some observers, and makes others a bit more subtle, but I think
over-all it is an improvement.

Differential Revision: https://phabricator.services.mozilla.com/D229008
2024-11-25 17:58:40 +00:00
Alexandru Marc
ed1511635d Backed out 2 changesets (bug 1887465) for causing build bustages @ WritingModes.h . CLOSED TREE
Backed out changeset 5203c09eceb4 (bug 1887465)
Backed out changeset 0507fcccf575 (bug 1887465)
2024-11-25 18:47:23 +02:00
Jonathan Kew
4d1ec66bf7 Bug 1887465 - Introduce UsedFloat and UsedClear types in layout, for the used values of CSS float and clear properties after resolving logical values. r=layout-reviewers,emilio
No change in behavior, just makes it clearer when we're working with used values
where the inline-* logical values have been resolved.

Differential Revision: https://phabricator.services.mozilla.com/D230029
2024-11-25 14:02:27 +00:00
Jonathan Kew
64fa9b6bb6 Bug 1887465 - Use the containing block's writing mode to resolve logical values for CSS float and clear properties. r=layout-reviewers,emilio
And don't resolve them prematurely; the computed value should remain
logical, and only be mapped to physical sides at use time.

Differential Revision: https://phabricator.services.mozilla.com/D229998
2024-11-25 14:02:26 +00:00
Emilio Cobos Álvarez
96b969dae6 Bug 1933094 - Remove nsIFrame::GetAncestorWithView. r=dholbert
It's unused.

Differential Revision: https://phabricator.services.mozilla.com/D230052
2024-11-25 00:09:12 +00:00