Closed Bug 2094962 Opened 11 days ago Closed 8 days ago

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

Categories

(Core :: Layout, task, P4)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Alan Baradlay <zalan@apple.com> wrote:

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

WebKit export from bug: Closed \<<!---->details><!----> with a grid :<!---->:<!---->details-<!---->content keeps fallback-<!---->font text widths after a web font loads

<pre>
Closed <details> with a grid ::details-content keeps fallback-font text widths after a web font loads

 &lt;style&gt;details::details-content { display: grid }&lt;/style&gt;
 &lt;details&gt;
   &lt;summary&gt;FAQ&lt;/summary&gt;
   &lt;span style=&quot;font-family: LateWebFont; border: 1px solid&quot;&gt;Laserbehandlung&lt;/span&gt;
 &lt;/details&gt;

When the web font loads while the details is closed, opening it should show the border around the text
set in the web font. Instead the border keeps the width of the fallback font and the text runs past it.

A grid sizes its items even while its content is hidden (content-visibility: hidden), which builds and
measures the item's inline items with the fallback font, but the item's lines are never laid out. When
the web font loads, LineLayout::styleWillChange() and rootStyleWillChange() bail out because there are
no lines, so nothing marks those inline items stale and the first layout after opening reuses their widths.

When there are inline items but no lines, run the same style checks the laid out content uses (now static
InlineInvalidation functions) and mark the inline item list dirty when they ask for it.

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

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

CI Results

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

Total 1 tests

Status Summary

Firefox

PASS: 1

Chrome

PASS: 1

Safari

FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

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