Bug 237486

Summary: [css-cascade] revert-layer in lowest @layer ignores user and UA styles
Product: WebKit Reporter: Oriol Brufau <obrufau>
Component: CSSAssignee: Oriol Brufau <obrufau>
Status: RESOLVED FIXED    
Severity: Normal CC: clopez, darin, ews-watchlist, koivisto, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/33068
Attachments:
Description Flags
testcase
none
Patch none

Description Oriol Brufau 2022-03-04 14:51:03 PST
Created attachment 453874 [details]
testcase

<!DOCTYPE html>
<style>
@layer {
  #target {
    display: revert-layer;
  }
}
</style>
<div id="target"></div>
<script>
document.body.append(getComputedStyle(target).display);
</script>

Actual: inline
Expected: block

Chromium and Firefox do it correctly.

Spec: https://drafts.csswg.org/css-cascade-5/#revert-layer
> If there are no lower-priority declarations in the same cascade origin as the revert-layer value, the cascaded value will roll back to the previous origin.
Comment 1 Oriol Brufau 2022-03-04 16:24:07 PST
Created attachment 453879 [details]
Patch
Comment 2 EWS Watchlist 2022-03-04 16:26:20 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 3 EWS 2022-03-05 03:20:12 PST
Committed r290864 (248095@main): <https://commits.webkit.org/248095@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453879 [details].
Comment 4 Radar WebKit Bug Importer 2022-03-05 03:21:18 PST
<rdar://problem/89854114>