summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/dom/Element.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/Element.h')
-rw-r--r--Source/WebCore/dom/Element.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/WebCore/dom/Element.h b/Source/WebCore/dom/Element.h
index ffb7b2df2..fa39a187b 100644
--- a/Source/WebCore/dom/Element.h
+++ b/Source/WebCore/dom/Element.h
@@ -303,6 +303,7 @@ public:
virtual String title() const;
void updateId(const AtomicString& oldId, const AtomicString& newId);
+ void updateId(TreeScope*, const AtomicString& oldId, const AtomicString& newId);
void updateName(const AtomicString& oldName, const AtomicString& newName);
void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue);
@@ -587,7 +588,14 @@ inline void Element::updateId(const AtomicString& oldId, const AtomicString& new
if (oldId == newId)
return;
- TreeScope* scope = treeScope();
+ updateId(treeScope(), oldId, newId);
+}
+
+inline void Element::updateId(TreeScope* scope, const AtomicString& oldId, const AtomicString& newId)
+{
+ ASSERT(inDocument());
+ ASSERT(oldId != newId);
+
if (!oldId.isEmpty())
scope->removeElementById(oldId, this);
if (!newId.isEmpty())