Closed Bug 2029025 Opened 3 months ago Closed 2 months ago

[wpt-sync] Sync PR 58960 - [SVG] Revert CSS width/height as presentation attributes on <use>

Categories

(Core :: SVG, task, P4)

task

Tracking

()

RESOLVED FIXED
151 Branch
Tracking Status
firefox151 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Virali Purbey <viralipurbey@microsoft.com> wrote:

[SVG] Revert CSS width/height as presentation attributes on <use>

Per the SVG WG resolution from 2026-02-05 [1] and the spec update
[2], CSS width and height properties are honored as presentation
attributes only for \<rect>, \<image>, \<foreignObject>, and outer-SVG
elements. They are ignored by all other elements with width/height
attributes, including \<use>.

This CL reverts the changes from [3] that added CSS width/height
support on \<use>. The \<symbol> related changes from [4] were already
reverted separately.

Changes:

  • Remove CSSPropertyID mapping for width/height on SVGUseElement.
  • Remove the WidthAndHeightStylePropertiesOnUseAndSymbol and
    CollectWidthAndHeightAsPresentationAttributesForUse runtime flags.
  • Remove viewport override logic from \<use> parent style in
    LayoutSVGViewportContainer.
  • Mark the kUseCssSizingProperties use counter as obsolete.
  • Update WPT presentation-attributes-special-cases to remove use
    from tested elements.
  • Update use-*-inline-css reftests to verify CSS width/height is
    ignored on \<use> (attribute values are used instead).
  • Delete redundant use-symbol-inline-css-003.svg (covered by
    existing use-symbol-dimensions-override tests).

[1] https://www.w3.org/2026/02/05-svg-minutes.html#cba7
[2] https://github.com/w3c/svgwg/pull/1059
[3] https://chromium-review.googlesource.com/c/chromium/src/+/6646865
[4] https://chromium-review.googlesource.com/c/chromium/src/+/6646866

Bug: 41413321, 40377919
Change-Id: I8514a582b396ed38bae50ab15d2769c7ec83ca22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7719827
Commit-Queue: Virali Purbey \<viralipurbey@microsoft.com>
Reviewed-by: Fredrik Söderquist \<fs@opera.com>
Reviewed-by: Divyansh Mangal \<dmangal@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1609462}

Component: web-platform-tests → SVG
Product: Testing → Core

CI Results

Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 115 tests and 10 subtests

Status Summary

Firefox

OK : 1[GitHub] 12[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
PASS: 2[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 28[GitHub] 315[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 378[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]
FAIL: 1[GitHub] 17[Gecko-windows11-32-24h2-debug, Gecko-windows11-32-24h2-opt] 53[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview] 54[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-24h2-debug, Gecko-windows11-64-24h2-opt]

Chrome

OK : 1
PASS: 26
FAIL: 3

Safari

OK : 1
PASS: 21
FAIL: 8

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Tests Disabled in Gecko Infrastructure

Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 151 Branch
You need to log in before you can comment on or make changes to this bug.