Jonathan Kew
24130114c1
Bug 2045733 - Check for font support before using the capital es-zet (U+1E9E) in uppercase transform. r=layout-reviewers,emilio
...
And update reftests to check behavior both with and without U+1E9E in the font.
Differential Revision: https://phabricator.services.mozilla.com/D305199
2026-06-10 14:08:55 +00:00
Mr. M
8880cba9fa
Bug 2035317 - Add rendering for CSS corner-shape support r=layout-reviewers,emilio,gfx-reviewers,firefox-style-system-reviewers,cheff,nical
...
Differential Revision: https://phabricator.services.mozilla.com/D297660
2026-06-09 15:01:50 +00:00
Jonathan Kew
4c083a3c7e
Bug 2043898 - Optimize loop in nsTextFrame::AddInlineMinISizeForFlow. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D303649
2026-06-02 12:10:33 +00:00
Jonathan Kew
01f6a26510
Bug 2043898 - Optimize loop in nsTextFrame::AddInlinePrefISizeForFlow. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D303648
2026-06-02 12:10:31 +00:00
Atila Butkovits
945190b777
Revert "Bug 2043898 - Optimize loop in nsTextFrame::AddInlineMinISizeForFlow. r=layout-reviewers,emilio" for causing failures at 1231692-1.html.
...
This reverts commit b211ebdcd5 .
Revert "Bug 2043898 - Optimize loop in nsTextFrame::AddInlinePrefISizeForFlow. r=layout-reviewers,emilio"
This reverts commit 998b2833e5 .
2026-06-01 18:43:44 +00:00
Jonathan Kew
b211ebdcd5
Bug 2043898 - Optimize loop in nsTextFrame::AddInlineMinISizeForFlow. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D303649
2026-06-01 16:40:25 +00:00
Jonathan Kew
998b2833e5
Bug 2043898 - Optimize loop in nsTextFrame::AddInlinePrefISizeForFlow. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D303648
2026-06-01 16:40:23 +00:00
Jonathan Kew
47a47f469e
Bug 2042025 - Avoid redundant calls to CreateObserversForAnimatedGlyphs during textrun building. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D302461
2026-05-26 14:43:15 +00:00
Ting-Yu Lin
1a4668757b
Bug 2038366 - Add a child frame iterator for nsLineBox, and adapt callers. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D299505
2026-05-09 13:56:59 +00:00
Daniel Holbert
8ce7475f6e
Bug 2036989: Use GetOrCreateDeletableProperty to reduce manual 'new' invocations in layout code. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D298481
2026-05-06 22:29:33 +00:00
Atila Butkovits
e611117715
Revert "Bug 2036989: Use GetOrCreateDeletableProperty to reduce manual 'new' invocations in layout code. r=layout-reviewers,emilio" on suspicion of causing assertion failure in browser/components/sidebar/tests/browser/browser_customize_sidebar.js.
...
This reverts commit 300ed0d12a .
2026-05-05 13:52:41 +00:00
Daniel Holbert
300ed0d12a
Bug 2036989: Use GetOrCreateDeletableProperty to reduce manual 'new' invocations in layout code. r=layout-reviewers,emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D298481
2026-05-05 07:58:49 +00:00
Daniel Holbert
f67f00d372
Bug 2036951: Use 'MakeRefPtr' instead of 'new' to allocate reference-counted objects, in various places within layout. r=layout-reviewers,TYLin
...
Differential Revision: https://phabricator.services.mozilla.com/D298452
2026-05-05 06:23:23 +00:00
David Shin
effd3740fc
Bug 2021977: r=jfkthame,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D293557
2026-04-15 17:07:46 +00:00
Daisuke Akatsuka
14efb900d9
Bug 2019153: Round the selection highlight for the urlbar input field r=layout-reviewers,adw,emilio,desktop-theme-reviewers,firefox-style-system-reviewers
...
This change implements the rounded selection highlight used in the new Nova
design for the urlbar. [1]
This patch makes the following properties available in the ::selection
pseudo-element in chrome-privileged contexts.
- border-radius
- border-top-left-radius
- border-top-right-radius
- border-bottom-left-radius
- border-bottom-right-radius
For example to set up the radius:
```
.urlbar-input::selection {
border-radius: 4px;
}
```
[1] https://www.figma.com/design/WMHwWMwIu6SDzJyvVUn33X/S-S-UX-Specifications–Sprint-2-?node-id=13056-9952&t=pswCcokl3etqlyZU-1
Differential Revision: https://phabricator.services.mozilla.com/D289127
2026-04-07 09:38:29 +00:00
serge-sans-paille
f81328e365
Bug 2023519 - Make our codebase modernize-use-equals-default + modernize-use-equals-delete -safe wrt. clang-tidy r=sylvestre,necko-reviewers,media-playback-reviewers,profiler-reviewers,dom-storage-reviewers,layout-reviewers,dom-worker-reviewers,valentin,jesup,padenot,edenchuang,emilio
...
The changeset has been generated automatically through:
./mach static-analysis check --output ./clang-tidy-bugprone.json --format json --fix
followed by manual adjustment when needed or when the auto-fixer bailed out.
This paves the way for Bug 2023527
Differential Revision: https://phabricator.services.mozilla.com/D287941
2026-03-22 08:35:47 +00:00
Jan-Niklas Jaeschke
4d235fcb1b
Bug 2020693 - CSS Highlight API: Don't paint -webkit-stroke-* properties. r=emilio,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D285941
2026-03-20 09:38:06 +00:00
Alexandru Marc
04e5f74151
Revert "Bug 2023519 - Make our codebase modernize-use-equals-default + modernize-use-equals-delete -safe wrt. clang-tidy r=sylvestre,necko-reviewers,media-playback-reviewers,profiler-reviewers,dom-storage-reviewers,layout-reviewers,dom-worker-reviewers,valentin,jesup,padenot,edenchuang,emilio"
...
This reverts commit a64dec2665 .
2026-03-19 17:29:58 +00:00
Jan-Niklas Jaeschke
3e0858d723
Bug 2020426 - CSS Highlight API: Refactor highlight text color resolution. r=emilio,layout-reviewers
...
Refactor GetSelectionTextColors to return a SelectionColors struct instead of
a bool and two out-params. The struct carries distinct flags (mHasBackground,
mOverridesForeground, mHasPaintImpact), where mHasPaintImpact is true whenever
the pseudo has any computed style, not just when colors are set. This ensures
highlights specifying only text-shadow are included in the selection range list
and get their shadow painted.
Also fixes ::target-text incorrectly overriding ::highlight foreground colors
when no author text color is specified, and caches the target-text light/dark
scheme selection to avoid recomputing the contrast ratio.
This also required to allow 1px fuzziness in the test.
Differential Revision: https://phabricator.services.mozilla.com/D285546
2026-03-19 10:04:46 +00:00
serge-sans-paille
a64dec2665
Bug 2023519 - Make our codebase modernize-use-equals-default + modernize-use-equals-delete -safe wrt. clang-tidy r=sylvestre,necko-reviewers,media-playback-reviewers,profiler-reviewers,dom-storage-reviewers,layout-reviewers,dom-worker-reviewers,valentin,jesup,padenot,edenchuang,emilio
...
The changeset has been generated automatically through:
./mach static-analysis check --output ./clang-tidy-bugprone.json --format json --fix
followed by manual adjustment when needed or when the auto-fixer bailed out.
This paves the way for Bug 2023527
Differential Revision: https://phabricator.services.mozilla.com/D287941
2026-03-18 17:25:01 +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
5256a12b7d
Revert "Bug 2020693 - CSS Highlight API: Don't paint -webkit-stroke-* properties. r=emilio,layout-reviewers" for causing reftests failures in 1576553-1-ref.html.
...
This reverts commit fbcad497c4 .
2026-03-12 16:29:25 +00:00
Jan-Niklas Jaeschke
fbcad497c4
Bug 2020693 - CSS Highlight API: Don't paint -webkit-stroke-* properties. r=emilio,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D285941
2026-03-12 14:13:19 +00:00
pstanciu
64d48508a8
Revert "Bug 2020693 - CSS Highlight API: Don't paint -webkit-stroke-* properties. r=emilio,layout-reviewers" wr failures @custom-highlight-painting-021.html
...
This reverts commit b299c25698 .
2026-03-04 22:10:06 +00:00
Jan-Niklas Jaeschke
b299c25698
Bug 2020693 - CSS Highlight API: Don't paint -webkit-stroke-* properties. r=emilio,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D285941
2026-03-04 21:10:38 +00:00
Jan-Niklas Jaeschke
8616f52b73
Bug 1838684 - CSS Highlight API: Don't add extra selected whitespace for highlight selections. r=emilio,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D283851
2026-02-27 12:20:31 +00:00
Emilio Cobos Álvarez
eb971e3da7
Bug 2018697 - Make some checks slightly faster. r=jfkthame,layout-reviewers
...
Given this info is in WritingMode, may as well use it.
Differential Revision: https://phabricator.services.mozilla.com/D284771
2026-02-27 02:26:22 +00:00
Serban Stanca
c8794ac6bb
Revert "Bug 1838684 - CSS Highlight API: Don't add extra selected whitespace for highlight selections. r=emilio,layout-reviewers" for causing multiple failures.
...
This reverts commit 0b6aa24446 .
2026-02-25 17:10:41 +00:00
Jan-Niklas Jaeschke
0b6aa24446
Bug 1838684 - CSS Highlight API: Don't add extra selected whitespace for highlight selections. r=emilio,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D283851
2026-02-25 16:21:14 +00:00
Jan-Niklas Jaeschke
de074a7331
Bug 1987618, part 4 - CSS Highlight API: Fix text-decoration positioning for vertical writing mode. r=jfkthame,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D283662
2026-02-25 08:05:27 +00:00
Jan-Niklas Jaeschke
6a8b4767fa
Bug 1987618, part 3 - CSS Highlight API: Compute decoration overflow bounds correctly. r=jfkthame,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D283661
2026-02-25 08:05:25 +00:00
Jan-Niklas Jaeschke
1b1939b6fc
Bug 1987618, part 2 - CSS Highlight API: Use correct line thickness for strikeout decorations. r=jfkthame,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D283660
2026-02-25 08:05:22 +00:00
Atila Butkovits
d199cb6e80
Revert "Bug 1987618, part 8 - CSS Highlight API: Add new test case. r=emilio" for causing failures related to ElementData.
...
This reverts commit 67a72ced59 .
Revert "Bug 1987618, part 7 - CSS Highlight API: Update test expectations. r=emilio"
This reverts commit a8ef71263a .
Revert "Bug 1987618, part 6 - CSS Highlight API: Diff cached highlight pseudo styles during restyle. r=emilio,firefox-style-system-reviewers,layout-reviewers"
This reverts commit be94746926 .
Revert "Bug 1987618, part 5 - CSS Highlight API: Set primary frame's style as parent when probing highlight styles. r=emilio,layout-reviewers"
This reverts commit 47bf5d2fee .
Revert "Bug 1987618, part 4 - CSS Highlight API: Fix text-decoration positioning for vertical writing mode. r=jfkthame,layout-reviewers"
This reverts commit 73cc6f91b9 .
Revert "Bug 1987618, part 3 - CSS Highlight API: Compute decoration overflow bounds correctly. r=jfkthame,layout-reviewers"
This reverts commit 7d4afe8234 .
Revert "Bug 1987618, part 2 - CSS Highlight API: Use correct line thickness for strikeout decorations. r=jfkthame,layout-reviewers"
This reverts commit 8e1d7e02a9 .
Revert "Bug 1987618, part 1 - CSS Highlight API: Create and store highlight selection before adding ranges. r=emilio,layout-reviewers"
This reverts commit b585a9be3e .
2026-02-24 15:57:35 +00:00
Jan-Niklas Jaeschke
73cc6f91b9
Bug 1987618, part 4 - CSS Highlight API: Fix text-decoration positioning for vertical writing mode. r=jfkthame,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D283662
2026-02-24 15:13:07 +00:00
Jan-Niklas Jaeschke
7d4afe8234
Bug 1987618, part 3 - CSS Highlight API: Compute decoration overflow bounds correctly. r=jfkthame,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D283661
2026-02-24 15:13:04 +00:00
Jan-Niklas Jaeschke
8e1d7e02a9
Bug 1987618, part 2 - CSS Highlight API: Use correct line thickness for strikeout decorations. r=jfkthame,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D283660
2026-02-24 15:13:02 +00:00
Sajid Anwar
e2ff27b940
Bug 2015279 - Implement dominant-baseline for vertical alignment. r=layout-reviewers,firefox-style-system-reviewers,jfkthame,emilio
...
Moves the existing dominant-baseline CSS property out from SVG-specific
struct and into the general inherited box struct. Also adds new WPTs for
testing dominant-baseline against the alignment-baseline property.
Differential Revision: https://phabricator.services.mozilla.com/D282788
2026-02-19 23:31:58 +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
Sajid Anwar
3f078d2e1d
Bug 2010713 - Add SVG support for baseline-shift. r=firefox-svg-reviewers,longsonr
...
Differential Revision: https://phabricator.services.mozilla.com/D281143
2026-01-30 19:41:34 +00:00
Atila Butkovits
8226a29315
Revert "Bug 2010713 - Add SVG support for baseline-shift. r=firefox-svg-reviewers,longsonr" for causing failures at ignore-vertical-align.svg. DONTBUILD
...
This reverts commit 3c61fdec18 .
2026-01-30 15:33:13 +00:00
Sajid Anwar
3c61fdec18
Bug 2010713 - Add SVG support for baseline-shift. r=firefox-svg-reviewers,longsonr
...
Differential Revision: https://phabricator.services.mozilla.com/D281143
2026-01-30 14:08:51 +00:00
Jan-Niklas Jaeschke
fbd6de103a
Bug 2011729 - CSS Highlight API: Use correct color for text-decoration. r=emilio,layout-reviewers
...
Differential Revision: https://phabricator.services.mozilla.com/D280086
2026-01-22 22:13:25 +00:00
Jan-Niklas Jaeschke
c59d9c40c8
Bug 1845447 - CSS Highlight API: Implement text-shadow. r=emilio,layout-reviewers,firefox-style-system-reviewers
...
There are still outstanding questions about combining shadows from
pseudo elements and normal text, see https://github.com/w3c/csswg-drafts/issues/13376
For now, this patch either paints text-shadow from pseudo elements
or from normal text, not both.
Differential Revision: https://phabricator.services.mozilla.com/D279647
2026-01-22 13:23:50 +00:00
Emilio Cobos Álvarez
d3860fcb90
Bug 2011828 - Don't bother recomputing selection rect if we're already dirty. r=jjaschke
...
This should help a bit with bug 2011818.
Differential Revision: https://phabricator.services.mozilla.com/D280012
2026-01-22 12:06:08 +00:00
Emilio Cobos Álvarez
38fe64587d
Bug 2011828 - Text frames are leafs so they don't need to invalidate descendant intrinsic sizes. r=layout-reviewers,jfkthame
...
Differential Revision: https://phabricator.services.mozilla.com/D280011
2026-01-22 12:06:05 +00:00
Emilio Cobos Álvarez
8d08f18501
Bug 2011828 - Selection underlines can't affect intrinsic sizes. r=layout-reviewers,jfkthame
...
It's ink overflow. We have similar code in InvalidateFrameDueToGlyphsChanged already.
Differential Revision: https://phabricator.services.mozilla.com/D280010
2026-01-22 12:06:02 +00:00
agoloman
b035f644cf
Revert "Bug 1845447 - CSS Highlight API: Implement text-shadow. r=emilio,layout-reviewers,firefox-style-system-reviewers" for causing reftest failures @text-shadow-on-selection-2.html.
...
This reverts commit 9067bbd9a4 .
2026-01-21 20:09:13 +00:00
Jan-Niklas Jaeschke
9067bbd9a4
Bug 1845447 - CSS Highlight API: Implement text-shadow. r=emilio,layout-reviewers,firefox-style-system-reviewers
...
There are still outstanding questions about combining shadows from
pseudo elements and normal text, see https://github.com/w3c/csswg-drafts/issues/13376
For now, this patch either paints text-shadow from pseudo elements
or from normal text, not both.
Differential Revision: https://phabricator.services.mozilla.com/D279647
2026-01-21 18:56:00 +00:00