Closed Bug 1842306 Opened 1 year ago Closed 1 year ago

[wpt-sync] Sync PR 40926 - [anchor-position] Properly implement CSSOM API classes

Categories

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

task

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Xiaocheng Hu <xiaochengh@chromium.org> wrote:

[anchor-position] Properly implement CSSOM API classes

This patch adds proper implementation of the CSSPositionFallbackRule
and CSSTryRule API as specified [1]:

  1. It reimplements CSSPositionFallbackRule as a subclass of
    CSSGroupingRule, and StyleRulePositionFallback as a subclass
    of StyleRuleGroup.

  2. It adds some code to CSSGroupingRule.insertRule() to make sure
    the function only adds @try rules into CSSPositionFallbackRule.

  3. Since CSSStyleRule.style.setProperty() can add disallowed
    properties into a @try block [2], this patch also adds filtering
    into the style cascade to make sure when applying the style from
    a @try rule, only allowed properties' values are applied.

This patch also manually adds the IDL of the APIs into wpt so that we
can add idlharness test without waiting for the IDL auto roller.

[1] https://drafts.csswg.org/css-anchor-position-1/#interfaces
[2] https://github.com/w3c/csswg-drafts/issues/9042

Bug: 1309178
Change-Id: Ib7700605a9968a3547fbe99197c882e8aa6caaea

Reviewed-on: https://chromium-review.googlesource.com/4668131
WPT-Export-Revision: de3a0d86da08ef3c15ed814437ecb374f6d50727

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

CI Results

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

Total 2 tests and 25 subtests

Status Summary

Firefox

OK : 2
PASS: 2
FAIL: 25

Chrome

OK : 2
PASS: 20
FAIL: 8

Safari

OK : 2
PASS: 2
FAIL: 25

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-anchor-position/at-position-fallback-cssom.html [wpt.fyi]
    • CSSPositionFallbackRule and CSSTryRule attribute values: FAIL (Chrome: FAIL, Safari: FAIL)
    • CSSPositionFallbackRule.insertRule can insert @try rules only: FAIL (Chrome: FAIL, Safari: FAIL)
    • CSSTryRule.style.setProperty setting allowed and disallowed properties: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-anchor-position/idlharness.html [wpt.fyi]
    • CSSPositionFallbackRule interface: existence and properties of interface object: FAIL (Chrome: FAIL, Safari: FAIL)
    • CSSPositionFallbackRule interface object length: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSPositionFallbackRule interface object name: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSPositionFallbackRule interface: existence and properties of interface prototype object: FAIL (Chrome: FAIL, Safari: FAIL)
    • CSSPositionFallbackRule interface: existence and properties of interface prototype object's "constructor" property: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSPositionFallbackRule interface: existence and properties of interface prototype object's @@unscopables property: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSPositionFallbackRule interface: attribute name: FAIL (Chrome: PASS, Safari: FAIL)
    • Stringification of positionFallback: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSPositionFallbackRule interface: positionFallback must inherit property "name" with the proper type: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface: existence and properties of interface object: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface object length: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface object name: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface: existence and properties of interface prototype object: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface: existence and properties of interface prototype object's "constructor" property: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface: existence and properties of interface prototype object's @@unscopables property: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface: attribute style: FAIL (Chrome: FAIL, Safari: FAIL)
    • CSSTryRule must be primary interface of try1: FAIL (Chrome: PASS, Safari: FAIL)
    • Stringification of try1: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface: try1 must inherit property "style" with the proper type: FAIL (Chrome: FAIL, Safari: FAIL)
    • CSSTryRule must be primary interface of try2: FAIL (Chrome: PASS, Safari: FAIL)
    • Stringification of try2: FAIL (Chrome: PASS, Safari: FAIL)
    • CSSTryRule interface: try2 must inherit property "style" with the proper type: FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc2512898d97 [wpt PR 40926] - [anchor-position] Properly implement CSSOM API classes, a=testonly https://hg.mozilla.org/integration/autoland/rev/abfc7d09019b [wpt PR 40926] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.