[Webkit-unassigned] [Bug 258003] SVGLengthValue.cpp should support rem (probably other) units for width and height attributes
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 13 18:33:51 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=258003
--- Comment #6 from Karl Dubost <karlcow at apple.com> ---
Starting with data:text/html,<svg%20width="50"></svg>
We get for document.querySelector('svg').width.baseVal
unitType: 1
value: 50
valueAsString: "50"
valueInSpecifiedUnits: 50
Let's set to 3 rem.
document.querySelector('svg').setAttribute('width', '3rem')
unitType: 2 (SVG_LENGTHTYPE_PERCENTAGE)
value: 48
valueAsString: "100%"
valueInSpecifiedUnits: 100
Why the 48 here?
It reports the issue
reportAttributeParsingError(parseError, name, newValue);
and then goes on with:
SVGFitToViewBox::parseAttribute(name, newValue);
SVGZoomAndPan::parseAttribute(name, newValue);
SVGGraphicsElement::attributeChanged(name, oldValue, newValue, attributeModificationReason);
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230614/dd450d62/attachment.htm>
More information about the webkit-unassigned
mailing list