Closed Bug 1732652 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 30908 - Reland "[@layer] Fix cascade ordering of inline style and layered style"

Categories

(Core :: CSS Parsing and Computation, task, P4)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

Reland "[@layer] Fix cascade ordering of inline style and layered style"

This is a reland of crrev.com/c/3167095 with a bug fix that,
presentational hints should be added to match result without setting the
is_inline_style flag.

Test case presentational-hints-cascade.html somehow passed in the
original patch with the bug due to an experimental feature
CustomElementDefaultStyle. This patch adds it to the virtual/stable test
suite to make sure it fails without the bug fix.

Original description:

This patch adds a new flag to MatchResult and CascadePriority to
indicate if a declaration is from inline style or other style sheets, so
that we can compare inline style and other layered style correctly.

Without this flag, currently we are treating inline style as regular
declarations in the implicit outer layer, and therefore mistakenly
override it with layered style rules in other style sheets.

Bug: 1095765
Change-Id: Ibeb0ed2d7e571c136bb4a636b99a766fc9b6e4b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3174310
Reviewed-by: Anders Hartvoll Ruud \<andruud@chromium.org>
Reviewed-by: Philip Rogers \<pdr@chromium.org>
Commit-Queue: Xiaocheng Hu \<xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/main@{#924101}

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core

CI Results

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

Total 2 tests and 2 subtests

Status Summary

Firefox

OK : 2
PASS: 6

Chrome

OK : 2
PASS: 5
FAIL: 1

Safari

OK : 2
PASS: 5
FAIL: 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7643034b7a84
[wpt PR 30908] - Reland "[@layer] Fix cascade ordering of inline style and layered style", a=testonly
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/09eed2bd9495
[wpt PR 30908] - Reland "[@layer] Fix cascade ordering of inline style and layered style", a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.