summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/TreeScope.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-16 14:51:15 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-16 14:51:15 +0200
commit4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26 (patch)
tree7bb9ad7e31c24d1cf1707e03e6f1a80f6d033951 /Source/WebCore/dom/TreeScope.cpp
parent3977e3d2f72f7fe2c887c1ec0e0c342e1d169f42 (diff)
downloadqtwebkit-4e6b3a206fa4ad8bb0b664f7674c9a70376d6e26.tar.gz
Imported WebKit commit 953baa67aa07087b6ecd4199351ec554c724e27d (http://svn.webkit.org/repository/webkit/trunk@122676)
Diffstat (limited to 'Source/WebCore/dom/TreeScope.cpp')
-rw-r--r--Source/WebCore/dom/TreeScope.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/WebCore/dom/TreeScope.cpp b/Source/WebCore/dom/TreeScope.cpp
index 5642fcf8d..e88b13ab8 100644
--- a/Source/WebCore/dom/TreeScope.cpp
+++ b/Source/WebCore/dom/TreeScope.cpp
@@ -39,6 +39,7 @@
#include "HTMLFrameOwnerElement.h"
#include "HTMLMapElement.h"
#include "HTMLNames.h"
+#include "IdTargetObserverRegistry.h"
#include "InsertionPoint.h"
#include "Page.h"
#include "ShadowRoot.h"
@@ -54,7 +55,7 @@ using namespace HTMLNames;
TreeScope::TreeScope(ContainerNode* rootNode)
: m_rootNode(rootNode)
, m_parentTreeScope(0)
- , m_numNodeListCaches(0)
+ , m_idTargetObserverRegistry(IdTargetObserverRegistry::create())
{
ASSERT(rootNode);
}
@@ -93,11 +94,13 @@ Element* TreeScope::getElementById(const AtomicString& elementId) const
void TreeScope::addElementById(const AtomicString& elementId, Element* element)
{
m_elementsById.add(elementId.impl(), element);
+ m_idTargetObserverRegistry->notifyObservers(elementId);
}
void TreeScope::removeElementById(const AtomicString& elementId, Element* element)
{
m_elementsById.remove(elementId.impl(), element);
+ m_idTargetObserverRegistry->notifyObservers(elementId);
}
Node* TreeScope::ancestorInThisScope(Node* node) const