I re-imported the WPT tests for the CSS Properties and Values API, and it it seems that chromium developers changed the behaviour of fallbacks with cycles. Before, if a cycle was detected, the registered variable acted like it was unset. This matches the spec (see the font-size example): <https://drafts.css-houdini.org/css-properties-values-api/#dependency-cycles-via-relative-units>. Now, it acts like it is invalid. This seems to fit with the spirit of CSS variables more, although I could not find a spec bug documenting this change. I might not be searching correctly, although it would be nice if the WPT pr linked to it if it existed. I did find the Chromium PR to the WPT repo which changed the tests: <https://github.com/web-platform-tests/wpt/pull/14039>.
Created attachment 357532 [details] Patch
Comment on attachment 357532 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=357532&action=review > Source/WebCore/css/CSSVariableReferenceValue.cpp:89 > + if ((!property || property->isInvalid()) && fallbackReturn) { > + result.appendVector(fallbackResult); > + return fallbackReturn; > + } > + > + if (!property || property->isInvalid()) > + return false; More compactly: if (!property || property->isInvalid()) { if (fallbackReturn) result.appendVector(fallbackResult); return fallbackReturn; } > LayoutTests/imported/w3c/web-platform-tests/css/css-properties-values-api/register-property-syntax-parsing-expected.txt:28 > -PASS syntax:'<length-percentage>', initialValue:'calc(-11px + 10.4%)' is valid > +FAIL syntax:'<length-percentage>', initialValue:'calc(-11px + 10.4%)' is valid The given initial value does not parse for the given syntax. Why do some of these go from PASS to FAIL? You could mention it in the ChangeLog.
Created attachment 357578 [details] Patch
Created attachment 357624 [details] Patch
Comment on attachment 357624 [details] Patch Clearing flags on attachment: 357624 Committed r239365: <https://trac.webkit.org/changeset/239365>
All reviewed patches have been landed. Closing bug.
<rdar://problem/46829637>