Open
Bug 1127545
Opened 9 years ago
Updated 2 years ago
SVG - Incorrect element height
Categories
(Core :: SVG, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: anders.willsson, Unassigned)
Details
Attachments
(1 file)
1.41 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 Build ID: 20150122214805 Steps to reproduce: <!doctype html><body><svg><path d="M1 0 L100 0" stroke-width="1" stroke="#000000"></path></svg></body> Actual results: Firefox 35.0.1 renders a 1px line but the element height is 8px. Expected results: The height of the path element should be 1px.
Comment 1•9 years ago
|
||
Who says it's 8px. I don't think this is an SVG bug, it's a bug in whatever tool is saying it's 8px high.
Comment 2•9 years ago
|
||
I'm assuming Mozilla is the tool, and it's our getBBox implementation that expands the bounds for the stroke-miterlimit default. Anders, a minimal testcase attached to the bug using the "Add an attachment" link is always useful.
Comment 3•9 years ago
|
||
getBBox won't include the stroke-width so it will report 0.
Reporter | ||
Comment 4•9 years ago
|
||
Reporter | ||
Comment 5•9 years ago
|
||
Sorry for the short description. I posted a html-file just now to show you guys what i meant. I checked the height using the firefox dev tools inspector thingee. Also tried getClientBoundingRect().height.
Comment 6•9 years ago
|
||
Set stroke-linejoin: bevel; to workaround this.
Reporter | ||
Comment 7•9 years ago
|
||
Nice workaround. Thank you Robert.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•