Closed
Bug 709907
Opened 13 years ago
Closed 13 years ago
"ASSERTION: Calling InvertSign with an unsupported unit"
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla11
People
(Reporter: jruderman, Assigned: dholbert)
References
Details
(Keywords: assertion, testcase)
Attachments
(4 files)
105 bytes,
image/svg+xml
|
Details | |
2.02 KB,
text/plain
|
Details | |
2.40 KB,
patch
|
Details | Diff | Splinter Review | |
2.10 KB,
patch
|
dbaron
:
review+
|
Details | Diff | Splinter Review |
###!!! ASSERTION: Calling InvertSign with an unsupported unit: 'Not Reached', file content/smil/nsSMILCSSValueType.cpp, line 154
Reporter | ||
Comment 1•13 years ago
|
||
Assignee | ||
Comment 2•13 years ago
|
||
The unsupported unit in question is "eUnit_Dasharray", added in bug 523355, which nsSMILCSSValueType::InvertSign doesn't know about. Rather than trying to teach nsSMILCSSValueType::InvertSign about the inner-workings of dash-array-valued nsStyleAnimation::Value objects, I think we should move InvertSign into nsStyleAnimation::Value (where it'll have access to private data, and where it'll be clearer that it needs updating if numeric/number-like types are added/modified in the future.
Assignee | ||
Updated•13 years ago
|
OS: Mac OS X → All
Hardware: x86_64 → All
Assignee | ||
Comment 3•13 years ago
|
||
Actually, I take that back -- I think we need to explicitly opt out stroke-dasharray from this negative-checking / inverting hack right now. Basically what we do now is: if (value looks like "-[digit][anything]") { Strip off the "-" and try to parse the string after that as our property-value. If that parse succeeded { try to negate the resulting parsed value } else, parse failed --> fail. This isn't sensitive enough for stroke-dasharray, though. Supposing someone wants to animate by "-1, 2, 3, 4", then the above logic would end up trying to parse the value "1, 2, 3, 4", and then we'd "negate" that and use the resulting value. But there's no clear way to negate "1, 2, 3, 4" (which values should we negate?) For stroke-dasharray, we really need to do this checking / negation per-array-value, which our current logic doesn't really support. So I think we should just opt stroke-dasharray out of this chunk.
Assignee | ||
Comment 4•13 years ago
|
||
As the comment at the top of the contextual code hints, bug 501188 would really the cleanest way to fix this -- given that, I don't think it's worth trying to add hackarounds to make stroke-dasharray work with negative values here. So, this patch just disables the negative-value-screening logic for stroke-dasharray (so we pass the negative value along to the parser, and it'll fail to parse, which is probably fine). Just for reference, in case it's not clear -- negative numbers would in theory be useful for something like: <rect stroke-dasharray="10, 10" ...> <animate attributeName="stroke-dasharray" by="-2, -2" ..> </rect> The author's intention there would be to get a resulting animation towards "8, 8", but we'll fail to animate that right now, because "-2, -2" is an invalid value for stroke-dahsarray.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•13 years ago
|
||
Attachment #581401 -
Flags: review?(dbaron)
Comment on attachment 581401 [details] [diff] [review] fix v1 (diff -w version) r=dbaron, though I'm not sure if I'm the best reviewer for this
Attachment #581401 -
Flags: review?(dbaron) → review+
Assignee | ||
Comment 7•13 years ago
|
||
(In reply to David Baron [:dbaron] from comment #6) > r=dbaron Thanks! :) > though I'm not sure if I'm the best reviewer for this I'm not concerned -- I mostly wanted a sanity-check, and I picked you since you wrote the code to add the unit in question ("eUnit_Dasharray", bug 523355), in case there was something obvious about it that I was missing.
Assignee | ||
Comment 8•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b278df809c4b
Target Milestone: --- → mozilla11
Assignee | ||
Updated•13 years ago
|
Flags: in-testsuite+
Comment 9•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b278df809c4b
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•