Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: Source/core/svg/SVGDocumentExtensions.cpp

Issue 298873003: SVG: SVGAnimateElement should not cache |m_animatedElements| (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: revert change on SVGElementInstance.cpp Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGDocumentExtensions.h ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGDocumentExtensions.cpp
diff --git a/Source/core/svg/SVGDocumentExtensions.cpp b/Source/core/svg/SVGDocumentExtensions.cpp
index 6f678e64e5167d0c64efa8a5029687b7485050a9..b05c0ba5ee43044e814311ccd76cc2118e57a7e6 100644
--- a/Source/core/svg/SVGDocumentExtensions.cpp
+++ b/Source/core/svg/SVGDocumentExtensions.cpp
@@ -31,6 +31,7 @@
#include "core/svg/SVGViewSpec.h"
#include "core/svg/SVGZoomAndPan.h"
#include "core/svg/animation/SMILTimeContainer.h"
+#include "core/svg/animation/SVGSMILElement.h"
#include "wtf/TemporaryChange.h"
#include "wtf/text/AtomicString.h"
@@ -351,7 +352,7 @@ void SVGDocumentExtensions::removeAllTargetReferencesForElement(SVGElement* refe
m_elementDependencies.removeAll(toBeRemoved);
}
-void SVGDocumentExtensions::rebuildAllElementReferencesForTarget(SVGElement* referencedElement)
+void SVGDocumentExtensions::rebuildAllElementReferencesForTarget(SVGElement* referencedElement, RebuildTargetFilter filter)
pdr. 2014/05/27 00:45:32 I think this is better but I still have the same q
{
ASSERT(referencedElement);
HashMap<SVGElement*, OwnPtr<HashSet<SVGElement*> > >::iterator it = m_elementDependencies.find(referencedElement);
@@ -369,10 +370,14 @@ void SVGDocumentExtensions::rebuildAllElementReferencesForTarget(SVGElement* ref
Vector<SVGElement*>::iterator vectorEnd = toBeNotified.end();
for (Vector<SVGElement*>::iterator vectorIt = toBeNotified.begin(); vectorIt != vectorEnd; ++vectorIt) {
// Before rebuilding referencingElement ensure it was not removed from under us.
- if (HashSet<SVGElement*>* referencingElements = setOfElementsReferencingTarget(referencedElement)) {
- if (referencingElements->contains(*vectorIt))
- (*vectorIt)->svgAttributeChanged(XLinkNames::hrefAttr);
- }
+ HashSet<SVGElement*>* referencingElements = setOfElementsReferencingTarget(referencedElement);
+ if (!referencingElements || !referencingElements->contains(*vectorIt))
+ continue;
+
+ if (filter == ExcludeUseElements && isSVGUseElement(**vectorIt))
+ continue;
+
+ (*vectorIt)->svgAttributeChanged(XLinkNames::hrefAttr);
}
}
« no previous file with comments | « Source/core/svg/SVGDocumentExtensions.h ('k') | Source/core/svg/SVGElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698