Index: Source/core/dom/TreeScope.cpp |
diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp |
index 0edb20cf2b66e6765bf442bc9f89da67c8ca227f..c8a198b88806c3da0807bd9ce1e8ff84a1bbafe8 100644 |
--- a/Source/core/dom/TreeScope.cpp |
+++ b/Source/core/dom/TreeScope.cpp |
@@ -150,6 +150,16 @@ Element* TreeScope::getElementById(const AtomicString& elementId) const |
return m_elementsById->getElementById(elementId.impl(), this); |
} |
+const Vector<Element*>& TreeScope::getAllElementsById(const AtomicString& elementId) const |
+{ |
+ DEFINE_STATIC_LOCAL(Vector<Element*>, emptyVector, ()); |
+ if (elementId.isEmpty()) |
+ return emptyVector; |
+ if (!m_elementsById) |
+ return emptyVector; |
+ return m_elementsById->getAllElementsById(elementId.impl(), this); |
+} |
+ |
void TreeScope::addElementById(const AtomicString& elementId, Element* element) |
{ |
if (!m_elementsById) |