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

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

Issue 251633002: Add support for DocumentFragment.getElementById() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use isInTreeScope() instead of isInDocument() Created 6 years, 8 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
« Source/core/dom/ContainerNode.cpp ('K') | « Source/core/svg/SVGSVGElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index 0de4dbd7f4c1f51af322eeb568ff88b43cefb261..16089cc68ce01cc31af045da346f16e46a6900d1 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -769,21 +769,4 @@ void SVGSVGElement::inheritViewAttributes(SVGViewElement* viewElement)
view->setZoomAndPan(zoomAndPan());
}
-// getElementById on SVGSVGElement is restricted to only the child subtree defined by the <svg> element.
-// See http://www.w3.org/TR/SVG11/struct.html#InterfaceSVGSVGElement
-Element* SVGSVGElement::getElementById(const AtomicString& id) const
-{
- Element* element = treeScope().getElementById(id);
- if (element && element->isDescendantOf(this))
- return element;
-
- // Fall back to traversing our subtree. Duplicate ids are allowed, the first found will
- // be returned.
- for (Element* element = ElementTraversal::firstWithin(*this); element; element = ElementTraversal::next(*element, this)) {
- if (element->getIdAttribute() == id)
- return element;
- }
- return 0;
-}
-
}
« Source/core/dom/ContainerNode.cpp ('K') | « Source/core/svg/SVGSVGElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698