Closed
Bug 720077
Opened 13 years ago
Closed 1 year ago
Large skew transform is rendered inconsistently
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jruderman, Unassigned)
References
(Depends on 1 open bug)
Details
(Keywords: testcase)
Attachments
(2 files)
No description provided.
Comment 1•13 years ago
|
||
Confirmed with 64-bit Linux nightly:
Mozilla/5.0 (X11; Linux x86_64; rv:12.0a1) Gecko/20120123 Firefox/12.0a1
OS: Mac OS X → All
Hardware: x86_64 → All
This bug is present for any skew angle with more than 6 significant digits, but is only evident on screen for large values - the attached testcase is the same as the original except for a smaller (but still pretty numerically large) angle.
The short version is that when transform is set via js the value stored in style is 23058.4297, but after the click and the subsequent (re-)BindToTree of the nsSVGElement, the style value gets reparsed (in case the baseURI changed), and this time the parser used only retains 6 significant digits, so a new nsAttrValue for transform is created with a value of 23058.4, and the difference between a skew angle of 23058.4297 and 23058.4 is noticeable on screen.
Some more detail:
When transform is initially set via js it's parsed using CSSParser, which parses all of the digits of the decimal angle number into a double, which then gets downcast to a float (whence the 23058.4297).
But in nsSVGElement::BindToTree after the click, the oldVal->ToString(stringValue) call winds up using Declaration's ToString method, which eventually calls nsCSSValue::AppendToString to serialize the angle value using nsAString's AppendFloat method, which only retains 6 significant digits, so the new nsAttrValue is given a value of 23058.4.
Feel free to take this one.
Updated•2 years ago
|
Severity: minor → S4
Comment 3•1 year ago
|
||
Seems fine now. Perhaps transition to stylo fixed it.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•