Commit graph

614 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
52d097c513 Bug 1851868 - Refactor nsIFrame::Destroy to pass a single DestroyContext parameter. r=dholbert
This shouldn't change behavior, but it packs the two arguments to
DestroyFrom into a single thing, and makes nsIFrame::Destroy not so easy
to call without a previous context.

This is a prerequisite to pass aDestroyContext to various things that
right now just mint one, which can cause badness, see bug 1851787 and
related bugs.

It's also a bit nicer to add things there if we need to in the future.

Differential Revision: https://phabricator.services.mozilla.com/D187578
2023-09-07 11:46:30 +00:00
Narcis Beleuzu
77ba6cde90 Backed out changeset 55052ae7d067 (bug 1851868) for reftest failure on 1153695.html . CLOSED TREE 2023-09-07 02:42:25 +03:00
Emilio Cobos Álvarez
59766eeba4 Bug 1851868 - Refactor nsIFrame::Destroy to pass a single DestroyContext parameter. r=dholbert
This shouldn't change behavior, but it packs the two arguments to
DestroyFrom into a single thing, and makes nsIFrame::Destroy not so easy
to call without a previous context.

This is a prerequisite to pass aDestroyContext to various things that
right now just mint one, which can cause badness, see bug 1851787 and
related bugs.

It's also a bit nicer to add things there if we need to in the future.

Differential Revision: https://phabricator.services.mozilla.com/D187578
2023-09-06 22:34:35 +00:00
Narcis Beleuzu
1b73f006e1 Backed out changeset 69bb261fbdce (bug 1851094) for bustages on nsGridContainerFrame.cpp . CLOSED TREE 2023-09-02 05:57:52 +03:00
Gregory Pappas
664645011b Bug 1851094 - Remove layout.css.grid-item-baxis-measurement.enabled pref r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D187250
2023-09-02 02:19:04 +00:00
CanadaHonk
e115104963 Bug 1846853 - Clamp negative outline-offset per spec r=emilio
A negative outline-offset value should be clamped per spec as to stop it
from becoming invisible with large negative values.

Spec ref: https://www.w3.org/TR/css-ui-4/#outline-offset

Also added a new WPT reftest for this case as no tests existed prior,
updated related WPT expectations, and updated a few old layout reftests.

Differential Revision: https://phabricator.services.mozilla.com/D185357
2023-08-23 11:35:01 +00:00
Stanca Serban
add4a8a76d Backed out changeset 337531b04603 (bug 1846853) for causing reftests failures. CLOSED TREE 2023-08-23 05:01:39 +03:00
CanadaHonk
3abfdd94e9 Bug 1846853 - Clamp negative outline-offset per spec r=emilio
A negative outline-offset value should be clamped per spec as to stop it
from becoming invisible with large negative values.

Spec ref: https://www.w3.org/TR/css-ui-4/#outline-offset

Also added a new WPT reftest for this case as no tests existed prior,
updated related WPT expectations, and updated an old layout reftest.

Differential Revision: https://phabricator.services.mozilla.com/D185357
2023-08-23 00:59:43 +00:00
Narcis Beleuzu
f1e33ff941 Backed out changeset 959c2f0abc19 (bug 1846853) for reftest failures on outline-013.html & 424236-5.html . CLOSED TREE 2023-08-23 02:16:13 +03:00
CanadaHonk
58f43c26c7 Bug 1846853 - Clamp negative outline-offset per spec r=emilio
A negative outline-offset value should be clamped per spec as to stop it
from becoming invisible with large negative values.

Spec ref: https://www.w3.org/TR/css-ui-4/#outline-offset

Also added a new WPT reftest for this case as no tests existed prior.

Differential Revision: https://phabricator.services.mozilla.com/D185357
2023-08-22 22:07:43 +00:00
Cathie Chen
ab3d8905aa Bug 1829016 - The size of content-visibility auto does not refresh when its content changes, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183414
2023-08-08 18:19:18 +00:00
Jan-Niklas Jaeschke
12f5099c54 Bug 1838262, part 3: Removed ServoStyleSet::ProbeHighlightPseudoElementStyle(). r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D184709
2023-07-31 13:47:55 +00:00
Jan-Niklas Jaeschke
c84288a36d Bug 1838262, part 2: Implemented getComputedStyle() for custom highlight api. r=emilio
This patch introduces functional pseudo parameters, i.e. `::highlight(foo)`,
for `getComputedStyle()`. This required adapting the parse algorithm (`nsCSSPseudoElements::ParsePseudoElement()`) and forwarding the functional pseudo parameter into the style engine.

Differential Revision: https://phabricator.services.mozilla.com/D183773
2023-07-31 13:47:54 +00:00
Emilio Cobos Álvarez
7bf3b0e527 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-26 06:46:32 +00:00
Iulian Moraru
251fc5e9ee Backed out changeset a86390266ae9 (bug 1829016) for causing wr failures on content-visibility-085.html. 2023-07-26 04:01:42 +03:00
Iulian Moraru
0c0945174b Backed out changeset f3394bd0f554 (bug 1844195) for causing conflicts with another backout. 2023-07-26 04:00:57 +03:00
Emilio Cobos Álvarez
e56bda6fd8 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-25 21:14:39 +00:00
Morgan Rae Reschenberg
dc7d564db1 Bug 1837496: NotifyOfPossibleBoundsChange when display list changes are observed, instead of during reflow/in SetPosition r=Jamie,emilio
Differential Revision: https://phabricator.services.mozilla.com/D184275
2023-07-25 20:42:21 +00:00
Iulian Moraru
da43d00caa Backed out changeset 3a3f2d5937c4 (bug 1844195) for causing mass failures. CLOSED TREE 2023-07-25 23:07:30 +03:00
Emilio Cobos Álvarez
c70814ab25 Bug 1844195 - Avoid duplicating rust and C++ display definitions. r=layout-reviewers,jfkthame
We need to inline Self::new() so cbindgen generates the constants, which
is kinda lame, but seems better than duplicating the values and type
definitions.

Differential Revision: https://phabricator.services.mozilla.com/D183921
2023-07-25 18:40:30 +00:00
Cathie Chen
218332994f Bug 1829016 - The size of content-visibility auto does not refresh when its content changes, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183414
2023-07-25 16:45:10 +00:00
Cathie Chen
b2f8b4fa60 Bug 1816474 - Assertion failure: IsHiddenByContentVisibilityOfInFlowParentForLayout() in nsIFrame.cpp, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D182805
2023-07-17 14:46:10 +00:00
Rob Buis
1a5792f5ac Bug 1835813 - support contain-intrinsic-size: auto none r=Oriol,emilio,devtools-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D182462
2023-07-11 18:23:26 +00:00
Iulian Moraru
33c0086ecb Backed out changeset e1b5dd2da037 (bug 1835813) for causing multiple failures. 2023-07-05 16:34:47 +03:00
Rob Buis
44206e341c Bug 1835813 - support contain-intrinsic-size: auto none r=Oriol,emilio
Differential Revision: https://phabricator.services.mozilla.com/D182462
2023-07-05 11:48:16 +00:00
Boris Chiou
99508a94f6 Bug 1598156 - Part 6: Build path for basic shapes. r=emilio
Basically, the fuzzy happens because the direction angle in circle(),
ellipse(), and inset() can not be equal to the degree perfectly (due to
the arc drawing implementation and the anti-alias around the element),
so we need some tolerance.

And drop offset-path-shape(-ref).html because it has been removed from
the upstream repo.

Differential Revision: https://phabricator.services.mozilla.com/D179630
2023-06-26 23:23:55 +00:00
Boris Chiou
48208132f5 Bug 1598156 - Part 5: Add some helper functions to check the type of StyleOffsetPath. r=emilio
The data structure of StyleOffsetPath is complicated, so adding some
useful functions to simplify the code.

No behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D181316
2023-06-26 23:23:55 +00:00
Emilio Cobos Álvarez
4cc6758558 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00
Boris Chiou
38cbd14258 Bug 1837305 - Part 4: Update OffsetPath to use BasicShape in style system. r=devtools-reviewers,emilio
We rewrite the data structure of OffsetPath to support all basic shapes.
However, We don't build the gfx::Path for basic shapes other than path()
for now because the current caching mechanism (on the main thread) doesn't
work for basic shapes. It's layout dependent.

Note:
1. Update offset-path-interpolation-006.html to make sure the start value
   and the end value have `at <position>`. `offset-path` doesn't set center
   as default for `at <position>`, so if any of the values omits the
   `at <position>`, we expect they are not interpolated in Gecko.
   This is different from Blink, they still use center as the default value
   for interpolation.
2. We still have some failures in offset-path-interpolation-006.html
   beacuse we don't clamp the negative radius/radii and the negative
   border-radius. We will handle it in the following patches.
3. We will add `<coord-box>` in the later patch.
4. Adding Deserialize and Serialize is necessary for compositor
   animations.

Differential Revision: https://phabricator.services.mozilla.com/D179627
2023-06-15 00:03:59 +00:00
James Teh
ca6c4a3c4f Bug 1821951 part 2: Remove PeekOffsetOption::AllowContentInDifferentNativeAnonymousSubtreeRoot. r=eeejay,masayuki,taskgraph-reviewers,bhearsum
This was only added for a11y and a11y no longer needs it.
Note that the code in Mac HyperTextAccessibleWrap which used this is no longer used itself and will be removed in bug 1821965.

Differential Revision: https://phabricator.services.mozilla.com/D177745
2023-05-21 10:15:05 +00:00
David Shin
267a479339 Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-17 12:56:54 +00:00
Sandor Molnar
71c2b3db49 Backed out 3 changesets (bug 1809568) for causing build bustages in layout/generic/nsLineLayout.cpp CLOSED TREE
Backed out changeset 6c5bbcbafce9 (bug 1809568)
Backed out changeset b518133a5c34 (bug 1809568)
Backed out changeset 2407088e9b49 (bug 1809568)
2023-05-17 01:34:42 +03:00
David Shin
1eefa9a516 Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-16 20:48:18 +00:00
Emily McDonough
866896112c Bug 1828020 - Remove the layout.css.named-pages.enabled pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175438
2023-05-16 20:32:11 +00:00
Sandor Molnar
a50a2052fe Backed out 3 changesets (bug 1809568) for causing node devtools failures in devtools/client/debugger/src/components/test/QuickOpenModal.spec.js CLOSED TREE
Backed out changeset 56ce741da8f5 (bug 1809568)
Backed out changeset 5a91ce4870e4 (bug 1809568)
Backed out changeset cc00422f050a (bug 1809568)
2023-05-16 22:22:31 +03:00
David Shin
30a10fdbc6 Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-16 19:02:11 +00:00
Cristian Tuns
4d57ea669d Backed out 3 changesets (bug 1809568) for causing build bustages on nsLineLayout.cpp CLOSED TREE
Backed out changeset e862b1560caa (bug 1809568)
Backed out changeset 0a20b91de67b (bug 1809568)
Backed out changeset 6060fc7d49d4 (bug 1809568)
2023-05-15 13:03:03 -04:00
David Shin
c4f2c2237b Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-15 14:34:26 +00:00
Timothy Nikkel
656beaee18 Bug 1832684. Skip nsIFrame::SchedulePaint when painting is suppressed. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D177981
2023-05-15 04:46:42 +00:00
Timothy Nikkel
390a1bd6f0 Bug 1832678. Avoid InitCBReflowInput's call to nsIFrame::GetContainingBlock, if our parent frame could not possibly be a containing block. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D177866
2023-05-13 21:16:50 +00:00
Timothy Nikkel
be1395ebbe Bug 1832678. Factor out an nsIFrame::IsBlockContainer helper. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D177941
2023-05-13 21:16:50 +00:00
Emilio Cobos Álvarez
a7526d2a34 Bug 1832173 - Finish removing HasArcFFI. r=boris
Use the actual Locked<T> types around (via a typedef, just for
convenience).

Differential Revision: https://phabricator.services.mozilla.com/D177824
2023-05-12 22:31:38 +00:00
Butkovits Atila
cc740ca292 Backed out changeset f6e3d050b3e7 (bug 1832173) for causing bustages at CanvasRenderingContext2D.cpp. CLOSED TREE 2023-05-13 01:16:03 +03:00
Emilio Cobos Álvarez
7fc0f42cee Bug 1832173 - Finish removing HasArcFFI. r=boris
Use the actual Locked<T> types around (via a typedef, just for
convenience).

Differential Revision: https://phabricator.services.mozilla.com/D177824
2023-05-12 21:37:19 +00:00
Timothy Nikkel
dad27fff5d Bug 1832685. Remove unused argument to nsIFrame::ReparentFrameViewTo. r=layout-reviewers,emilio
I checked the history, the assert has been commented out since 2000, it was added in 1999. It doesn't seem useful, all the callers basically just get the parent view right before the call.

Differential Revision: https://phabricator.services.mozilla.com/D177862
2023-05-12 20:14:56 +00:00
Cosmin Sabou
543905e105 Backed out 3 changesets (bug 1809568) for causing build bustages on nsBlockFrame.cpp. CLOSED TREE
Backed out changeset eaa7fe280317 (bug 1809568)
Backed out changeset ab0f2bcb2d9b (bug 1809568)
Backed out changeset a481bf06452b (bug 1809568)
2023-05-01 21:42:14 +03:00
David Shin
d2ebe93a83 Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-01 17:04:27 +00:00
Iulian Moraru
c9ffb3ffa8 Backed out 3 changesets (bug 1809568) for causing build bustages on nsLineLayout.cpp. CLOSED TREE
Backed out changeset 573dc0bd9554 (bug 1809568)
Backed out changeset b8401947aea0 (bug 1809568)
Backed out changeset 7ecabe895121 (bug 1809568)
2023-05-01 17:59:21 +03:00
David Shin
8ff73f5fcc Bug 1809568 - Part 2: Provide GetNaturalBaselineBOffset with baseline export context. r=emilio
Some baseline exports are context-sensitive. One example: In line-layout scenario,
the last baseline of a scroll container is always the margin-end. In other (e.g.
flex, grid) scenarios, it's the border-box clamped offset to the last line in the
container.
This enables the required 3 different behaviours for `inline-block` scroll containers
for 3 different `baseline-source` values:
- `auto`: Last baseline, margin-end
- `first`: Border-box clamped offset to the first line
- `last`: Border-box clamped offset to the last line

Differential Revision: https://phabricator.services.mozilla.com/D173886
2023-05-01 13:44:43 +00:00
Emilio Cobos Álvarez
8b5b7ad998 Bug 1827856 - Remove nativeAnonymousChildList observers. r=smaug,credential-management-reviewers,devtools-reviewers,sgalich,nchevobbe
You let me know if this seems appealing to you :)

Differential Revision: https://phabricator.services.mozilla.com/D175382
2023-04-18 14:58:34 +00:00