Bug 307677
| Summary: | removeAttribute for width/height on svg root element is trying to set an empty invalid string | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ahmad.saleem792, sabouhallawa, webkit-bug-importer, zimmermann |
| Priority: | P2 | Keywords: | InRadar, WPTImpact |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://wpt.live/svg/coordinate-systems/outer-svg-intrinsic-size-002.html | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=257758 | ||
Karl Dubost
About http://wpt.live/svg/coordinate-systems/outer-svg-intrinsic-size-002.html
data:text/html,<!doctype html><title>svg</title><svg></svg>
document.querySelector("svg").width.baseVal.value
300
document.querySelector("svg").height.baseVal.value
150
so far so good.
data:text/html,<!doctype html><title>svg</title><svg width="500" height="500"></svg>
document.querySelector("svg").width.baseVal.value
500
document.querySelector("svg").height.baseVal.value
500
Firefox/Chrome
document.querySelector("svg").removeAttribute("width")
undefined
document.querySelector("svg").width.baseVal.value
300
Safari
document.querySelector("svg").removeAttribute("width")
Error: Invalid value for <svg> attribute width=""
document.querySelector("svg").width.baseVal.value
500
setAttribute is working but removeAttribute defaults to trying to set the empty string (invalid) instead of reinitializing to the initial default value.
to 300 for width
and 150 for height
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/170233990>
Ahmad Saleem
https://github.com/WebKit/WebKit/pull/58695 <- Fixing `Error: Invalid value for <svg> attribute width=""` this issue - it wouldn't progress this WPT though.