[wpt-sync] Sync PR 33525 - Always rebuild CascadeLayerMap if active style sheets changed
Categories
(Core :: CSS Parsing and Computation, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox101 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 33525 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/33525
Details from upstream follow.
Xiaocheng Hu <xiaochengh@chromium.org> wrote:
Always rebuild CascadeLayerMap if active style sheets changed
When active style sheets changed, StyleEngine::ApplyRuleSetChanges()
always resets the ScopedStyleResolver of a tree scope (which includes
clearing the CascadeLayerMap), but then rebuilds CascadeLayerMap only
if the changed rule sets include layer rules. This results in a bug that
if we change a rule set without layer rules, then all the existing
layers are cleared, and all the previously layered rules break into the
default layer.This patch fixes it by rebuilding the CascadeLayerMap if active style
sheets have changed, regardless of whether the change has layer rules.Fortunately, this bug does not apply to other name-defining at-rules.
Other at-rules are either directly managed on StyleEngine, or are
reinserted in AppendActiveStylesheets().Fixed: 1313357
Change-Id: I702a6421416aea2634537b6d9650399b68e25f0aReviewed-on: https://chromium-review.googlesource.com/3572544
WPT-Export-Revision: 025a739aa6fe84c8038f63e6f3032d11168c17f2
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=30d64e0c6d5074ab6685951ab3056e56c19f73c1
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/34668c63d1a8 [wpt PR 33525] - Always rebuild CascadeLayerMap if active style sheets changed, a=testonly
Comment 3•2 years ago
|
||
bugherder |
Description
•