WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 200445
182172
SVG2: WebKit incorrectly disregards "width" and "height" attributes on SVG <symbol> element
https://bugs.webkit.org/show_bug.cgi?id=182172
Summary
SVG2: WebKit incorrectly disregards "width" and "height" attributes on SVG <s...
Daniel Holbert
Reported
2018-01-26 09:41:51 PST
What steps will reproduce the problem? (1) Visit
https://jsfiddle.net/mca17zyk/
What is the expected result? Small purple rectangle and square. (Each 20px tall.) What happens instead? The square is huge. Please use labels and text to provide additional information. Per SVG2, the square (really, the <use>-generated <svg> element that gets filled with a 100%-sized purple rect) should take its width/height attributes from the <symbol> element that it cloned. That <symbol> element has width=20 height=20, so its <svg> clone should as well. The rectangle (the first purple thing in the testcase) works correctly because it explicitly overrides the width and height by setting those attributes on the use element itself. But if they're unset on <use>, then we should use the ones from the <symbol>. WebKit's behavior here would be correct per SVG 1.1:
https://www.w3.org/TR/SVG11/struct.html#SymbolElement
...but it's incorrect per SVG 2:
https://svgwg.org/svg2-draft/struct.html#SymbolElement
The specific commit in the SVG 2 spec repo is here:
https://github.com/w3c/svgwg/commit/ca0f76bf83825505e17d8b69ead26b01d3bc75dc#diff-6e6915b15fe92e713aecbcc7786991f6R449
That commit added x,y,width,height to <symbol>, and added prose saying they should have the same effect on clones-of-<symbol> as they have on an <svg> element. Firefox gives "Expected Results" here.
Attachments
testcase 1 (same as jsfiddle)
(880 bytes, text/html)
2018-01-26 09:50 PST
,
Daniel Holbert
no flags
Details
reduced test case
(202 bytes, image/svg+xml)
2019-11-05 09:04 PST
,
Said Abou-Hallawa
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Daniel Holbert
Comment 1
2018-01-26 09:50:57 PST
Created
attachment 332378
[details]
testcase 1 (same as jsfiddle)
Daniel Holbert
Comment 2
2018-01-26 09:51:29 PST
I filed Chrome/Edge bugs as well, for the record:
https://bugs.chromium.org/p/chromium/issues/detail?id=806289
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/15641029/
Michal Vašíček
Comment 3
2019-11-04 13:53:28 PST
This was already fixed in Chrome in March 2019, any updates on this?
Radar WebKit Bug Importer
Comment 4
2019-11-04 15:14:15 PST
<
rdar://problem/56882593
>
Said Abou-Hallawa
Comment 5
2019-11-05 09:04:51 PST
Created
attachment 382828
[details]
reduced test case
Ahmad Saleem
Comment 6
2023-05-10 00:28:39 PDT
This seems to be similar to
bug 200445
? Can we mark this as duplicate of 200445, since I have already done PR for that?
Daniel Holbert
Comment 7
2023-05-10 07:09:33 PDT
Sure, that's fine with me!
Ahmad Saleem
Comment 8
2023-05-10 14:42:04 PDT
*** This bug has been marked as a duplicate of
bug 200445
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug