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

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

Issue 344883007: SVG: Move/rename reference management to SVGElement (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove sed script from CL Created 6 years, 6 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.h » ('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 eb00973621e340323ec5a8bf7c2c0ed8a8b136b3..ae094f835ebf01b06c057c4b7458de8db0da061a 100644
--- a/Source/core/svg/SVGDocumentExtensions.cpp
+++ b/Source/core/svg/SVGDocumentExtensions.cpp
@@ -308,75 +308,6 @@ Element* SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval(cons
return element;
}
-SVGElementSet* SVGDocumentExtensions::setOfElementsReferencingTarget(SVGElement* referencedElement) const
-{
- ASSERT(referencedElement);
- if (!referencedElement->hasSVGRareData())
- return 0;
- return &referencedElement->svgRareData()->referencingElements();
-}
-
-void SVGDocumentExtensions::addElementReferencingTarget(SVGElement* referencingElement, SVGElement* referencedElement)
-{
- ASSERT(referencingElement);
- ASSERT(referencedElement);
- ASSERT(!referencingElement->isStructurallyExternal());
-
- referencedElement->ensureSVGRareData()->referencingElements().add(referencingElement);
- referencingElement->ensureSVGRareData()->referencedElements().add(referencedElement);
-}
-
-void SVGDocumentExtensions::removeAllTargetReferencesForElement(SVGElement* referencingElement)
-{
- if (!referencingElement->hasSVGRareData())
- return;
-
- SVGElementSet& referencedElements = referencingElement->svgRareData()->referencedElements();
- for (SVGElementSet::iterator it = referencedElements.begin(), itEnd = referencedElements.end(); it != itEnd; ++it) {
- SVGElement* referencedElement = *it;
- ASSERT(referencedElement->hasSVGRareData());
- referencedElement->ensureSVGRareData()->referencingElements().remove(referencingElement);
- }
- referencedElements.clear();
-}
-
-void SVGDocumentExtensions::rebuildAllElementReferencesForTarget(SVGElement* referencedElement)
-{
- ASSERT(referencedElement);
- if (!referencedElement->hasSVGRareData())
- return;
-
- const SVGElementSet& referencingElements = referencedElement->svgRareData()->referencingElements();
-
- // Iterate on a snapshot as |referencingElements| may be altered inside loop.
- WillBeHeapVector<RawPtrWillBeMember<SVGElement> > referencingElementsSnapShot;
- copyToVector(referencingElements, referencingElementsSnapShot);
-
- // Force rebuilding the referencingElement so it knows about this change.
- for (WillBeHeapVector<RawPtrWillBeMember<SVGElement> >::iterator it = referencingElementsSnapShot.begin(), itEnd = referencingElementsSnapShot.end(); it != itEnd; ++it) {
- SVGElement* referencingElement = *it;
-
- // Before rebuilding referencingElement ensure it was not removed from under us.
- if (referencingElements.contains(referencingElement))
- referencingElement->svgAttributeChanged(XLinkNames::hrefAttr);
- }
-}
-
-void SVGDocumentExtensions::removeAllElementReferencesForTarget(SVGElement* referencedElement)
-{
- ASSERT(referencedElement);
- if (!referencedElement->hasSVGRareData())
- return;
-
- SVGElementSet& referencingElements = referencedElement->svgRareData()->referencingElements();
- for (SVGElementSet::iterator it = referencingElements.begin(), itEnd = referencingElements.end(); it != itEnd; ++it) {
- SVGElement* referencingElement = *it;
- ASSERT(referencedElement->hasSVGRareData());
- referencingElement->ensureSVGRareData()->referencedElements().remove(referencedElement);
- }
- referencingElements.clear();
-}
-
void SVGDocumentExtensions::addSVGRootWithRelativeLengthDescendents(SVGSVGElement* svgRoot)
{
ASSERT(!m_inRelativeLengthSVGRootsInvalidation);
« no previous file with comments | « Source/core/svg/SVGDocumentExtensions.h ('k') | Source/core/svg/SVGElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698