Commit Graph
191 Commits
Author SHA1 Message Date
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
Sajid Anwar e9f3ef742a Bug 2029867 - Use default fallback baseline synthesis for tables. r=layout-reviewers,dshin
Updates tables to use the default margin-based baseline synthesis instead of its
existing, separate fallback. Also implements baseline export for table rows in
central baseline writing modes. WPTs are updated to test the difference between
table cell baseline export and synthesis in central baseline writing modes.

Differential Revision: https://phabricator.services.mozilla.com/D293645
2026-04-24 18:40:07 +00:00
rperta 39e7a3043e Revert "Bug 2029867 - Use default fallback baseline synthesis for tables. r=layout-reviewers,dshin" for causing reftest failures at 1966466.html
This reverts commit cc6c0c9099.

This reverts commit d2148eedc8.

This reverts commit 6f4a9dd2eb.

This reverts commit 7de5c26642.

This reverts commit baf0863064.
2026-04-24 13:12:08 +00:00
Sajid Anwar cc6c0c9099 Bug 2029867 - Use default fallback baseline synthesis for tables. r=layout-reviewers,dshin
Updates tables to use the default margin-based baseline synthesis instead of its
existing, separate fallback. Also implements baseline export for table rows in
central baseline writing modes. WPTs are updated to test the difference between
table cell baseline export and synthesis in central baseline writing modes.

Differential Revision: https://phabricator.services.mozilla.com/D293645
2026-04-24 10:58:28 +00:00
Silaghi 6deafabdf7 Revert "Bug 2029867, Bug 2029864 - Use default fallback baseline synthesis for tables. r=layout-reviewers,dshin" for causing reftests failures at 1966466.html
This reverts commit 656073d672.

Revert "Bug 2029867 - Unify synthesis of margin-based and content/padding/border-based box baselines. r=layout-reviewers,dshin"

This reverts commit 40a9b5db71.

Revert "Bug 2029864 - Adjust 1083848-3-inline-background-repeat.html with more robust font size handling. r=layout-reviewers,dshin"

This reverts commit 708a2904ee.

Revert "Bug 2029864 - Adjust 1115916-1-vertical-metrics.html reftest with more robust Ahem font size. r=layout-reviewers,dshin"

This reverts commit 677a5812f8.

Revert "Bug 2029864 - Adjust WPT tests for text-emphasis line heights. r=layout-reviewers,dshin"

This reverts commit c50c152a44.
2026-04-23 06:24:07 +00:00
Sajid Anwar 656073d672 Bug 2029867 - Use default fallback baseline synthesis for tables. r=layout-reviewers,dshin
Updates tables to use the default margin-based baseline synthesis instead of its
existing, separate fallback. Also implements baseline export for table rows in
central baseline writing modes. WPTs are updated to test the difference between
table cell baseline export and synthesis in central baseline writing modes.

Differential Revision: https://phabricator.services.mozilla.com/D293645
2026-04-23 05:20:36 +00:00
Silaghi c1288cc070 Revert "Bug 2029867, Bug 2029864 - Use default fallback baseline synthesis for tables. r=layout-reviewers,dshin" for causing reftest failures at base/Baseline
This reverts commit 57ab38fd30.

Revert "Bug 2029867 - Unify synthesis of margin-based and content/padding/border-based box baselines. r=layout-reviewers,dshin"

This reverts commit 2c125c7bae.

Revert "Bug 2029864 - Adjust 1083848-3-inline-background-repeat.html with more robust font size handling. r=layout-reviewers,dshin"

This reverts commit 79a72f0bba.

Revert "Bug 2029864 - Adjust 1115916-1-vertical-metrics.html reftest with more robust Ahem font size. r=layout-reviewers,dshin"

This reverts commit 1e038f073e.

Revert "Bug 2029864 - Adjust WPT tests for text-emphasis line heights. r=layout-reviewers,dshin"

This reverts commit bf7b7bf2d3.
2026-04-21 16:28:51 +00:00
Sajid Anwar 57ab38fd30 Bug 2029867 - Use default fallback baseline synthesis for tables. r=layout-reviewers,dshin
Updates tables to use the default margin-based baseline synthesis instead of its
existing, separate fallback. Also implements baseline export for table rows in
central baseline writing modes. WPTs are updated to test the difference between
table cell baseline export and synthesis in central baseline writing modes.

Differential Revision: https://phabricator.services.mozilla.com/D293645
2026-04-21 15:47:33 +00:00
serge-sans-paille d58c18b09a Bug 2030235 - Decouple ServoStyleConsts from nsGkAtoms.h r=emilio,necko-reviewers,geckoview-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,kershaw,m_kato
And remove unused includes of nsGkAtoms.h in the process. The few
dependencies have been moved to ServoStyleConstsInlines.h

The used command to remove the now unused dependency was:

git grep -l nsGkAtoms.h | while read line; do grep -v nsGkAtoms.h $line | grep -q -E '\<nsGkAtoms\>' || sed -i -e '/nsGkAtoms.h/d' $line  ; done

Differential Revision: https://phabricator.services.mozilla.com/D292697
2026-04-09 10:05:25 +00:00
Silaghi 81930b22ee Revert "Bug 2030235 - Decouple ServoStyleConsts from nsGkAtoms.h r=emilio,necko-reviewers,geckoview-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,kershaw,m_kato" for causing build bustages at style/nsStyleUtil
This reverts commit b97e69b590.
2026-04-09 08:09:15 +00:00
serge-sans-paille b97e69b590 Bug 2030235 - Decouple ServoStyleConsts from nsGkAtoms.h r=emilio,necko-reviewers,geckoview-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,kershaw,m_kato
And remove unused includes of nsGkAtoms.h in the process. The few
dependencies have been moved to ServoStyleConstsInlines.h

The used command to remove the now unused dependency was:

git grep -l nsGkAtoms.h | while read line; do grep -v nsGkAtoms.h $line | grep -q -E '\<nsGkAtoms\>' || sed -i -e '/nsGkAtoms.h/d' $line  ; done

Differential Revision: https://phabricator.services.mozilla.com/D292697
2026-04-09 06:41:33 +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 18520f8286 Bug 2014221 - Use StyleSize::FromAppUnits() to simplify code in layout/. r=layout-reviewers,firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D281640
2026-02-04 19:36:36 +00:00
Emilio Cobos Álvarez f1dea2d65d Bug 2013141 - Remove custom_consts specialness from CSS keywords. r=firefox-style-system-reviewers,layout-reviewers,dshin
Just name the things like in CSS.

Differential Revision: https://phabricator.services.mozilla.com/D281001
2026-01-30 21:12:51 +00:00
Sajid Anwar b55def8635 Bug 2008335 - Decouple table cell alignment enum from CSS vertical-align enum. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D277747
2026-01-02 09:20:27 +00:00
Jonathan Watt 23ba459f0e Bug 2004072. Pass a SizeComputationInput to nsIFrame::ComputeSize etc instead of a gfxContext. r=dshin,layout-reviewers,TYLin
Differential Revision: https://phabricator.services.mozilla.com/D275519
2025-12-09 06:59:12 +00:00
Emilio Cobos Álvarez a8a2311474 Bug 1976457 - Sort includes in layout/. r=janv,dshin
Interesting bit is layout/.clang-format, the rest is all automated.

Differential Revision: https://phabricator.services.mozilla.com/D256616
2025-07-09 13:24:00 +00:00
Ting-Yu Lin 90a4d3085e Bug 1964200 - Fix comments and assertion messages to reflect the removal of table caption list. r=dholbert
The caption child list is removed in bug 242829.

Differential Revision: https://phabricator.services.mozilla.com/D247678
2025-05-06 01:06:28 +00:00
Emilio Cobos Álvarez 037039ecfc Bug 242829 - Remove table caption list. r=dshin
This fixes the issue by moving the table captions to the principal child
list. It also paves the way to fix bug 144517, but it doesn't fix it as
that requires extra layout changes to nsTableWrapper frame (mostly to
reserve the multiple caption block sizes).

Test courtesy of Masayuki in D246407 (with minor tweaks).

Differential Revision: https://phabricator.services.mozilla.com/D246468
2025-05-01 02:25:54 +00:00
Ting-Yu Lin 15b4507787 Bug 1742042 Part 4 - Apply flex item's stretched cross-size when computing flex container's intrinsic inline size. r=dholbert
For flex items with an aspect-ratio, the expectation is that the stretched
cross-sizes can be transferred to the main axis, affecting their intrinsic
inline-size contribution to the flex container's intrinsic inline-size.

Add `aspect-ratio-intrinsic-size-008.html` (adapted from 003.html) to test a
flex item with border and padding since the existing tests do not cover this.

Differential Revision: https://phabricator.services.mozilla.com/D222050
2024-09-13 06:52:13 +00:00
Ting-Yu Lin aa389ab830 Bug 1917144 Part 2 - Add IntrinsicSizeInput::mContainingBlockSize. r=dholbert
Currently, only the grid container needs the containing block size to resolve
the transferred min and max sizes for `repeat()` function in
`nsGridContainerFrame::ComputeIntrinsicISize()`.

This patch is a preparation for Bug 1865438. `mContainingBlockSize` will be used
there, so it does not change any behavior yet.

Differential Revision: https://phabricator.services.mozilla.com/D221333
2024-09-11 18:01:40 +00:00
Butkovits Atila 55260bda3f Backed out changeset e573e9da7c9e (bug 1521088) for causing Bug 1917028. a=backout 2024-09-10 06:09:19 +03:00
Ting-Yu Lin a34078a835 Bug 1917056 Part 2 - Move the special logic for table frame out of IntrinsicForAxis(). r=layout-reviewers,emilio
In the old logic, the table's content inline size is stored in the `min`
variable, and passed into `AddIntrinsicSizeOffset()` to account for margin,
border, and padding.

We don't seem to have test coverage for this behavior, so I added some WPTs in
the next part.

This patch shouldn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D221236
2024-09-05 23:01:38 +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
Ting-Yu Lin 7a33511948 Bug 1521088 - Carry BResize flags from table wrapper frame's ReflowInput to table frame's ReflowInput. r=dholbert
When resolving the grid rows of a grid container frame, we use an unconstrained
block size as the block axis's percentage basis to measure a grid item's content
size. However, during an incremental reflow, the grid item may have been
reflowed against a definite grid row size previously. To address this, the grid
container sets relevant BResize flags to the item's ReflowInput [1] to indicate
that the item's block size may change and a reflow is needed. However, these
flags are not propagated from table wrapper frame's `ReflowInput` to table
frame's `ReflowInput`, so the table frame doesn't get reflowed due to the check
in [2].

This patch is similar to the handling in `ViewportFrame` [3] or
`ScrollContainerFrame` [4], where these flags are also propagated to their inner
frame's ReflowInput.

[1] https://searchfox.org/mozilla-central/rev/a85b25946f7f8eebf466bd7ad821b82b68a9231f/layout/generic/nsGridContainerFrame.cpp#5382-5384
[2] https://searchfox.org/mozilla-central/rev/a85b25946f7f8eebf466bd7ad821b82b68a9231f/layout/tables/nsTableFrame.cpp#1658-1660
[3] https://searchfox.org/mozilla-central/rev/a85b25946f7f8eebf466bd7ad821b82b68a9231f/layout/generic/ViewportFrame.cpp#352-357
[4] https://searchfox.org/mozilla-central/rev/a85b25946f7f8eebf466bd7ad821b82b68a9231f/layout/generic/ScrollContainerFrame.cpp#897-902

Differential Revision: https://phabricator.services.mozilla.com/D220024
2024-08-24 22:54:00 +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 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
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
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 fc37975d56 Bug 1870558 Part 4 - Simplify the caption reflow setup in nsTableWrapperFrame::Reflow(). r=layout-reviewers,emilio
This doesn't change the behavior.

Differential Revision: https://phabricator.services.mozilla.com/D196700
2023-12-18 18:20:25 +00:00
Ting-Yu Lin b33883418d Bug 1870558 Part 3 - Remove unused caption side argument for nsTableWrapperFrame::ComputeFinalBSize(). r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D196699
2023-12-18 18:20:24 +00:00
Ting-Yu Lin 4fec8e08a4 Bug 1870558 Part 2 - Remove unused captionWM in nsTableWrapperFrame::Reflow(). r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D196698
2023-12-18 18:20:24 +00:00
Ting-Yu Lin 2a74c4844f Bug 1870558 Part 1 - Remove unused containSize variable in nsTableWrapperFrame::Reflow(). r=layout-reviewers,emilio
We've removed side captions in bug 1807963, so we should remove/update obsolete
comments.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D196697
2023-12-18 18:20:23 +00:00
Ting-Yu Lin f733dff414 Bug 1859446 Part 6 - Remove unused nsresult return value from various table methods. r=layout-reviewers,jfkthame
We never communicate error status via the `nsresult` return value, and they
always return `NS_OK`. Hence the removal.

Differential Revision: https://phabricator.services.mozilla.com/D191156
2023-10-17 17:30:02 +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 6c324c6d1b 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 33592fec5e 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 0698c96bd1 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
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
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