Closed
Bug 1402217
Opened 8 years ago
Closed 8 years ago
stylo: custom property referring variable with cycle dependency is not marked invalid correctly
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
People
(Reporter: xidorn, Assigned: xidorn)
References
Details
Attachments
(3 files)
See the testcase.
There are three custom properties in the target element:
> --varA: var(--varB);
> --varB: var(--varA);
> --varC: var(--varB);
apparently, all of the three should be invalid, because --varA and --varB forms a dependency cycle, and --varC refers to this cycle.
However, stylo fails to mark --varC invalid in this case, but instead inherits it from the parent.
Both Gecko and Blink agree on the correct behavior (that --varC computes to its initial value rather than inheriting).
Web platform test css/css-variables-1/variable-substitution-variable-declaration.html checks this behavior.
Assignee | ||
Comment 1•8 years ago
|
||
I wouldn't say this is super important, but it is probably something we want to fix for shipping stylo.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → xidorn+moz
Assignee | ||
Comment 2•8 years ago
|
||
The current algorithm is actually very unreliable.
For a testcase like this, the cycle removal can ignore certain items depending on the order of traversal. Moving declarations around within #outer rule can lead to different result.
Assignee | ||
Comment 3•8 years ago
|
||
Assignee | ||
Comment 4•8 years ago
|
||
Assignee | ||
Comment 5•8 years ago
|
||
https://hg.mozilla.org/integration/autoland/rev/8dad665a3b1a
https://hg.mozilla.org/integration/autoland/rev/d2b23d922b73
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment 6•8 years ago
|
||
Please either request uplift or set 57 status to wontfix.
Flags: needinfo?(xidorn+moz)
Assignee | ||
Comment 7•8 years ago
|
||
I don't think it's important to uplift this. It is a behavior change, but mostly for handling error case.
status-firefox57:
--- → wontfix
Flags: needinfo?(xidorn+moz)
You need to log in
before you can comment on or make changes to this bug.
Description
•