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

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: Add test Created 6 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
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index e9864bcd16ca9fb5d54ccd980cf004b0762e994c..a32170921d2e808f9d7a662629e228bcad14a1cb 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(bool sendModifiedEvent)
{
if (!m_firstChild)
return;
@@ -674,7 +674,7 @@ void ContainerNode::removeChildren()
// We don't fire the DOMSubtreeModified event for Attr Nodes. This matches the behavior
sof 2014/11/20 12:09:59 Move this comment to Attr::setValue()
// 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 (sendModifiedEvent)
dispatchSubtreeModifiedEvent();
}

Powered by Google App Engine
This is Rietveld 408576698