Closed Bug 2089399 Opened 14 days ago Closed

[wpt-sync] Sync PR 64436 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=321398

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64436 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64436
Details from upstream follow.

Alan Baradlay <zalan@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=321398

WebKit export from bug: [<!---->block-<!---->in-<!---->inline]<!----> A block level box on a line does not start a new paragraph for unicode-<!---->bidi:<!----> plaintext or text-<!---->indent:<!----> each-<!---->line

<pre>
[block-in-inline] A block level box on a line does not start a new paragraph for unicode-bidi: plaintext or text-indent: each-line

Two properties ask whether the previous line ended a paragraph, and PreviousLine answered with nothing but
endsWithLineBreak.

unicode-bidi: plaintext gives each unicode paragraph the base direction of its own first strong character.
buildBidiParagraph already counts a block level box as a paragraph separator, alongside a hard line break,
so the runs come back from ICU in the right order. The line's own base direction is decided separately in
inlineBaseDirectionForLineContent, where a line carrying a block level box does not count, so the line after
it takes the direction of the paragraph before the box rather than computing its own.

text-indent with the each-line modifier indents the first line of the block and every line after a paragraph
end. computedTextIndent takes the same flag, so the line after a block level box is not indented either.

An anonymous block hid both. One block per chunk meant each chunk was its own formatting context, resolving
its own direction from its own content and indenting its own first line. Firefox indents the line after a
block level box in both shapes, with and without an inline box around the box, which is what this matches.

Fold the two questions into one: PreviousLine::endsParagraph, true for a forced line break and for a block
level box on a line, both of which are paragraph separators. computedTextIndent's parameter is named for
what it now takes.

The text-wrap: balance path keeps its own per line record of forced breaks and is left alone here.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=321398">https://bugs.webkit.org/show_bug.cgi?id=321398</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/318886@main">https://commits.webkit.org/318886@main</a>
</pre>

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → Layout
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1277 tests and 3 subtests

Status Summary

Firefox

OK : 82
PASS: 2[GitHub] 15[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 393[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 1542[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 1545[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 1549[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL: 25[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 49[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 51[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 56[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview]

Chrome

FAIL: 2

Safari

PASS: 2

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 6 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.