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

Unified Diff: WebCore/dom/Attr.cpp

Issue 3565007: Merge 68096 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 2 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
« no previous file with comments | « WebCore/dom/Attr.h ('k') | WebCore/dom/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/dom/Attr.cpp
===================================================================
--- WebCore/dom/Attr.cpp (revision 69030)
+++ WebCore/dom/Attr.cpp (working copy)
@@ -117,14 +117,22 @@
return value();
}
-void Attr::setValue(const AtomicString& value, ExceptionCode&)
+void Attr::setValue(const AtomicString& value)
{
m_ignoreChildrenChanged++;
removeChildren();
m_attribute->setValue(value);
createTextChild();
m_ignoreChildrenChanged--;
+}
+void Attr::setValue(const AtomicString& value, ExceptionCode&)
+{
+ if (m_element && m_element->isIdAttributeName(m_attribute->name()))
+ m_element->updateId(m_element->getIdAttribute(), value);
+
+ setValue(value);
+
if (m_element)
m_element->attributeChanged(m_attribute.get());
}
@@ -167,7 +175,10 @@
if (n->isTextNode())
val += static_cast<Text *>(n)->data();
}
-
+
+ if (m_element && m_element->isIdAttributeName(m_attribute->name()))
+ m_element->updateId(m_attribute->value(), val);
+
m_attribute->setValue(val.impl());
if (m_element)
m_element->attributeChanged(m_attribute.get());
« no previous file with comments | « WebCore/dom/Attr.h ('k') | WebCore/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698