1870 Commits

Author SHA1 Message Date
Jonathan Kew
d5085e747b Bug 1957384 - Allow Unicode whitespace characters intervening between punctuation and letter in ::first-letter range. r=dshin
And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once https://github.com/web-platform-tests/wpt/pull/51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
2025-04-22 08:40:09 +00:00
Cristina Horotan
f349b08b9a Backed out changeset a59c7ce8c81e (bug 1957384) for causing reftest failures 2025-04-11 22:19:36 +03:00
Jonathan Kew
6338019d7b Bug 1957384 - Allow Unicode whitespace characters intervening between punctuation and letter in ::first-letter range. r=dshin
And allow multiple punctuation elements, with potential intervening whitespace,
both before and after the letter.

Tests to be added once https://github.com/web-platform-tests/wpt/pull/51361 is merged.

Differential Revision: https://phabricator.services.mozilla.com/D243674
2025-04-11 16:57:46 +00:00
David Shin
40e6a5c66e Bug 1923959: Resolve anchor for margins. r=firefox-style-system-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D240863
2025-04-08 02:29:18 +00:00
Tom Schuster
b8d11d463f Bug 1951893 - Remove unneeded StaticAtom suffixes. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D240598
2025-03-11 11:36:09 +00:00
Jonathan Kew
ea08d9b07a Bug 1950844 - Support spelling-error and grammar-error values of text-decoration-line. r=tlouw
Differential Revision: https://phabricator.services.mozilla.com/D239913
2025-02-28 12:56:58 +00:00
David Shin
61d5b05704 Bug 1945944: Add flag to dump frame tree with only deterministic information for diffing. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D236797
2025-02-06 15:34:27 +00:00
Jonathan Kew
59c112f15c Bug 1944779 - Allow intervening space and no-break space in ::first-letter, preceding the letter. r=layout-reviewers,emilio
This affects a couple of existing reftests that explicitly tested for
the old behavior of terminating ::first-letter at a space; those are
updated for the new behavior.

It also causes the existing first-letter-punctuation-and-space WPT
to start passing.

Differential Revision: https://phabricator.services.mozilla.com/D236262
2025-01-31 08:32:06 +00:00
Jonathan Kew
922837f10b Bug 1521723 - Apply hyphenate-limit-chars settings to the potential breaks found by the hyphenator. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D234960
2025-01-29 17:01:54 +00:00
Masayuki Nakano
4e6fcb1183 Bug 1943228 - Rename methods GetSomethingWithoutCreation() to GetExtantSomething() r=edgar,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D235256
2025-01-23 23:47:28 +00:00
Jonathan Kew
b7a8f00f5e Bug 1935148 - Remove newline (instead of transforming to space) if adjacent to East-Asian punctuation character. r=m_kato
Includes the examples from the report as a testcase, though there is not yet
any formal spec for the exact behavior of segment break transformation.
(But nevertheless there is an existing collection of tests, so this just adds
one for the punctuation case.)

Differential Revision: https://phabricator.services.mozilla.com/D231476
2025-01-02 10:17:53 +00:00
Alexandru Marc
ab65fe8c1b Backed out changeset ce6faa97d947 (bug 1935148) for causing build bustages @ nsTextFrameUtils.h CLOSED TREE 2025-01-02 02:21:59 +02:00
Jonathan Kew
762cccdd3f Bug 1935148 - Remove newline (instead of transforming to space) if adjacent to East-Asian punctuation character. r=m_kato
Includes the examples from the report as a testcase, though there is not yet
any formal spec for the exact behavior of segment break transformation.
(But nevertheless there is an existing collection of tests, so this just adds
one for the punctuation case.)

Differential Revision: https://phabricator.services.mozilla.com/D231476
2025-01-01 22:30:49 +00:00
Alexandru Marc
f73c5665dd Backed out changeset 87246fb462dd (bug 1935148) for causing build bustages @ nsTextFrameUtils.cpp CLOSED TREE 2025-01-01 20:47:47 +02:00
Jonathan Kew
e54cfb5250 Bug 1935148 - Remove newline (instead of transforming to space) if adjacent to East-Asian punctuation character. r=m_kato
Includes the examples from the report as a testcase, though there is not yet
any formal spec for the exact behavior of segment break transformation.
(But nevertheless there is an existing collection of tests, so this just adds
one for the punctuation case.)

Differential Revision: https://phabricator.services.mozilla.com/D231476
2025-01-01 17:59:04 +00:00
Emilio Cobos Álvarez
b1269ccea6 Bug 1932800 - Fix caret baseline of empty inline and text frames. r=dshin
Added Gecko reftests because I don't know what the best place to put
them in WPT is, and caret rendering is kind of undefined, but...

Differential Revision: https://phabricator.services.mozilla.com/D229926
2024-11-24 14:46:16 +00:00
Goloman Adrian
caa559759f Backed out 3 changesets (bug 1932800) for causing marionette failures @test_accessiblecaret_cursor_mode.py. CLOSED TREE
Backed out changeset f40a44add850 (bug 1932800)
Backed out changeset 7cda61151052 (bug 1932800)
Backed out changeset 4974ccf274fa (bug 1932800)
2024-11-24 15:16:48 +02:00
Emilio Cobos Álvarez
b121dde1da Bug 1932800 - Fix caret baseline of empty inline and text frames. r=dshin
Added Gecko reftests because I don't know what the best place to put
them in WPT is, and caret rendering is kind of undefined, but...

Differential Revision: https://phabricator.services.mozilla.com/D229926
2024-11-23 12:46:48 +00:00
Sandor Molnar
e7348a5625 Backed out 3 changesets (bug 1932800) for causing reftest failures. CLOSED TREE
Backed out changeset c06b939ca2f2 (bug 1932800)
Backed out changeset 048956318eb0 (bug 1932800)
Backed out changeset 333442d03d1a (bug 1932800)
2024-11-23 12:40:11 +02:00
Emilio Cobos Álvarez
8121200d6a Bug 1932800 - Fix caret baseline of empty inline and text frames. r=dshin
Added Gecko reftests because I don't know what the best place to put
them in WPT is, and caret rendering is kind of undefined, but...

Differential Revision: https://phabricator.services.mozilla.com/D229926
2024-11-23 09:00:29 +00:00
Sean Feng
9f96024990 Bug 1931909 - Make the assertion that check selection caching MOZ_ASSERT r=emilio
This is a NS_ASSERTION now. When I worked selection related code,
I noticed that this assertion always pointed to actual bugs in my code,
and I don't see we hit this assertion in current code, so it
should be a MOZ_ASSERT in my opinion.

Differential Revision: https://phabricator.services.mozilla.com/D229371
2024-11-18 20:46:24 +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
Emily McDonough
3ada87c36c Bug 1929360 - Reserve capacity before bulk append in CreateObserversForAnimatedGlyphs r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D228084
2024-11-07 23:14:23 +00:00
Jonathan Kew
6970714eba Bug 1927709 - Properly preserve newlines in GetRenderedText for textframes with white-space:pre-line. r=jwatt
This makes innerText better reflect the actual rendered text, and matches the result
seen in Blink for the testcase.

Differential Revision: https://phabricator.services.mozilla.com/D227164
2024-10-30 14:28:01 +00:00
Butkovits Atila
652ebd2c2e Backed out changeset d9d099719789 (bug 1927709) for causing failures at browser_textleafpoint.js. CLOSED TREE 2024-10-29 22:34:16 +02:00
Jonathan Kew
afb87cf3ef Bug 1927709 - Properly preserve newlines in GetRenderedText for textframes with white-space:pre-line. r=jwatt
This makes innerText better reflect the actual rendered text, and matches the result
seen in Blink for the testcase.

Differential Revision: https://phabricator.services.mozilla.com/D227164
2024-10-29 15:18:31 +00:00
serge-sans-paille
262f78c07f Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-28 08:21:19 +00:00
Alexandru Marc
a5eb905bf4 Backed out changeset d92f391b3b0c (bug 1922838) for backing out bug 1915351 2024-10-25 16:42:33 +03:00
serge-sans-paille
07101ac24d Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 09:06:01 +00:00
Alexandru Marc
004e704b22 Backed out changeset 448597bce69d (bug 1922838) for causing build bustages. CLOSED TREE 2024-10-24 11:37:49 +03:00
serge-sans-paille
2c916d4973 Bug 1922838 - Replace ArrayLength, ArrayEnd and MOZ_ARRAY_LENGTH by standard alternative r=glandium,necko-reviewers,jgilbert,application-update-reviewers,media-playback-reviewers,credential-management-reviewers,anti-tracking-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,bytesized,janv,dimi,daisuke,karlt,gstoll,canaltinova,timhuang
Namely std::size, std::end and std::size. This drops C support for
MOZ_ARRAY_LENGTH but it wasn't used anyway.

Differential Revision: https://phabricator.services.mozilla.com/D224611
2024-10-24 07:38:30 +00:00
Jonathan Kew
971b964316 Bug 1923829 - Check the correct frame when iterating over continuations in nsTextFrame::GetRenderedText. r=dshin
For clarity, we refactor body of the loop-over-continuations in
nsTextFrame::GetRenderedText into a helper method AppendRenderedText
that handles a single continuation in the chain.

This avoids the footgun of an nsTextFrame method iterating over its
continuations (using the textFrame variable) but potentially calling
methods of the primary frame within the loop, instead of the current
frame being processed.

Differential Revision: https://phabricator.services.mozilla.com/D225686
2024-10-17 18:24:09 +00:00
Jonathan Kew
a93a779c56 Bug 1919511 - Rename gfxFontGroup::BuildFontList to EnsureFontList, and defer calling it until we really need the resolved font instances. r=layout-reviewers,emilio
This is preparation for splitting out separate per-script resolved font lists in gfxFontGroup.
By itself, it should not change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D222748
2024-10-12 15:37:18 +00:00
Tamas Szentpeteri
5c914102f8 Backed out changeset 8c451596a34f (bug 1919511) for causing mochitest failures on gfxUserFontSet.cpp. CLOSED TREE 2024-10-10 16:13:48 +03:00
Jonathan Kew
da08a70728 Bug 1919511 - Rename gfxFontGroup::BuildFontList to EnsureFontList, and defer calling it until we really need the resolved font instances. r=layout-reviewers,emilio
This is preparation for splitting out separate per-script resolved font lists in gfxFontGroup.
By itself, it should not change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D222748
2024-10-10 09:43:59 +00:00
Jonathan Kew
015a867848 Bug 1884118 - Make letter-spacing accept <length-percentage>, not just <length>. r=dshin
As per https://drafts.csswg.org/css-text-4/#letter-spacing-property.

Differential Revision: https://phabricator.services.mozilla.com/D224747
2024-10-07 15:54:23 +00:00
serge-sans-paille
05acc5a9a3 Bug 1921348 - Remove global constructor from layout/generic/nsTextFrame.cpp r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D223872
2024-10-04 09:55:14 +00:00
Jonathan Kew
26ee40e65a Bug 1885702 - Fix initialization of masked text fragment in ClusterIterator. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D223050
2024-09-25 17:44:22 +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
Jonathan Kew
b2ea078648 Bug 1919812 - Vertical Mongolian text takes underline on the right, like Japanese & Korean. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D222809
2024-09-21 08:38:02 +00:00
Jonathan Kew
3f3a8c3e8d Bug 1919658 - Add support for text-emphasis-position:auto. r=layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D222855
2024-09-20 20:15:19 +00:00
Emilio Cobos Álvarez
3ca9c49882 Bug 1917715 - Rename nsLayoutUtils::GetColor. r=longsonr,dholbert
It's suitable for foreground colors only.

Differential Revision: https://phabricator.services.mozilla.com/D221557
2024-09-09 23:12:05 +00:00
Ting-Yu Lin
116ca76700 Bug 1909761 Part 3 - Use IntrinsicSizeInput for AddInlineMinISize() and AddInlinePrefISize(). r=dholbert
Another preparation patch in order to pass down a percentage basis when
computing intrinsic size.

Differential Revision: https://phabricator.services.mozilla.com/D219522
2024-09-03 04:25:42 +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
caac17bc1b Bug 1909761 Part 3 - Use IntrinsicSizeInput for AddInlineMinISize() and AddInlinePrefISize(). r=dholbert
Another preparation patch in order to pass down a percentage basis when
computing intrinsic size.

Differential Revision: https://phabricator.services.mozilla.com/D219522
2024-08-28 06:18:44 +00: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
899ed77a9f Bug 1912667 - Do not apply text-emphasis marks to punctuation characters (with some exceptions, per css-text-decor spec). r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D219099
2024-08-14 14:23:17 +00:00
Sandor Molnar
bd839a9def Backed out changeset c8f5afbb26a5 (bug 1912667) for causing build bustages @ layout/generic/nsTextFrame.cpp CLOSED TREE 2024-08-14 17:00:07 +03:00
Jonathan Kew
df2f73e279 Bug 1912667 - Do not apply text-emphasis marks to punctuation characters (with some exceptions, per css-text-decor spec). r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D219099
2024-08-14 11:39:06 +00:00