Closed Bug 2092970 Opened 18 days ago Closed 14 days ago

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

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Antti Koivisto <antti@apple.com> wrote:

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

WebKit export from bug: [<!---->layout box merge]<!----> Remove the anonymous inline wrappers around display:<!----> contents text

<pre>
[layout box merge] Remove the anonymous inline wrappers around display: contents text

A text box with a display:contents DOM parent was wrapped in an anonymous inline
box so it could have a unique style. Text boxes now carry a style separately
from the parent element so this is no longer necessary.

This patch removes the wrapping. This is observable in some very specific cases
where the wrapper acted as an inline box. The new behavior aligns us with the
css-inline-3 spec and Firefox:

  • The line-height of a display:contents element no longer applies to its text.
    The line-height of the parent box does.
  • The font of the text stretches the line like a fallback font, only when the
    line-height of the parent box is normal.
  • In quirks mode the text is content of the parent box, so the line height of
    the parent box still applies.

In SVG, text in a display:contents tspan is now shifted with the baseline-shift
of the parent box, following css-display-3.

Inline layout handles text whose style differs from its parent box. The text
sits on the baseline of its parent inline box and its run rect uses its own font
metrics. Wrapping and ink overflow use the text style. The text only fast paths
take the text style from the root and its inline boxes, so content with such
text doesn't use them. SVG layout and painting take the inherited properties
from the text and baseline-shift, alignment-baseline, outline and vector-effect
from the parent box.

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

Component: web-platform-tests → Layout
Product: Testing → Core

CI Results

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

Total 264 tests

Status Summary

Firefox

OK : 1[GitHub] 39[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: 3[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 5[GitHub] 479[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 620[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-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt] 621[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt]
FAIL: 2[GitHub] 94[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 174[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt] 175[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-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 3
FAIL: 4

Safari

OK : 1
PASS: 3
FAIL: 4

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

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