Closed Bug 2086861 Opened 1 month ago Closed 22 days ago

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

Categories

(Core :: CSS Parsing and Computation, 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 64175 into mozilla-central (this bug is closed when the sync is complete).

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

Alan Baradlay <zalan@apple.com> wrote:

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

WebKit export from bug: anchor(<!---->right)<!----> does not resolve to an inline anchor'<!---->s right edge in vertical-<!---->rl

<pre>
anchor(right) does not resolve to an inline anchor's right edge in vertical-rl

boxBoundingBoxInContainer maps the anchor's box into the containing block with localToContainerQuad. For a
RenderInline, borderBoundingBox() is a rect at the origin carrying only the size (see RenderInline.h), so
what gets mapped has no position, and the position was added afterwards from linesBoundingBox().location().
That composes in an unflipped writing mode but not in a flipped one, where mapping through a box flips
against that box's own size: the flip lands on a rect sitting at the origin. Map the line boxes' rect
instead, which carries the position through the flip.

Measured for a 200px wide containing block in vertical-rl, with the anchor one Ahem glyph on the second line:
anchor(right) is 180 and the anchored element's left edge came out at 220. The error is the anchor's block
axis offset doubled, so it grows per line: 40 with one line break, 80 with two.

The inline needs a non-zero block axis offset, which is why the last case in the test passes without this
change. Anonymous block generation hides the other cases where the anchor's inline content sits in an
anonymous block of its own, because that block's block axis extent equals the inline's and flipping inside
it is a no-op.

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

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 535 tests

Status Summary

Firefox

OK : 1[GitHub] 264[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, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 5[GitHub] 42[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 13565[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 13746[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] 13761[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 13764[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL: 138[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 166[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 169[Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 183[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

OK : 1
PASS: 5

Safari

OK : 1
PASS: 5

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: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.