Closed Bug 1768534 Opened 2 years ago Closed 2 years ago

[wpt-sync] Sync PR 34005 - Fix block & unblock ordering when an inline style sheet mutates

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

Fix block & unblock ordering when an inline style sheet mutates

When an inline \<style> mutates, it calls AddPendingBlockingSheet() for
the new style sheet first, and then calls RemovePendingBlockingSheet()
for the old style sheet.

This used to be fine when those two methods were just adding /
subtracting some counters. However, after crrev.com/c/3503857, the two
methods become adding / removing the \<style> element into / from the
RenderBlockingResourceManager class's set of pending elements, which
assumes that we never double-add or double-remove any element. Then the
relevant states are broken.

This patch reorders the call sites of the two methods to make sure we
remove it before re-adding it.

Fixed: 1323319
Change-Id: If28e35fb794e7bd2d77107ab4f8e867ad66d88ba
Reviewed-on: https://chromium-review.googlesource.com/3636301
WPT-Export-Revision: 84fccbf3074146113e770a7f1225c499353aecd0

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

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

Total 1 tests and 1 subtests

Status Summary

Firefox

OK : 1
PASS: 1

Chrome

OK : 1
PASS: 1

Safari

OK : 1
PASS: 1

Links

GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/467a28b6a1ad
[wpt PR 34005] - Fix block & unblock ordering when an inline style sheet mutates, a=testonly
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
You need to log in before you can comment on or make changes to this bug.