497 Commits
Author SHA1 Message Date
Ting-Yu Lin 34834f4591 Bug 2033342 - Remove layout.abspos.fragmentainer-aware-positioning.enabled preference. r=layout-reviewers,dshin
The pref was enabled by default in bug 2002115 and shipped in Firefox 151. Since
it has been two releases, we can remove it to simplify the code path.

Differential Revision: https://phabricator.services.mozilla.com/D302349
2026-05-25 18:30:20 +00:00
serge-sans-paille d12845e8cc Bug 2037577 - Deduplicate implementation of MarkPrincipalChildrenDirty(...) r=layout-reviewers,emilio
Same implementation over two different compilation units advocate for
promotion to a method.

This also prevents conflicts in the generalization of unified build.

Differential Revision: https://phabricator.services.mozilla.com/D298968
2026-05-07 07:49:19 +00:00
Eugeniusz Lewandowski fc8097fcc3 Bug 1650944 - Remove ReflowInput.h include from nsIFrame.h r=firefox-style-system-reviewers,layout-reviewers,emilio
Removed the Reflow Input in nsIFrame. Added includes for ReflowInput as
necessary in cpp files. Also Forward Declared nsLineLayout in 3 header
files.

Differential Revision: https://phabricator.services.mozilla.com/D298203
2026-05-04 12:06:23 +00:00
Eugeniusz Lewandowski 6a11c5d881 Bug 2036580 - Move BreakType definition out of ReflowInput class r=dholbert,layout-reviewers
Moved ReflowInput::BreakType enumuration outside ReflowInput class to mozilla::BreakType, and refactored the functions using it to reflect the change.

Differential Revision: https://phabricator.services.mozilla.com/D298034
2026-05-03 02:16: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
Ting-Yu Lin 04b46f1dcc Bug 2009647 Part 1 - Rename mIsInColumnMeasuringReflow to mIsInFragmentainerMeasuringReflow. r=layout-reviewers,dshin
This renames the measuring reflow flag to use "fragmentainer" terminology,
making it applicable to both multicol and printing contexts. This doesn't change
behavior.

Differential Revision: https://phabricator.services.mozilla.com/D284549
2026-02-25 05:20:34 +00:00
Emilio Cobos Álvarez 30b7a3d89a Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.

This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.

But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.

Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.

Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.

This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.

Differential Revision: https://phabricator.services.mozilla.com/D282076
2026-02-06 07:39:54 +00:00
Norisz Fay 27f4694604 Revert "Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika" for causing bustage @ ElementAnimationData.h
This reverts commit c70290c619.
2026-02-06 05:34:42 +00:00
Emilio Cobos Álvarez c70290c619 Bug 2014922 - Untangle pseudo-element and anon box definitions. r=firefox-style-system-reviewers,xpcom-reviewers,layout-reviewers,dshin,nika
I looked at this because in bug 2014331 I need to mark more pseudos as
element-backed, and it's kinda silly the state our setup is in right
now.

This is all a somewhat historical mess, because in the old style system
pseudo-elements were just atoms, and we had that different types of atom
setup. The source of truth for these right now lives in a header macro
file, which isn't very flexible.

But now we have PseudoStyleType which represents both pseudos and anon
boxes, and is similar to the rust side PseudoElement enum.

Plus, the ::-moz-tree pseudo-elements are defined as anon boxes which
doesn't make any sense, so move them to pseudo-elements while at it.

Unify this in a similar way we treat CSS properties: Source of truth is
in pseudo_elements.toml / anon_boxes.toml, and we generate Rust and C++
as needed. This allows removing the nsStaticAtom subclass thing from
XPCOM, too.

This avoids some nasty duplication around which pseudos are pref-gated
and what not as well.

Differential Revision: https://phabricator.services.mozilla.com/D282076
2026-02-06 03:42:45 +00:00
Ting-Yu Lin 24952a4927 Bug 2011944 - Use available inline-size to resolve percentage column-gap in multicol. r=layout-reviewers,emilio
Similar to previous patch, percentage column-gap should be resolved against
`availableContentISize`, which is the content-box inline-size of
`ColumnSetWrapperFrame`.

Quote the spec text https://drafts.csswg.org/css-align/#gap-percent,

```
gap always resolves percentages against the corresponding size of the content
box of the element.
```

Differential Revision: https://phabricator.services.mozilla.com/D280192
2026-01-26 21:48:37 +00:00
Ting-Yu Lin 7406dab054 Bug 2011944 - Use available inline-size to compute column-width in multicol. r=layout-reviewers,emilio
TL;DR: When computing the inline-size of each column (the `-moz-column-content`
anonymous block under `nsColumnSetFrame`) in `ChooseColumnStrategy()`, it is
sufficient to use the available inline-size that `ColumnSetWrapperFrame` passes
down. Considering the computed inline-size can be wrong in an edge case
described below.

Details:

The used inline-size of `nsColumnSetFrame` is computed from the union of
every *non-empty* columns [1]. A column content is considered empty if it
contains only overflow containers. For example, a very short absolute containing
block (absCB) may contain a tall abspos element that fragments over several
columns. If the absCB fits in the first column, its remaining continuations
become overflow containers (with zero block-size) holding the rest of the tall
abspos continuations. In that case, an `nsColumnSetFrame` with two columns ends
up with a final used inline-size of only one column wide, because the second
column is considered empty.

Now suppose this `nsColumnSetFrame` is itself inside a nested multicol
structure, and needs to be fragmented. When reflowing the `nsColumnSetFrame`
continuations, we override their *computed* inline-size with their
prev-continuation's inline-size [2]. Thus, its computed inline-size is also one
column wide, which by itself is fine. However, if we use that narrower
inline-size to compute the column width, each column content's width becomes
half a column wide, which is wrong.

Instead, it is sufficient to use just the available inline-size passed down by
`ColumnSetWrapperFrame` to determine the used column width.

[1] https://searchfox.org/firefox-main/rev/897ad323744cc6d3afe39845cfb94b015e9f65a0/layout/generic/nsColumnSetFrame.cpp#760,923
[2] https://searchfox.org/firefox-main/rev/897ad323744cc6d3afe39845cfb94b015e9f65a0/layout/generic/nsContainerFrame.cpp#906-912

Differential Revision: https://phabricator.services.mozilla.com/D280191
2026-01-26 21:48:34 +00:00
Ting-Yu Lin ec3d2fe6b4 Bug 1994346 - Push abspos first-in-flow to next absCB continuation if it doesn't fit. r=layout-reviewers,dholbert,dshin
This patch implements the fragmentainer-aware positioning for abspos elements in
multicol. High-level changes include:

- Store abspos element's unfragmented position in
  `nsIFrame::UnfragmentedPositionProperty`.
- Add a measuring reflow phase in `nsColumnSetFrame` to compute abspos element's
  unfragmented position.
- Track cumulative containing block size across fragmentainer continuations.
- Adjust positioning logic with UnfragmentedPositionProperty().

A similar support for printing scenario is tracked in Bug 2009647.

Differential Revision: https://phabricator.services.mozilla.com/D276582
2026-01-23 04:18:11 +00:00
Sandor Molnar 09ea4ac109 Revert "Bug 1994346 - Add addition WPT for abspos fragmentation. r=dholbert" for causing WR failures
This reverts commit 2cead8c0d6.

Revert "Bug 1994346 - Adjust existing test expectations. r=layout-reviewers,dshin,dholbert"

This reverts commit 527178ed44.

Revert "Bug 1994346 - Push abspos first-in-flow to next absCB continuation if it doesn't fit. r=layout-reviewers,dholbert,dshin"

This reverts commit 8ccca3d28a.
2026-01-22 17:48:35 +00:00
Ting-Yu Lin 8ccca3d28a Bug 1994346 - Push abspos first-in-flow to next absCB continuation if it doesn't fit. r=layout-reviewers,dholbert,dshin
This patch implements the fragmentainer-aware positioning for abspos elements in
multicol. High-level changes include:

- Store abspos element's unfragmented position in
  `nsIFrame::UnfragmentedPositionProperty`.
- Add a measuring reflow phase in `nsColumnSetFrame` to compute abspos element's
  unfragmented position.
- Track cumulative containing block size across fragmentainer continuations.
- Adjust positioning logic with UnfragmentedPositionProperty().

A similar support for printing scenario is tracked in Bug 2009647.

Differential Revision: https://phabricator.services.mozilla.com/D276582
2026-01-22 13:58:15 +00:00
Emilio Cobos Álvarez 4bbf8598d1 Bug 1998125 - Remove a lot of now unused view code. r=layout-reviewers,firefox-style-system-reviewers,dshin
No need to reposition views during layout and so on, now that we don't
use views for either popups nor subdocuments.

No need for nsView to have parent / sibling / children either.

Differential Revision: https://phabricator.services.mozilla.com/D271205
2025-11-12 01:53:45 +00:00
Emilio Cobos Álvarez f786affdc7 Bug 1993353 - Remove view reparenting code that has been disabled forever. r=tnikkel,layout-reviewers
The subdocument frame caller is a no-op because nsSubdocumentFrame is a
leaf frame.

Differential Revision: https://phabricator.services.mozilla.com/D268104
2025-10-09 11:25:27 +00:00
Emilio Cobos Álvarez 67ec7b59e0 Bug 1990448 - Do content-visibility checks on the container. r=layout-reviewers,dshin
No behavior change, but this saves some per-child work and conceptually
is the right thing to do. HidesContent() is non-trivial.

Add an assertion to make sure we don't enter BuildDisplayListForChild
at all if content is hidden.

I audited all the callers, and the ones I didn't touch can't have
content-visibility (things like the viewport / pages / etc).

Differential Revision: https://phabricator.services.mozilla.com/D265956
2025-09-24 15:11:22 +00:00
Ting-Yu Lin 54c0ebf00e Bug 1927270 - Force fill columns if the current multicol's nested balancing depth exceeds the maximum. r=dshin
Currently, only a maximum of two levels of nested "balancing" multicol are
allowed. In the third or deeper levels of a multicol container that uses the
balancing behavior (`column-fill: balancing`), we don't honor the balancing
request and make it act as if `column-count: 1` is set, for performance reasons
[1].

In such scenarios, this patch sets the `mForceAuto` to `true`, allowing the
content to be laid out regardless of whether the multicol is at the top of the
page or not [2]. This prevents the indefinite creation of columns.

This change should have minimal impact on real sites, as nested multicol layouts
beyond two levels are rare.

WARNING: Opening the testcase in Firefox without this patch applied can hang the
browser.

[1] https://searchfox.org/mozilla-central/rev/ead020d3989d3e9477b353d3d117f9c0f4b16f53/layout/generic/nsColumnSetFrame.cpp#296-301
[2] https://searchfox.org/mozilla-central/rev/6b61714b224f8cdca1a48ef1c51edab027f2c09f/layout/generic/nsColumnSetFrame.cpp#650-654

Differential Revision: https://phabricator.services.mozilla.com/D233711
2025-01-09 22:16:35 +00:00
Timothy Nikkel 292af322c3 Bug 1933440. Make all display item destructors default and mark all display items final that can be. r=layout-reviewers,jfkthame
This just makes things nice and consistent and lets the compiler optimize if it can.

Differential Revision: https://phabricator.services.mozilla.com/D230249
2024-12-06 13:22:11 +00:00
Stanca Serban 834845c4d9 Backed out changeset f56fcf02db2f (bug 1929265) for causing android crashes. 2024-11-27 19:27:22 +02:00
serge-sans-paille 4f47112828 Bug 1929265 - Use std::clamp instead of min/max chain in layout/ r=emilio,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D227977
2024-11-27 16:24:21 +00:00
Jonathan Watt 7532be254f Bug 1931736. Add missing braces around if/loop statements in layout/generic/. r=layout-reviewers,emilio
Depends on D229247

Differential Revision: https://phabricator.services.mozilla.com/D229248
2024-11-17 05:03:58 +00:00
longsonr 843d861ed7 Bug 1929338 - convert more mozilla:clamped to std:clamp r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D228069
2024-11-05 18:52:41 +00:00
Ting-Yu Lin 6af05a0977 Bug 1909761 Part 2 - Create a helper struct IntrinsicSizeInput to aggregate needed data when computing intrinsic inline size. r=dholbert
This patch changes the signature to `GetMinISize()`, `GetPrefISize()`,
`IntrinsicISize` by adding a helper struct as a preparation. Then we can just
add more data such as a percentage basis to the struct without altering the
signature in the future.

When passing `IntrinsicSizeInput` struct down to another helper method, we
generally just pass the original one if the method is computing the intrinsic
size of our own or our anonymous children. If the method is computing our
children's intrinsic contribution, we'll need to create a brand new
`IntrinsicSizeInput` for our children.

Differential Revision: https://phabricator.services.mozilla.com/D219521
2024-09-03 04:25:41 +00:00
Butkovits Atila 4d06404349 Backed out 6 changesets (bug 1909761) for causing failures at test_contextmenu_rtl.xhtml. CLOSED TREE
Backed out changeset 1e9f47784a54 (bug 1909761)
Backed out changeset d2dcf159185b (bug 1909761)
Backed out changeset 3f48c106bff9 (bug 1909761)
Backed out changeset 38d1e5eda09d (bug 1909761)
Backed out changeset 8de556490289 (bug 1909761)
Backed out changeset 4e7f22f43bb4 (bug 1909761)
2024-08-28 10:44:09 +03:00
Ting-Yu Lin f0ff97db90 Bug 1909761 Part 2 - Create a helper struct IntrinsicSizeInput to aggregate needed data when computing intrinsic inline size. r=dholbert
This patch changes the signature to `GetMinISize()`, `GetPrefISize()`,
`IntrinsicISize` by adding a helper struct as a preparation. Then we can just
add more data such as a percentage basis to the struct without altering the
signature in the future.

When passing `IntrinsicSizeInput` struct down to another helper method, we
generally just pass the original one if the method is computing the intrinsic
size of our own or our anonymous children. If the method is computing our
children's intrinsic contribution, we'll need to create a brand new
`IntrinsicSizeInput` for our children.

Differential Revision: https://phabricator.services.mozilla.com/D219521
2024-08-28 06:18:44 +00:00
Jonathan Kew 25e32cfc65 Bug 1911948 - Don't let top-level multicol be paginated if it is inside a subdocument. r=TYLin,emilio
Differential Revision: https://phabricator.services.mozilla.com/D218823
2024-08-08 21:43:50 +00:00
Ting-Yu Lin 2969a5e0cb Bug 1909995 Part 2 - Add IntrinsicISize() as a helper to implement GetMinISize() and GetPrefISize(). r=layout-reviewers,emilio
Most frame types have identical or very similar implementation for GetMinISize()
and GetPrefISize(), and many of them already have `IntrinsicISize()` to unify
the implementation. This patch introduces nsIFrame::IntrinsicISize() so that
derived classes only need to override one method.

`nsBlockFrame`, `ColumnSetWrapperFrame`, and `nsColumnSetFrame` are the only
three classes where their `GetMinISize()` and `GetPrefISize()` have significant
differences. Therefore, we rename `GetMinISize()` and `GetPrefISize()` to
`MinISize()` and `PrefISize`, respectively, and use them as helpers to implement
their `IntrinsicISize()`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D217790
2024-07-26 20:54:56 +00:00
Ting-Yu Lin cf5c862951 Bug 1909786 Part 5 - Remove obsolete comments in nsColumnSetFrame. r=layout-reviewers,jfkthame
After [1], nsColumnSetFrame becomes the inner frame of ColumnSetWrapperFrame, so
we don't need to consider size containment for nsColumnSetFrame.

[1] https://hg.mozilla.org/mozilla-central/rev/62a41cc1264ebceedd1458b60f1c1500f0565794

Differential Revision: https://phabricator.services.mozilla.com/D217681
2024-07-25 18:26:48 +00:00
Ting-Yu Lin c182ed4f84 Bug 1908826 - Modernize collapsing margin data structure. r=layout-reviewers,emilio
- Drop the "ns" prefix, and move the class into mozilla namespace.

- Remove unnecessary constructors and `operator=` because compiler can generate
  them automatically.

- Change `get` to `Get` to conform to the coding style.

- Misc cosmetic fix such as adding braces.

Differential Revision: https://phabricator.services.mozilla.com/D217056
2024-07-23 06:29:48 +00:00
Iulian Moraru c3946b4ab0 Backed out changeset 07b27f0f7e21 (bug 1908826) for causing non unified build bustages on nsBlockReflowContext.h. CLOSED TREE 2024-07-23 04:55:23 +03:00
Ting-Yu Lin 16459adaa6 Bug 1908826 - Modernize collapsing margin data structure. r=layout-reviewers,emilio
- Drop the "ns" prefix, and move the class into mozilla namespace.

- Remove unnecessary constructors and `operator=` because compiler can generate
  them automatically.

- Change `get` to `Get` to conform to the coding style.

- Misc cosmetic fix such as adding braces.

Differential Revision: https://phabricator.services.mozilla.com/D217056
2024-07-22 21:06:54 +00:00
Emilio Cobos Álvarez 5f86f91a61 Bug 1899187 - Use cbindgen for column-count. r=firefox-style-system-reviewers,layout-reviewers,boris
Differential Revision: https://phabricator.services.mozilla.com/D211784
2024-05-28 09:37:23 +00:00
Ting-Yu Lin cf7be78eb0 Bug 1892778 Part 2 - Convert InlineDir and BlockDir to enum classes. r=dholbert
Also, rewrite GetInlineDir() and GetBlockDir() to remove bit operations for
computing the InlineDir and BlockDir enum variants.

Differential Revision: https://phabricator.services.mozilla.com/D208176
2024-04-23 03:56:42 +00:00
Ting-Yu Lin 8a77ebbb16 Bug 1888535 Part 5 - Remove DISPLAY_REFLOW. r=layout-reviewers,emilio
It is used in `Reflow()` implementations.

Differential Revision: https://phabricator.services.mozilla.com/D206317
2024-04-02 19:03:05 +00:00
Ting-Yu Lin 319fc12b73 Bug 1888535 Part 4 - Remove DISPLAY_PREF_INLINE_SIZE and DISPLAY_MIN_INLINE_SIZE. r=layout-reviewers,emilio
The two macros are used in `GetPrefISize()` and `GetMinISize()` implementations.
After removing them, we could further simplify some implementations because we
don't need a `result` variable in many cases.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D206316
2024-04-02 19:03:04 +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
Emilio Cobos Álvarez 0b366c953e Bug 1851787 - Plumb a DestroyContext through all functions that can destroy frames. r=dholbert
This prevents anonymous content getting destroyed at weird times
during frame destruction.

Differential Revision: https://phabricator.services.mozilla.com/D187693
2023-09-08 15:11:17 +00:00
Emilio Cobos Álvarez 07cbcafd82 Bug 1844832 - Share document-independent struct allocations. r=boris
In bug 1844755, a bunch of the time is spent allocating initial values.

There used to be more document-dependent initial values before
bug 1834487, but now that's only about default-font and direction.

This improves the situation by sharing initial structs that don't depend
on the document.

Differential Revision: https://phabricator.services.mozilla.com/D184256
2023-07-26 09:16:26 +00:00
Emilio Cobos Álvarez 7214f0caa6 Bug 1834487 - Simplify border snapping. r=Oriol
Make the computed value of border-like properties app units (which is
effectively what happens in Gecko already), and clamp at computed value
time.

Differential Revision: https://phabricator.services.mozilla.com/D179481
2023-05-31 08:49:14 +00:00
David Shin cd09d0a351 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 3faee50252 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 33ec2490df 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
Sandor Molnar 146a43a1bc 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 970986fac9 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 aa3e994c56 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 6f868ef403 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
Ting-Yu Lin 53fb8b6f22 Bug 1831829 - Consider multicol container in paginated context when setting mIsTopOfPage bit. r=emilio
A top-level multicol in a paginated context can be fragmented. We should use the
same logic to set the `mIsTopOfPage` bit as if the multicol is a nested one.

WARNING: loading the testcase without this patch can trap Firefox in an infinite
loop.

Differential Revision: https://phabricator.services.mozilla.com/D177578
2023-05-10 20:54:23 +00:00
Cosmin Sabou 44343a085c 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 65b6b0c69f 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