RESOLVED FIXED 18473
Animation <use> fixes
https://bugs.webkit.org/show_bug.cgi?id=18473
Summary Animation <use> fixes
Antti Koivisto
Reported 2008-04-14 00:18:59 PDT
Animations should not be cloned to instance trees etc.
Attachments
<use> fixes (10.47 KB, patch)
2008-04-14 00:19 PDT, Antti Koivisto
eric: review-
added comment and assert to removeDisallowedElementsFromSubtree() (10.75 KB, patch)
2008-04-14 16:03 PDT, Antti Koivisto
no flags
...and rename the requested variable (10.77 KB, patch)
2008-04-14 16:07 PDT, Antti Koivisto
eric: review+
Antti Koivisto
Comment 1 2008-04-14 00:19:33 PDT
Created attachment 20522 [details] <use> fixes
Eric Seidel (no email)
Comment 2 2008-04-14 07:46:31 PDT
I guess setInstanceUpdatesBlocked isn't used?
Antti Koivisto
Comment 3 2008-04-14 09:46:10 PDT
Not yet. I need it for the next patch that does additive animations and <use> properly. I added it here that keep that one bit smaller.
Eric Seidel (no email)
Comment 4 2008-04-14 13:56:22 PDT
Comment on attachment 20522 [details] <use> fixes I prefer arguments to have more informative names than "b": setInstanceUpdatesBlocked "blockUpdates" perhaps? Is gElementsWithInstanceUpdatesBlocked the official pattern now? I thought s_ was? void SVGUseElement::removeDisallowedElementsFromSubtree(Node* element) needs a comment as to why RefPtr<Node> is not required to protect against MutationEvent listeners doing bad things. +bool SVGSMILElement::isSMILElement(Node* node) I'm surprised that's even needed. I guess I would have figured there would have been a virtual bool isSVGSMILElement() const { return false; } on SVGElement. r- due to the possible crasher due to mutation events (or lack of comment)
Antti Koivisto
Comment 5 2008-04-14 16:03:25 PDT
Created attachment 20537 [details] added comment and assert to removeDisallowedElementsFromSubtree() no code changes
Antti Koivisto
Comment 6 2008-04-14 16:07:08 PDT
Created attachment 20538 [details] ...and rename the requested variable
Antti Koivisto
Comment 7 2008-04-14 16:11:37 PDT
(In reply to comment #4) > Is gElementsWithInstanceUpdatesBlocked the official pattern now? I thought s_ > was? s_ is for static member variables only. > needs a comment as to why RefPtr<Node> is not required to protect against > MutationEvent listeners doing bad things. The subtree is not in document so mutation events won't happen. Added assert and comment. Generally using RefPtr<> in this kind of places is bad idea since it is a) slow, b) hides bugs. > > +bool SVGSMILElement::isSMILElement(Node* node) > I'm surprised that's even needed. I guess I would have figured there would > have been a virtual bool isSVGSMILElement() const { return false; } on > SVGElement. That might be good to add as well, but this kind of interface has advantage of being usable without casting for Node*'s.
Eric Seidel (no email)
Comment 8 2008-04-14 16:17:10 PDT
Comment on attachment 20538 [details] ...and rename the requested variable r=me
Antti Koivisto
Comment 9 2008-04-14 16:58:06 PDT
Sending WebCore/ChangeLog Sending WebCore/svg/SVGAElement.cpp Sending WebCore/svg/SVGElementInstance.cpp Sending WebCore/svg/SVGStyledElement.cpp Sending WebCore/svg/SVGStyledElement.h Sending WebCore/svg/SVGUseElement.cpp Sending WebCore/svg/SVGUseElement.h Sending WebCore/svg/animation/SVGSMILElement.cpp Sending WebCore/svg/animation/SVGSMILElement.h Transmitting file data ......... Committed revision 31891.
Note You need to log in before you can comment on or make changes to this bug.