Closed Bug 1794197 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 36344 - Make sure ::first-letter is always reached for re-attach

Categories

(Core :: Layout: Generated Content, Lists, and Counters, task, P4)

task

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Rune Lillesveen <futhark@chromium.org> wrote:

Make sure ::first-letter is always reached for re-attach

Generally we do not store ComputedStyle for elements which are not
rendered. In some cases we do not know this at recalc time and get a
non-rendered subtree with ComputedStyles. One such case is when the
content property makes a non-replaced element render as a replaced
image.

In such cases we will not traverse this subtree unless there are dirty
bits to be cleared. If there is a ::first-letter pseudo element in the
subtree that needs style recalc, it may be left a NeedsStyleRecalc()
flag set to be handled and cleared for AttachLayoutTree().

We cannot clear the style-dirty bit because we need to know if we need
to do a recalc when AttachLayoutTree() happens. Instead, make sure we
reach the ::first-letter in all cases for AttachLayoutTree() by
explicitly marking it for re-attachment.

Bug: 1370386
Change-Id: I9b482d0ded063678b34289165160c8f32a8395e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3936848
Reviewed-by: Anders Hartvoll Ruud \<andruud@chromium.org>
Commit-Queue: Rune Lillesveen \<futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1056289}

Component: web-platform-tests → Layout: Generated Content, Lists, and Counters
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8b56a12f150 [wpt PR 36344] - Make sure ::first-letter is always reached for re-attach, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
You need to log in before you can comment on or make changes to this bug.