[wpt-sync] Sync PR 16151 - [css-properties-values-api] Absolutize initial <url> values.

RESOLVED FIXED in Firefox 68

Status

()

defect
P4
normal
RESOLVED FIXED
3 months ago
2 months ago

People

(Reporter: wptsync, Unassigned)

Tracking

unspecified
mozilla68
Points:
---

Firefox Tracking Flags

(firefox68 fixed)

Details

(Whiteboard: [wptsync downstream], )

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

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

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

[css-properties-values-api] Absolutize initial <url> values.

The computed value would incorrectly remain relative for the initial value
of \<url>-registered custom properties. This is because it did not undergo
the token-rewriting done for non-initial properties.

Since the token-rewriting function was implemented, circumstances have
changed a little: there is now a general absolutization mechanism (i.e.
StyleBuilderConverter::ConvertRegisteredPropertyVariableData). Therefore,
this CL performs the URL absolutization on the CSSValue-level rather than
the token level. This automatically also catches the initial-value case.

Note that CSSVariableDatas with var()-references would previously "forget"
their base URL and TextEncoding when resolved. This didn't matter in
practice, because we would already have rewritten the tokens at that point.
However, it matters now, since the URL is now made absolute after the
CSSVariableData is resolved. Hence, CSSVariableData::CreateResolved has
gained the appropriate parameters.

R=futhark@chromium.org

Bug: 641877
Change-Id: I0fd80664adb49e60df24dcc0e91d23872f61fdb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1528188
Reviewed-by: Rune Lillesveen \<futhark@chromium.org>
Commit-Queue: Anders Hartvoll Ruud \<andruud@chromium.org>
Cr-Commit-Position: refs/heads/master@{#646218}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Failed to get results from try push
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/af86195c84cc
[wpt PR 16151] - [css-properties-values-api] Absolutize initial <url> values., a=testonly
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Whiteboard: [wptsync downstream error] → [wptsync downstream]
You need to log in before you can comment on or make changes to this bug.