Closed
Bug 508496
Opened 15 years ago
Closed 15 years ago
SVG: SVGAnimatedLength's animVal and baseVal attributes always return different objects
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: birtles, Assigned: birtles)
References
()
Details
Attachments
(1 file, 4 obsolete files)
14.31 KB,
patch
|
Details | Diff | Splinter Review |
If you request the baseVal attribute of an animated length twice and compare the two objects (with ===) they will be different objects. This seems wrong. You should get back the same object so that width.baseVal === width.baseVal.
The same problem occurs for animVal as well. We return a new object every time.
This was originally raised in bug 506856 but is now being split off into a separate bug because it's quite unrelated to readonly behaviour (which is what bug 506856 deals with) and it might take quite a bit of work.
See discussion on www-svg: http://lists.w3.org/Archives/Public/www-svg/2008Sep/0023.html
Assignee | ||
Comment 1•15 years ago
|
||
First attempt at a patch to address this.
Assignee: nobody → birtles
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•15 years ago
|
||
Fixed a permissions bug in test case that caused it to fail on TryServer.
Attachment #394424 -
Attachment is obsolete: true
Attachment #395180 -
Flags: superreview?(roc)
Attachment #395180 -
Flags: review?(roc)
Attachment #395180 -
Flags: superreview?(roc)
Attachment #395180 -
Flags: review?(roc)
Attachment #395180 -
Flags: review+
Comment on attachment 395180 [details] [diff] [review]
patch v1b
Is there no better way to detect that SMIL is disabled? That's a bit disturbing if true.
+ TearoffType*
+ GetTearoff(SimpleType* aSimple);
+
+ void
+ AddTearoff(SimpleType* aSimple, TearoffType* aTearoff);
+
+ void
+ RemoveTearoff(SimpleType* aSimple);
One line each
I suggest adding a destructor to nsSVGAttrTearoffTable which asserts that the hashtable is empty.
r+ with those changes
Assignee | ||
Comment 4•15 years ago
|
||
Will give it another run on TryServer before marking checkin-needed.
Attachment #395180 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
Keywords: checkin-needed
Assignee | ||
Comment 5•15 years ago
|
||
Removed querying of preferences from test case.
Attachment #396263 -
Attachment is obsolete: true
Is this checkin-needed now?
Although I don't understand how this test works. There will always be an element with id 'animate'. The question is whether it exports the <animate> element's DOM interface.
Assignee | ||
Comment 8•15 years ago
|
||
Updated check for whether SMIL is enabled.
It turns out, and I haven't tracked down exactly why, but getElementById doesn't pick up <animate> elements with ids when SMIL is not enabled. Anyway, in case that behaviour changes, I've also made it test for an SVGAnimationElement interface property: targetElement.
Attachment #396522 -
Attachment is obsolete: true
Assignee | ||
Comment 9•15 years ago
|
||
I've got this on the try server now. Previous tryserver run produced warnings that I think are ok but I want to run it again to be sure. Will add checkin-needed when done.
Comment 11•15 years ago
|
||
Keywords: checkin-needed
Assignee | ||
Updated•15 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•