Chromium Code Reviews| Index: Source/core/dom/TreeScope.cpp |
| diff --git a/Source/core/dom/TreeScope.cpp b/Source/core/dom/TreeScope.cpp |
| index 3e0494c950cca921f54a5a229db8d9b093f2b840..8f67df1807e058057398af7aa0edf32736520502 100644 |
| --- a/Source/core/dom/TreeScope.cpp |
| +++ b/Source/core/dom/TreeScope.cpp |
| @@ -150,6 +150,15 @@ Element* TreeScope::getElementById(const AtomicString& elementId) const |
| return m_elementsById->getElementById(elementId.impl(), this); |
| } |
| +const Vector<Element*>* TreeScope::getAllElementsById(const AtomicString& elementId) const |
| +{ |
| + if (elementId.isEmpty()) |
| + return 0; |
| + if (!m_elementsById) |
| + return 0; |
|
esprehn
2013/12/17 18:57:48
Why not return emptyVector? We should just add a s
Inactive
2013/12/17 21:20:24
Done.
|
| + return m_elementsById->getAllElementsById(elementId.impl(), this); |
| +} |
| + |
| void TreeScope::addElementById(const AtomicString& elementId, Element* element) |
| { |
| if (!m_elementsById) |