Commit Graph

370 Commits

Author SHA1 Message Date
David Shin
e52d21fa25 Bug 1900232: Part 5 - Add anchor-size() to sizing properties. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D222534
2024-09-23 13:58:38 +00:00
David Shin
1fad4eeb43 Bug 1900232: Part 4 - Add anchor-size() to margin properties. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D222533
2024-09-23 13:58:38 +00:00
David Shin
41f83d368b Bug 1900232: Part 2 - Create one place to shim inset getters. r=firefox-style-system-reviewers,emilio
... Instead of handling `anchor()` function at each site manually.

Differential Revision: https://phabricator.services.mozilla.com/D222531
2024-09-23 13:58:37 +00:00
David Shin
6a51a65195 Bug 1900230: Implement parsing of anchor() function in inset properties. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D220285
2024-09-10 14:11:15 +00:00
Ting-Yu Lin
a024d0e616 Bug 1914661 Part 3 - Add ReflowInput::SetBResizeForPercentages(). r=dholbert
We have `SetBResize()`, so it would be useful to add a method to set
`mIsBResizeForPercentages` flag for consistency.

Differential Revision: https://phabricator.services.mozilla.com/D220023
2024-08-23 19:52:50 +00:00
Ting-Yu Lin
dd07eb1c10 Bug 1914661 Part 2 - Remove redundant mozilla:: qualifiers in ReflowInput. r=dholbert
`ReflowInput` is already living in `mozilla` namespace.

Differential Revision: https://phabricator.services.mozilla.com/D220022
2024-08-23 19:52:50 +00:00
Ting-Yu Lin
0f3a5513f5 Bug 1905462 Part 2 - Pass a style block size and aspect-ratio into ComputeISizeValue(). r=layout-reviewers,emilio
`ComputeISizeValue()` used to take `StyleSizeOverrides`, but

This patch reflects the fact that intrinsic inline size value such as
'min-content', 'max-content', etc. can be resolved via a definite block size and
a preferred aspect-ratio.

For the callers in `nsIFrame::ComputeSize()` and
`nsContainerFrame::ComputeSizeWithIntrinsicDimensions()`, we can pass the
`styleBSize` and `aspectRatio` that have considered the size overrides.

Also, simplify `ComputeISizeValueFromAspectRatio()` so that it can be reused in
other places. We'll adapt more callers in the next part. Note that the `aFlags`
parameter is unused, so it is removed.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D215294
2024-07-01 21:26:01 +00:00
Ting-Yu Lin
ab35a66805 Bug 1901652 Part 2 - Fix hypothetical position for fixed-pos elements when scrollbar-gutters are on both edges. r=layout-reviewers,emilio
When computing a hypothetical position for a fixed-pos element, we first compute
its position relative to the nearest block container `containingBlock`, and then
get the offset between `containingBlock` and the actual fixed-pos containing
block, i.e. the ViewportFrame.

However, using the ViewportFrame's origin (0,0) is incorrect. The fixed-pos
element's origin should exclude the scrollbar or scrollbar-gutter area [1].

We've fixed the containing block's origin for ViewportFrame (bug 728807), which
is used when reflowing the fixed-pos frames. The bug fixed the fixed-pos
element's position when `inset` value is specified. In this patch, when
computing the hypothetical position, we should also adjust the offset to the
containing block's origin for ViewportFrame so that the origin doesn't include
the scrollbar-gutter area, because we'll add the containing block's origin after
we reflow the fixed-pos frame at [2]. Failing to exclude the scrollbar-gutter
will cause us to shift the fixed-pos position by the scrollbar-gutter twice if
the element does use the hypothetical position as the final position

[1] A recent CSSWG resolution changed this so that top-layer or fullscreen
fixed-pos element cover the scrollbar or scrollbar-gutter. This is bug 1874091.
[2] https://searchfox.org/mozilla-central/rev/94f839e924ba6c69f3e0d062d4c6cc4fee7cad5b/layout/generic/nsAbsoluteContainingBlock.cpp#850-853

Differential Revision: https://phabricator.services.mozilla.com/D213345
2024-06-18 04:43:27 +00:00
Ting-Yu Lin
b2ef0ad2ac Bug 1901652 Part 1 - Clean up for CalculateHypotheticalPosition. r=dholbert
Remove unused `nsPresContext` and `LayoutFrameType` parameters in
`InitAbsoluteConstraints()` and `CalculateHypotheticalPosition()` (except for
one usage in `NS_ASSERTION`).

Improve the documentation for `CalculateHypotheticalPosition()` and delete the
nearly the same documentation before its definition in ReflowInput.cpp.

In `InitAbsoluteConstraints()`, we don't need to initialize the `offsets` local
variable via `ComputedLogicalOffsets()` since this is the function computing the
offset, and we'll set the four sides of `offsets` later in the function.

Differential Revision: https://phabricator.services.mozilla.com/D213313
2024-06-18 04:43:27 +00:00
Sandor Molnar
fc33dbde1c Backed out 3 changesets (bug 1901652) for causing mochitest failures @ browser_scrollToPoint.js CLOSED TREE
Backed out changeset 24bb7e89929c (bug 1901652)
Backed out changeset 8fc6e70268be (bug 1901652)
Backed out changeset a7a4eb34e7b1 (bug 1901652)
2024-06-17 10:06:06 +03:00
Ting-Yu Lin
ce1e398f26 Bug 1901652 Part 3 - Fix hypothetical position for fixed-pos elements when scrollbar-gutters are on both edges. r=layout-reviewers,emilio
When computing a hypothetical position for a fixed-pos element, we first compute
its position relative to the nearest block container `containingBlock`, and then
get the offset between `containingBlock` and the actual fixed-pos containing
block, i.e. the ViewportFrame.

However, using the ViewportFrame's origin (0,0) is incorrect. The fixed-pos
element's origin should exclude the scrollbar or scrollbar-gutter area [1].

We've fixed the containing block's origin for ViewportFrame (bug 728807), which
is used when reflowing the fixed-pos frames. The bug fixed the fixed-pos
element's position when `inset` value is specified. In this patch, when
computing the hypothetical position, we should also adjust the offset to the
containing block's origin for ViewportFrame so that the origin doesn't include
the scrollbar-gutter area, because we'll add the containing block's origin after
we reflow the fixed-pos frame at [2]. Failing to exclude the scrollbar-gutter
will cause us to shift the fixed-pos position by the scrollbar-gutter twice if
the element does use the hypothetical position as the final position

[1] A recent CSSWG resolution changed this so that top-layer or fullscreen
fixed-pos element cover the scrollbar or scrollbar-gutter. This is bug 1874091.
[2] https://searchfox.org/mozilla-central/rev/94f839e924ba6c69f3e0d062d4c6cc4fee7cad5b/layout/generic/nsAbsoluteContainingBlock.cpp#850-853

Differential Revision: https://phabricator.services.mozilla.com/D213345
2024-06-17 02:43:02 +00:00
Ting-Yu Lin
2c1288e5ed Bug 1901652 Part 1 - Clean up for CalculateHypotheticalPosition. r=dholbert
Remove unused `nsPresContext` and `LayoutFrameType` parameters in
`InitAbsoluteConstraints()` and `CalculateHypotheticalPosition()` (except for
one usage in `NS_ASSERTION`).

Improve the documentation for `CalculateHypotheticalPosition()` and delete the
nearly the same documentation before its definition in ReflowInput.cpp.

In `InitAbsoluteConstraints()`, we don't need to initialize the `offsets` local
variable via `ComputedLogicalOffsets()` since this is the function computing the
offset, and we'll set the four sides of `offsets` later in the function.

Differential Revision: https://phabricator.services.mozilla.com/D213313
2024-06-17 02:43:01 +00:00
Ting-Yu Lin
6549711c8d Bug 1900522 Part 6 - Remove a SizeComputationInput::ComputeISizeValue() variant. r=layout-reviewers,emilio
This removed one is just forwarding the call to nsIFrame, and used internally
within ReflowInput.

While I'm here, rename local variables `inside*` and `outside*` to make them
clearer.

Differential Revision: https://phabricator.services.mozilla.com/D212509
2024-06-04 17:54:50 +00:00
Ting-Yu Lin
e31a8e2d2c Bug 1900522 Part 5 - Simplify some ComputeCBDependentValue() usages. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D212508
2024-06-04 17:54:49 +00:00
Ting-Yu Lin
e3b05621c7 Bug 1900522 Part 4 - Remove nsLayoutUtils::ComputeBSizeDependentValue(). r=layout-reviewers,emilio
`ComputeBSizeDependentValue()` is the same as `ComputeCBDependentValue()` except
for the assertion, and existing callers of it are passing containing block's
block-size, which indicates that calling `ComputeCBDependentValue()` might make
more sense.

Differential Revision: https://phabricator.services.mozilla.com/D212507
2024-06-04 17:54:49 +00:00
Ting-Yu Lin
664f41193d Bug 1866692 Part 2 - Remove ReplacedContainsBlock in LayoutFrameClassFlags. r=layout-reviewers,emilio
The `IsReplacedWithBlock()` method is used only in
`ShouldApplyOverflowClipping()`, which determines the overflow clip axes. Since
we've already enumerated the frame types that need overflow clipping, we can
just add more types that had `ReplacedContainsBlock` flag to the switch-cases
and remove the flag.

Differential Revision: https://phabricator.services.mozilla.com/D212199
2024-05-31 19:28:19 +00:00
Emilio Cobos Álvarez
6320be3e20 Bug 1897361 - Share counter-style / list-style-type representation between Servo and Gecko. r=jwatt
It's not clear to me what is going on there or what caused it. I suspect
it might be:

  https://searchfox.org/mozilla-central/rev/1f46481d6c16f27c989e72b898fd1fddce9f445f/servo/components/style/gecko/values.rs#69

Which is the only potential from_raw_parts caller there. But hard to say
without a regression range.

However I've been wanting to get rid of that code for a while, and
this is a good opportunity for that.

The WithCounterStyleNameOrSymbols stuff isn't super pretty, but it has
only two callers, and something more complicated might require further
refactoring.

Differential Revision: https://phabricator.services.mozilla.com/D210814
2024-05-19 21:24:16 +00:00
Cristian Tuns
fbb56a1610 Backed out changeset dffe004546c6 (bug 1897361) for causing reftest failures in /list-1.html CLOSED TREE 2024-05-19 17:09:47 -04:00
Emilio Cobos Álvarez
ebdae8c849 Bug 1897361 - Share counter-style / list-style-type representation between Servo and Gecko. r=jwatt
It's not clear to me what is going on there or what caused it. I suspect
it might be:

  https://searchfox.org/mozilla-central/rev/1f46481d6c16f27c989e72b898fd1fddce9f445f/servo/components/style/gecko/values.rs#69

Which is the only potential from_raw_parts caller there. But hard to say
without a regression range.

However I've been wanting to get rid of that code for a while, and
this is a good opportunity for that.

The WithCounterStyleNameOrSymbols stuff isn't super pretty, but it has
only two callers, and something more complicated might require further
refactoring.

Differential Revision: https://phabricator.services.mozilla.com/D210814
2024-05-19 19:42:38 +00:00
Ting-Yu Lin
b4a0842882 Bug 1824877 Part 3 - Change ScrollContainerFrame's type from Scroll to ScrollContainer. r=dholbert
This effectively changes the `IsScrollFrame()` helper to
`IsScrollContainerFrame()`.

Differential Revision: https://phabricator.services.mozilla.com/D210357
2024-05-15 17:50:49 +00:00
David Shin
e6ce1aa347 Bug 1892089: Support font-relative line-height units use in canvas via SVG filter. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D207871
2024-05-07 20:35:08 +00:00
David Shin
46a093dc96 Bug 1892089: Support font-relative line-height units in SVG. r=longsonr,emilio
Differential Revision: https://phabricator.services.mozilla.com/D207870
2024-05-07 20:35:08 +00:00
Ting-Yu Lin
02cf4efa58 Bug 1748891 Part 2 - Stop applying sticky offset in ReflowInput::ApplyRelativePositioning(). r=emilio
A sticky element gets its offsets computed in
`StickyScrollContainer::ComputeStickyOffsets()`, and that is invoked in
`UpdateSticky()` *after* we reflow the scrolled frame in
`nsHTMLScrollFrame::Reflow()`.

Therefore, in the initial reflow of the sticky element (where we haven't fully
reflow its scrolled frame container), `ComputePosition()` does nothing because
the elements doesn't get its offsets computed yet [2].

In an incremental reflow of a sticky element, the code can produce wrong sticky
position, because `ComputePosition()` and its helper `ComputeStickyLimits()` use
an obsoleted scrollable overflow of the scrolled frame [3] or an obsoleted
offset [4] from the last reflow. For example, in the testcases the sticky offset
has a percentage value and its basis is changed (e.g. scroll container's width
or height changed).

To summarize, computing sticky position prematurely leads to issues, and doesn't
always prevent unnecessary overflow updates, both in the initial reflow and some
incremental reflow cases. Thus, this patch removes it, and always let the scroll
container update the positions for all sticky elements.

[1] https://searchfox.org/mozilla-central/rev/6121b33709dd80979a6806ff59096a561e348ae8/layout/generic/nsGfxScrollFrame.cpp#1624
[2] To be precise, `ComputedOffsetProperty()` is not set, and will bail out in
    StickyScrollContainer::ComputeStickyLimits().
[3] https://searchfox.org/mozilla-central/rev/6121b33709dd80979a6806ff59096a561e348ae8/layout/generic/StickyScrollContainer.cpp#198
[4] https://searchfox.org/mozilla-central/rev/6121b33709dd80979a6806ff59096a561e348ae8/layout/generic/StickyScrollContainer.cpp#161-162

Differential Revision: https://phabricator.services.mozilla.com/D208172
2024-04-25 23:32:46 +00:00
Cjm531
abac0e51ec Bug 1885695 - Change LogicalEdge to an enum class and change its variants names. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D206265
2024-04-15 20:19:47 +00:00
Ting-Yu Lin
125e604108 Bug 1888535 Part 2 - Remove DISPLAY_INIT_CONSTRAINTS and DISPLAY_INIT_OFFSETS. r=layout-reviewers,emilio
The two macros are only used in ReflowInput.cpp, which are to print margin,
border, padding, available sizes, and other computed sizes in ReflowInput. The
information can be replaced by adding local printf or via `rr` if there are
debug needs.

Note: `ReflowInput::DisplayInitFrameTypeEnter` and
`ReflowInput::DisplayInitFrameTypeExit` have been removed in
https://hg.mozilla.org/mozilla-central/rev/429a4d022ade

Differential Revision: https://phabricator.services.mozilla.com/D206314
2024-04-02 19:03:03 +00:00
sid
568f27d168 Bug 1825386 - Converted LogicalAxis to enum class and type casted where necessary. r=TYLin
LogicalAxis is one of the Logical* enums. Converting it from enum to
enum class increases type safety. To run with the pre-existing code,
type casting was added when needed. Comments have been edited where
needed.

Differential Revision: https://phabricator.services.mozilla.com/D206108
2024-03-30 16:20:37 +00:00
Emilio Cobos Álvarez
f3b7608278 Bug 1740580 - Align shrink-wrap behavior of semi-replaced elements with the spec. r=dholbert,layout-reviewers
The removed reftsts test basically the opposite, and are sufficiently
covered by the WPTs that we start passing, so just remove them.

Differential Revision: https://phabricator.services.mozilla.com/D204797
2024-03-23 15:14:20 +00:00
Ting-Yu Lin
5cec51111c Bug 1877850 Part 2 - Rewrite ComputedSizeAsContainerIfConstrained() using logical coordinates, and use it in BlockReflowState. r=dholbert
This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D200238
2024-02-01 22:02:01 +00:00
Emilio Cobos Álvarez
ecf9232962 Bug 1876745 - Fix a drive-by bug in ReflowInput::SetComputedBSize. r=dholbert
We were not using the aFlags argument.

Differential Revision: https://phabricator.services.mozilla.com/D199860
2024-01-29 21:32:12 +00:00
Ting-Yu Lin
6a88499867 Bug 1350037 Part 3 - Prevent table caption from honoring justify-*/align-* when table is a grid item. r=dholbert
The old code used to apply ShrinkWrap flag to both the inner table and the
caption if the table wrapper is a stretched grid item. However, per analysis in
bug 1350037 comment 4, when we reflow table captions, we'd like it *not* to
shrink-wrap, but to stretch its inline-size to at least as wide as the inner
table frame [1].

This patch moves the logic that computes whether a table is a stretched grid
item from `ReflowInput` to `nsTableWrapperFrame`, and apply the `ShrinkWrap`
flag to inner table if needed.

[1] https://searchfox.org/mozilla-central/rev/54d6d78c3b33c92fd9eef9c0555a153bf8e4f2b4/layout/tables/nsTableWrapperFrame.cpp#760-763

Differential Revision: https://phabricator.services.mozilla.com/D196705
2023-12-18 22:12:43 +00:00
Ting-Yu Lin
9cf9e5292b Bug 1869722 Part 2 - Remove the special case adding ShrinkWrap flag for flex items. r=dholbert
We can pass `ComputeSizeFlag::ShrinkWrap` flag when creating the `ReflowInput`
for a flex item. It is maybe more verbose, but less of the magic flex logic
hidden in `ReflowInput`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D196258
2023-12-13 22:50:36 +00:00
Ting-Yu Lin
ddf5d31d31 Bug 1869722 Part 1 - Cleanup after fixing tables as flex items. r=dholbert
Flex containers do not need the `alignCB` tweak for table frames in
`ReflowInput::InitConstraints`, so I remove the comment, and improve it so that
we don't need to call `alignCB->GetParent()` multiple times.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D196257
2023-12-13 22:50:36 +00:00
Ting-Yu Lin
a14d059181 Bug 1867784 - Force reflow all kids in the last column balancing reflow. r=layout-reviewers,dholbert
The bug occurs because some abspos children are split, but not being reflowed
again in the last column balancing reflow where the available block-size of the
last column might be unconstrained.

This patch makes the callers utilizing `ReflowInput::ShouldReflowAllKids()`
always reflow in the last column balancing reflow to ensure the correctness of
the layout.

Note: the `mIsInLastColumnBalancingReflow` flag is inheriting from parent to
child reflow input, but it will stop at the nested `nsColumnSetFrame` because
the nested one will create its own `ReflowConfig::mIsLastBalancingReflow` and
assign that flag when creating the reflow input for the children.

Differential Revision: https://phabricator.services.mozilla.com/D195945
2023-12-10 03:16:55 +00:00
Ting-Yu Lin
709aec26cb Bug 1744363 Part 4 - Allow flex item's block-size to grow in fragmented context. r=dholbert
A flex item's block-size may grow as a result of fragmentation. If we detect its
block-size is allowed to grow, then we use 'auto' block-size in the
`StyleSizeOverrides` when creating a ReflowInput, and treat its original
block-size as the min-size (as a lower bound).

Differential Revision: https://phabricator.services.mozilla.com/D188532
2023-12-06 05:16:51 +00:00
Emilio Cobos Álvarez
c27730d3df Bug 1364813 - Remove IsFrameOfType, use non-virtual checks. r=jwatt
Extend the per-frame-class bit we have to devirtualize IsLeaf to also
devirtualize IsFrameOfType. That is, move this data to FrameClasses.py.

This was done by going through all the frame classes, trying to preserve
behavior.

The only quirky thing is that I had to add two more trivial frame
classes, `nsAudioFrame` for audio elements, and
`nsFloatingFirstLetterFrame`. That's because these frame classes were
returning different answers at runtime, but they do this only on
conditions that trigger frame reconstruction (floating, and being an
audio element, respectively).

Differential Revision: https://phabricator.services.mozilla.com/D194703
2023-11-26 22:17:28 +00:00
Emilio Cobos Álvarez
a848dfb8b5 Bug 1859186 - Simplify some frame property usage. r=TYLin
The border property is just useless, we only use it to store stuff
across border style changes, which makes zero sense because we clear it
when we start reflowing.

Differential Revision: https://phabricator.services.mozilla.com/D191177
2023-10-18 23:18:58 +00:00
David Shin
01d5729999 Bug 1855730: Move line-height from text to font style struct. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D189521
2023-09-28 20:07:49 +00:00
Emily McDonough
3debfe816d 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
Timothy Nikkel
77af343b53 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
Ting-Yu Lin
afdbeac05d Bug 1831976 - Fix typos in comments regarding CSS named pages pref. r=dholbert
Replace underscore with hyphen in the pref name.

Differential Revision: https://phabricator.services.mozilla.com/D177421
2023-05-09 00:10:44 +00:00
Robert Longson
40b6dc20e5 Bug 1826001 - Change SVGUtils::IsInSVGTextSubtree into a member function on nsIFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D174375
2023-04-02 21:17:07 +00:00
Ting-Yu Lin
d705127c5c Bug 1825434 - Use containing block's inline-size as percentage basis when computing abspos hypothetical position. r=AlaskanEmily
The containing block's block-size (`blockContentSize.BSize(wm)`) can be
unconstrained if the block has `position:relative` at the time we call the
`CalculateBorderPaddingMargin()`. That triggers the warning further down in the
stack in `ComputeCBDependentValue`.

However, the percentage margin and padding should resolve against the containing
block's inline-size rather than the block-size. Hence this patch.

Differential Revision: https://phabricator.services.mozilla.com/D174340
2023-04-01 04:48:53 +00:00
Emilio Cobos Álvarez
09eaf2464a Bug 1824957 - Remove a bunch of now completely dead XUL layout code. r=layout-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,TYLin
And some related tests.

A bunch of -moz-box* properties are web exposed, so I'll file a
follow-up for hiding them.

Differential Revision: https://phabricator.services.mozilla.com/D173819
2023-03-29 21:23:55 +00:00
Emilio Cobos Álvarez
8a25b72558 Bug 1824489 - Remove nsBoxFrame, nsBoxLayout and related code. r=jwatt
We still have some remnants of XUL layout due to nsBox / nsLeafBoxFrame
which XUL trees / nsTextBoxFrame still use.

However all this code can go away before we get rid of those.
nsSplitterFrame was the last thing inheriting from nsBoxFrame.

Differential Revision: https://phabricator.services.mozilla.com/D173601
2023-03-27 23:25:42 +00:00
Emilio Cobos Álvarez
b1c2429308 Bug 1600542 - Remove redundant parens in ReflowInput. r=layout-reviewers,tlouw
Just minor nit I noticed while going through the code.

Depends on D172873

Differential Revision: https://phabricator.services.mozilla.com/D172874
2023-03-20 16:42:52 +00:00
Emily McDonough
3818705116 Bug 1816570 - Clear ReflowInput's mCanHaveClassABreakpoints for subtrees that have out-of-flow roots. r=dholbert
The expectations in page-name-propagated-003.html have turned out to be wrong
now that we have more correct abspos support.

We also need to check for placeholders in block reflow to actually support
named pages causing breakpoints where in-flow frames meet placeholders for out-
of-frame siblings.

Differential Revision: https://phabricator.services.mozilla.com/D170821
2023-03-16 20:01:02 +00:00
Emily McDonough
bdc0924dce Bug 1804794 - Do not allow CSS named page breaks except in specific subtrees. r=dholbert
This currently only includes block frames, grid containers, and flex
containers, and the document and pagination frames. It is possible more frames
will need to be added or more advanced checks in the future.

This adds some related tests to ignoring some subtrees, but are expected fails
until bug 1816570 is fixed.

Differential Revision: https://phabricator.services.mozilla.com/D169018
2023-02-22 23:49:51 +00:00
Butkovits Atila
b05456d143 Backed out changeset 70a0f82267f1 (bug 1804794) for causing build bustages at ReflowInput.cpp. CLOSED TREE 2023-02-22 06:48:12 +02:00
Emily McDonough
a392943602 Bug 1804794 - Do not allow CSS named page breaks except in specific subtrees. r=dholbert
This currently only includes block frames, grid containers, and flex
containers, and the document and pagination frames. It is possible more frames
will need to be added or more advanced checks in the future.

This adds some related tests to ignoring some subtrees, but are expected fails
until bug 1816570 is fixed.

Differential Revision: https://phabricator.services.mozilla.com/D169018
2023-02-22 02:29:31 +00:00
Emilio Cobos Álvarez
66ce020e08 Bug 1814626 - Expose line-height resolution to style, and use it from ToResolvedValue. r=jfkthame
For ToResolvedValue implementation purposes we wouldn't need to split
out the vertical / font / line-height arguments and we could just pass
around the ComputedStyle, but the lh unit would need that distinction,
(because computing lh on font properties should use the parent style).

Differential Revision: https://phabricator.services.mozilla.com/D168705
2023-02-14 22:36:31 +00:00