Commit Graph
95 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
Emilio Cobos Álvarez eb87d1158b Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 17:44:30 +00:00
Serban Stanca e5d7b9992f Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wpt failures in closed-listbox-rendering.html.
This reverts commit 2b592196ab.
2026-03-17 15:26:31 +00:00
Emilio Cobos Álvarez 2b592196ab Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 12:11: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
Serban Stanca 756241a7ce Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wpt failures in select-appearance-sizing-in-flex.html.
This reverts commit 7669d5a11e.
2026-03-17 11:49:24 +00:00
Emilio Cobos Álvarez 7669d5a11e Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-17 10:14:28 +00:00
rperta 2362c10a63 Revert "Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw" for causing wr failures at closed-listbox-rendering.html
This reverts commit b957d18e90.
2026-03-17 01:32:58 +00:00
Emilio Cobos Álvarez b957d18e90 Bug 2011820 - appearance: {base,base-select} support via an @appearance-base rule. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D287818
2026-03-16 22:41:27 +00:00
Emilio Cobos Álvarez bb530e5269 Bug 2015488 - Add backdrop support for checkboxes and radio buttons. r=layout-reviewers,firefox-style-system-reviewers,dshin
Differential Revision: https://phabricator.services.mozilla.com/D282501
2026-02-10 23:43:46 +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
Emilio Cobos Álvarez c8048340be Bug 1941755 - Tweak checkbox border size per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234340
2025-01-17 09:05:19 +00:00
Norisz Fay 490cd268ba Backed out 3 changesets (bug 1941755) for causing reftest failure on radio-clamp-01.html CLOSED TREE
Backed out changeset 236a7b7aee3b (bug 1941755)
Backed out changeset c2dd557f5734 (bug 1941755)
Backed out changeset 2606ec966d5c (bug 1941755)
2025-01-16 23:45:25 +02:00
Emilio Cobos Álvarez b331c52cf9 Bug 1941755 - Tweak checkbox border size per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234340
2025-01-16 18:23:11 +00:00
Alexandru Marc 8b56e6f94e Backed out 6 changesets (bug 1941755) for causing wr3 failures @ transform-input-018.html
Backed out changeset 4f612a4f2b91 (bug 1941755)
Backed out changeset ba75a8e0c246 (bug 1941755)
Backed out changeset 81d3f4ef3f78 (bug 1941755)
Backed out changeset 481bdd9544eb (bug 1941755)
Backed out changeset 23accc252467 (bug 1941755)
Backed out changeset 27cc29112880 (bug 1941755)
2025-01-16 07:52:23 +02:00
Emilio Cobos Álvarez 87c57f90af Bug 1941755 - Tweak checkbox border size per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234340
2025-01-15 22:55:45 +00:00
Alexandru Marc 5875e48eb6 Backed out 3 changesets (bug 1941755) for causing reftest failures @ checkbox-clamp-01.html CLOSED TREE
Backed out changeset 6b9105fcdcd4 (bug 1941755)
Backed out changeset 7e78ec00dfe4 (bug 1941755)
Backed out changeset d55482b5a5e6 (bug 1941755)
2025-01-15 23:14:57 +02:00
Emilio Cobos Álvarez bb80c5b82c Bug 1941755 - Tweak checkbox border size per UX feedback. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D234340
2025-01-15 18:31:44 +00:00
Emilio Cobos Álvarez fea73b3189 Bug 1918838 - Make CSS zoom apply to themed widgets properly. r=dshin
Differential Revision: https://phabricator.services.mozilla.com/D222320
2024-09-19 09:56:50 +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 e94660f1f2 Bug 1910428 Part 1 - Remove an unused #define in nsCheckboxRadioFrame.cpp. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D217973
2024-07-29 22:03:59 +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
Emilio Cobos Álvarez d25d53b6fc Bug 1909311 - Remove nsIFormControlFrame and nsITextControlFrame. r=masayuki,layout-reviewers,dholbert
It's a rather useless interface:

 * nsITextControlFrame is only implemented by nsTextControlFrame, so we
   can just use that.
 * nsIFormControlFrame had very few actual functionality, mostly
   scattered around:
    * SetFormProperty(select) was only useful for nsTextControlFrame.
    * SetFormProperty(value) was only called on file controls.
    * SetFocus() did mostly nothing, or things that can be done in
      ElementStateChanged instead.

There are some do_QueryFrame calls that I replaced for better checks in
font inflation and nsIFrame, but I'll adjust to preserve behavior if you
insist (it just such a somewhat-random check).

Differential Revision: https://phabricator.services.mozilla.com/D217322
2024-07-23 16:16:18 +00:00
Emilio Cobos Álvarez 1e3c825957 Bug 1903191 - Tweak sizing to allow zero-size checkboxes/radio buttons. r=dholbert
baseline-alignment-and-overflow.tentative.html starts failing because
the code to set up the reference stops working:

  https://searchfox.org/mozilla-central/rev/8011b6325f7ce05d228a3cdefd45d74fb98ee7b4/testing/web-platform/tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html#169-174

But our rendering otherwise doesn't change, plus it fails similarly in
Safari, so I think we're good.

Differential Revision: https://phabricator.services.mozilla.com/D214081
2024-06-19 12:16:08 +00:00
Aron Cseh d4bf1568e2 Backed out changeset 3c34c76566d2 (bug 1903191) for causing assertion failures on nsCheckboxRadioFrame.cpp CLOSED TREE 2024-06-19 13:48:19 +03:00
Emilio Cobos Álvarez 48814d9269 Bug 1903191 - Tweak sizing to allow zero-size checkboxes/radio buttons. r=dholbert
baseline-alignment-and-overflow.tentative.html starts failing because
the code to set up the reference stops working:

  https://searchfox.org/mozilla-central/rev/8011b6325f7ce05d228a3cdefd45d74fb98ee7b4/testing/web-platform/tests/html/rendering/widgets/baseline-alignment-and-overflow.tentative.html#169-174

But our rendering otherwise doesn't change, plus it fails similarly in
Safari, so I think we're good.

Differential Revision: https://phabricator.services.mozilla.com/D214081
2024-06-19 08:50:02 +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
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 d3b5b1e844 Bug 1853090 - Add ContentISize() and ContentBSize() convenience methods to nsIFrame. r=layout-reviewers,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D188157
2023-09-14 18:13:17 +00:00
Olli Pettay 1292ed6904 Bug 1850712 - Remove unused nsCheckboxRadioFrame::GetCurrentCheckState, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187104
2023-08-30 14:07:32 +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
Iulian Moraru babc5faa23 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 9e2157483e 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
David Shin 286d0b43a7 Bug 1812679 - Handle central baseline calculation in GetNaturalBaselineBOffset. r=layout-reviewers,emilio
Previously, for writing-mode using central baseline alignment (i.e. `vertical-(lr|rl)`,
we simply used the center of content-box in `nsLineLayout::VerticalAlignFrames`.
However, this is incorrect for e.g. a `div` with two lines of text - just like how
its alphabetical baseline is the baseline of the second line of text, the central
baseline should be the centerline of the second line.

Differential Revision: https://phabricator.services.mozilla.com/D172165
2023-03-24 16:23:16 +00:00
Norisz Fay 772aed9c55 Backed out changeset 11ba57726279 (bug 1812679) for causing Wr failures on text-combine-upright-value-all-002.html 2023-03-24 01:51:06 +02:00
David Shin c107e01e84 Bug 1812679 - Handle central baseline calculation in GetNaturalBaselineBOffset. r=layout-reviewers,emilio
Previously, for writing-mode using central baseline alignment (i.e. `vertical-(lr|rl)`,
we simply used the center of content-box in `nsLineLayout::VerticalAlignFrames`.
However, this is incorrect for e.g. a `div` with two lines of text - just like how
its alphabetical baseline is the baseline of the second line of text, the central
baseline should be the centerline of the second line.

Differential Revision: https://phabricator.services.mozilla.com/D172165
2023-03-23 17:36:49 +00:00
Stanca Serban 4666d08901 Backed out changeset 49646b0d59aa (bug 1812679) for causing mochitests failures in layout/style/test/test_revert.html. CLOSED TREE 2023-03-23 17:39:13 +02:00
David Shin 751d326ba7 Bug 1812679 - Handle central baseline calculation in GetNaturalBaselineBOffset. r=layout-reviewers,emilio
Previously, for writing-mode using central baseline alignment (i.e. `vertical-(lr|rl)`,
we simply used the center of content-box in `nsLineLayout::VerticalAlignFrames`.
However, this is incorrect for e.g. a `div` with two lines of text - just like how
its alphabetical baseline is the baseline of the second line of text, the central
baseline should be the centerline of the second line.

Differential Revision: https://phabricator.services.mozilla.com/D172165
2023-03-23 14:35:12 +00:00