Closed Bug 1951696 Opened 22 days ago Closed 14 days ago

[wpt-sync] Sync PR 51095 - [functions] Make cycle detection StyleRuleFunction-specific

Categories

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

task

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

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

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

Anders Hartvoll Ruud <andruud@chromium.org> wrote:

[functions] Make cycle detection StyleRuleFunction-specific

Cycle detection for local variables and functions is currently based
on the name of those things. That is not enough:

  • The same local variable name can appear multiple times in a call
    chain; it's only cyclic if you end up back at the same local variable
    in the exact same function.
  • Similarly, the same function name can appear multiple times in a call
    chain due to ShadowDOM; it's only cyclic if you end up back at
    the exact same function.

Therefore, we need to store the actual StyleRuleFunction pointer for
cycle detection purposes.

Cycle detection is now a bit messy; hopefully we'll able to clean this
up quite a bit if/when Issue 372475301 and Issue 397690639 are carried
out.

Bug: 325504770
Change-Id: Ide664ffc8a1dcdacaf6a8ddbdf0607948877af52
Fixed: 397485310
Reviewed-on: https://chromium-review.googlesource.com/6287376
WPT-Export-Revision: 1762a15baf8080ac759f359e500b9f2791dd9fb2

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

CI Results

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

Total 2 tests and 11 subtests

Status Summary

Firefox

OK : 2
FAIL: 36

Chrome

OK : 2
PASS: 33
FAIL: 3

Safari

OK : 2
FAIL: 36

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /css/css-mixins/dashed-function-cycles.tentative.html [wpt.fyi]
    • Local with self-cycle: FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle reference without fallback makes result invalid: FAIL (Chrome: PASS, Safari: FAIL)
    • Local with self-cycle in fallback: FAIL (Chrome: PASS, Safari: FAIL)
    • Local shadowing cyclic property --x: FAIL (Chrome: PASS, Safari: FAIL)
    • Local shadowing cyclic outer local --x: FAIL (Chrome: PASS, Safari: FAIL)
    • Argument shadowing cyclic outer local --x: FAIL (Chrome: PASS, Safari: FAIL)
    • Arguments shadowing cyclic properties: FAIL (Chrome: PASS, Safari: FAIL)
    • Observing property cycle locally: FAIL (Chrome: PASS, Safari: FAIL)
    • Using cyclic values with no fallback: FAIL (Chrome: PASS, Safari: FAIL)
    • Self-cycle in non-used local variable: FAIL (Chrome: PASS, Safari: FAIL)
    • Using cyclic value in unused fallback: FAIL (Chrome: PASS, Safari: FAIL)
    • Using cyclic value in unused fallback (local): FAIL (Chrome: PASS, Safari: FAIL)
    • Dashed-function, self-cycle: FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle through other function (--g): FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle through other function (--f): FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle through local, self: FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle through unused local: FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle through global, self: FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle through local, other function: FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle through local, other function, fallback in function: FAIL (Chrome: PASS, Safari: FAIL)
    • Cycle through various variables and other functions: FAIL (Chrome: PASS, Safari: FAIL)
    • Function in a cycle with its own default: FAIL (Chrome: PASS, Safari: FAIL)
    • Cyclic defaults: FAIL (Chrome: PASS, Safari: FAIL)
    • Cyclic outer --b shadows custom property: FAIL (Chrome: FAIL, Safari: FAIL)
    • Locals are function specific: FAIL (Chrome: FAIL, Safari: FAIL)
  • /css/css-mixins/function-shadow.html [wpt.fyi]
    • @function works inside shadow: FAIL (Chrome: PASS, Safari: FAIL)
    • Looking up document-global function: FAIL (Chrome: PASS, Safari: FAIL)
    • @function works inside nested shadow: FAIL (Chrome: PASS, Safari: FAIL)
    • @function defined in outer shadow is visible: FAIL (Chrome: PASS, Safari: FAIL)
    • Combining functions from various scopes: FAIL (Chrome: PASS, Safari: FAIL)
    • ::part() can not see inner functions: FAIL (Chrome: PASS, Safari: FAIL)
    • ::slotted() can see inner functions: FAIL (Chrome: PASS, Safari: FAIL)
    • :host can see inner functions: FAIL (Chrome: PASS, Safari: FAIL)
    • Outer functions can't see inner functions: FAIL (Chrome: PASS, Safari: FAIL)
    • Outer functions can't see inner functions (local vars): FAIL (Chrome: PASS, Safari: FAIL)
    • Function with same name in different scopes: FAIL (Chrome: FAIL, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0ebfd530476d [wpt PR 51095] - [functions] Make cycle detection StyleRuleFunction-specific, a=testonly https://hg.mozilla.org/integration/autoland/rev/3ed810d17cbe [wpt PR 51095] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.