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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 688933002: Make textContent trigger single DOMSubtreeModified event (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comments Created 6 years, 1 month 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 | « Source/core/dom/ContainerNode.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index e9864bcd16ca9fb5d54ccd980cf004b0762e994c..75f7f4121ea9b502b41dbbcbd7bfe13b52734ce5 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -618,7 +618,7 @@ void ContainerNode::parserRemoveChild(Node& oldChild)
// This differs from other remove functions because it forcibly removes all the children,
// regardless of read-only status or event exceptions, e.g.
-void ContainerNode::removeChildren()
+void ContainerNode::removeChildren(SubtreeModificationAction action)
{
if (!m_firstChild)
return;
@@ -671,10 +671,7 @@ void ContainerNode::removeChildren()
childrenChanged(change);
}
- // We don't fire the DOMSubtreeModified event for Attr Nodes. This matches the behavior
- // of IE and Firefox. This event is fired synchronously and is a source of trouble for
- // attributes as the JS callback could alter the attributes and leave us in a bad state.
- if (!isAttributeNode())
+ if (action == DispatchSubtreeModifiedEvent)
dispatchSubtreeModifiedEvent();
}
« no previous file with comments | « Source/core/dom/ContainerNode.h ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698