Closed
Bug 1470231
Opened 6 years ago
Closed 6 years ago
[wpt-sync] Sync PR 11611 - Correctly resolve relative URLs for registered custom properties.
Categories
(Core :: CSS Parsing and Computation, enhancement, P4)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 11611 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/11611 Details from upstream follow. Anders Hartvoll Ruud <andruud@chromium.org> wrote: > Correctly resolve relative URLs for registered custom properties. > > Relative URLs in registered custom properties must resolve against the > base URL of the originating stylesheet. For instance, consider a style- > sheet at /style/mystyle.css: > > --foo: url("myimage.jpg"); > > And a document at /index.html: > > <style> > background-image: var(--foo); > </style> > > If the property --foo is registered with syntax <url>, then the background- > image should be /style/myimage.jpg. > > This is contrary to non-registered properties, in which case the > background-image would be /myimage.jpg. > > To implement this, this patch scans for URL tokens and 'url('-function > tokens after (var-)resolving the registered custom property > (see CSSVariableResolver::ResolveCustomProperty). The token containing > the relative URL is then rewritten (in-place) to contain an absolute URL > instead. > > To avoid doing unnecessary work, we only scan the token stream if > > CSSVariableData::needs_variable_resolution_ is set. This is set either > if needs_url_resolution_ is set (because var-references could produce > relative URLs), or if the token stream contains URL/function-tokens. > When a resolved CSSVariableData is created (::CreateResolved), it is > assumed that the incoming token stream contains no URLs that need to be > resolved. > > R=futhark@chromium.org, timloh@chromium.org > > Bug: 851490 > Change-Id: I25b1e839fc92eb538f30670fe91fc92a1ad9d5ea > Reviewed-on: https://chromium-review.googlesource.com/1109975 > WPT-Export-Revision: 6332d424c7fbc3e3f510e1d14db620e4869b641c
Assignee | ||
Updated•6 years ago
|
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Assignee | ||
Comment 1•6 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=ac1393db47c5ee0deaa7e805f04a6d15adaba2fe
Assignee | ||
Comment 2•6 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=0a88bfa10ffd1f2cc37ac14d137c57a5eab722cd
Assignee | ||
Comment 3•6 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=753bc0d06698617ad2b447f22dd033fb661caa00
Assignee | ||
Comment 4•6 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=a92072f17eb75fcbb4d2be8150a0d83c58da64b0
Assignee | ||
Comment 5•6 years ago
|
||
Ran 1 tests and 1 subtests OK : 1 FAIL : 1 New tests that have failures or other problems: /css/css-properties-values-api/url-resolution.html Untitled: FAIL
Assignee | ||
Comment 6•6 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=af1167cffcf2e464be65fec9e88d8dd0a6aa5f5b
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/b92763af9172 [wpt PR 11611] - Correctly resolve relative URLs for registered custom properties., a=testonly https://hg.mozilla.org/integration/mozilla-inbound/rev/ec1efb77ff16 [wpt PR 11611] - Update wpt metadata, a=testonly
Comment 8•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b92763af9172 https://hg.mozilla.org/mozilla-central/rev/ec1efb77ff16
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•