Bug 268363 - [SVG] baseval.value of an SVG element nested inside a symbol returns an error
Summary: [SVG] baseval.value of an SVG element nested inside a symbol returns an error
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari 17
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: https://wpt.fyi/results/svg/geometry/...
Keywords: BrowserCompat, InRadar, WPTImpact
Depends on:
Blocks:
 
Reported: 2024-01-30 00:40 PST by Karl Dubost
Modified: 2024-01-30 00:40 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Dubost 2024-01-30 00:40:35 PST
https://codepen.io/webcompat/pen/Jjzpogz

  <svg>
    <symbol>
      <g>
        <rect id="r1" width="20%" height="30%" />
      </g>
    </symbol>
  </svg>


the width of the rect returns:

Safari:
=======================================
width.baseVal.valueAsString: 20%
width.baseVal.valueInSpecifiedUnits: 20
=======================================
with an error message in the console:
NotSupportedError: The operation is not supported.


Firefox:
=======================================
width.baseVal.valueAsString: 20%
width.baseVal.valueInSpecifiedUnits: 20
width.baseVal.value: 60
=======================================


If you remove the symbol element, it returns the correct result:
Safari:
=======================================
width.baseVal.valueAsString: 20%
width.baseVal.valueInSpecifiedUnits: 20
width.baseVal.value: 60
=======================================


Because of this, WebKit fails
https://wpt.fyi/results/svg/geometry/svg-baseval-in-display-none.html
Comment 1 Radar WebKit Bug Importer 2024-01-30 00:40:43 PST
<rdar://problem/121912972>