Open Bug 2009740 Opened 1 day ago Updated 1 day ago

[wpt-sync] Sync PR 57125 - [SVG] Disallow Unitless Lengths in CSS Variable Substitution for `SVGLength`

Categories

(Core :: SVG, task, P4)

task

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Divyansh Mangal <dmangal@microsoft.com> wrote:

[SVG] Disallow Unitless Lengths in CSS Variable Substitution for SVGLength

Variable substitution occurs in the cascade phase, which does not
allow unitless lengths like "10","20" etc. In CL:7123806 we allowed
CSS substitution values like var() for SVGLength and there we
kept the SVG specific behaviour of allowing unitless lengths.

Discussions with Gecko and WebKit teams clarified that unitless
lengths should remain valid only within SVG presentation attributes,
and should not be allowed during CSS variable substitution.

In this CL, we remove the SVG specific quirk of allowing unitless
lengths in CSS substitution values by passing the document's parser
during CSSUnparsedDeclarationValue creation.

Bug: 470897147
Change-Id: If7e69990c845642727e09c2956b07a8d78f0ebb4
Reviewed-on: https://chromium-review.googlesource.com/7274991
WPT-Export-Revision: b25a6c84552655ca28f57f1473d17c1c3137afcb

Component: web-platform-tests → SVG
Product: Testing → Core
You need to log in before you can comment on or make changes to this bug.