URLs in CSS variables must be resolved against the base URL of the stylesheet, not the document
Created attachment 438101 [details]
firstname.lastname@example.org contributed a test at https://firefoxic.github.io/test-custom-properties-working-with-url/ but I suspect this is also covered by tests in Web Platform Tests.
Uploaded a first patch to EWS to see what tests have changed results.
No coverage in WPT?!
Did the tests I added here cover this?
Created attachment 438154 [details]
(In reply to Simon Fraser (smfr) from comment #5)
> Did the tests I added here cover this?
Looks like they would, but for some reason I don’t see results changing in those when I run tests.
In the new patch I added to the existing non-WPT test we have for this. Can follow up with additional test coverage.
Those WPT have not been imported yet.
Comment on attachment 438154 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=438154&action=review
> + * fast/css/variables/support/styles/url-with-variable-is-sheet-relative.css: Added 10 more test cases.
> + * fast/css/variables/url-with-variable-is-sheet-relative-expected.html: Ditto.
> + * fast/css/variables/url-with-variable-is-sheet-relative.html: Ditto.
Would be nice to get these to WPT.
Maybe Simon’s test will be how we cover this in WPT; but I’d also be happy to try to expand the test to cover even more cases. What’s non-obvious is how there are so many subtly different code paths for shorthand vs. longhand and variable references vs. things that are not variables. That’s where the bugs have been hiding.
Committed r282403 (241664@main): <https://commits.webkit.org/241664@main>