SVG default stroke not respected with css zoom
Categories
(Core :: SVG, defect)
Tracking
()
People
(Reporter: nezriffic, Unassigned)
Details
Attachments
(1 file)
|
347 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Steps to reproduce:
Created SVG rect and circle with and without "stroke-width" property set.
According to spec, initial value for stroke-width is "1px".
Examples:
https://codepen.io/nezriffic/pen/JjQBBVo
Where:
#1 are rects without stroke-width defined
#2 are rects WITH stroke-width defined
#3 are circles without stroke-width defined
#4 are circles WITH stroke-width defined
Actual results:
When stroke-width prop not added to rect/circle, it is not respected while zooming with css zoom (keeps same stroke width no matter what zoom value is).
When stroke-width prop added (eg. stroke-width="1", which should actually by default), it is scaling correctly while using css zoom.
Expected results:
If no stroke-width is defined it should use the default (initial = 1).
Comment 1•1 year ago
|
||
I guess when there's nothing set we get https://searchfox.org/mozilla-central/source/layout/style/nsStyleStruct.cpp#767 and that isn't multiplied by any Zoom. I don't know how to tell the difference though. The style system returns either 1 or 2 here: https://searchfox.org/mozilla-central/source/dom/svg/SVGContentUtils.cpp#330
Also if strokeWidth isn't set on an element (or its ancestors) then will there be any refresh when zoom changes.
Comment 2•1 year ago
|
||
Comment 3•1 year ago
|
||
Comment 4•10 months ago
|
||
[Similar to bug 1903363 comment 4]:
This bug's test-case (the attached one as well as the linked codepen) was fixed by the patch that recently landed in bug 1911195. Nightly renders the testcases the same way as Chrome does now.
Changing the dupe target to bug 1911195.
Description
•