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

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

Issue 452093003: Do not fire a DOMSubtreeModified event when Attr.value attribute is set (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 years, 4 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 | « LayoutTests/fast/dom/attribute-change-on-mutate-expected.txt ('k') | no next file » | 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 66a1bd40ef88132a0881b0d2494457f70b15833a..114e63d4ece6650a7c8627650a51f1a87a5104b0 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -670,7 +670,11 @@ void ContainerNode::removeChildren()
childrenChanged(change);
}
- dispatchSubtreeModifiedEvent();
+ // 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())
+ dispatchSubtreeModifiedEvent();
}
PassRefPtrWillBeRawPtr<Node> ContainerNode::appendChild(PassRefPtrWillBeRawPtr<Node> newChild, ExceptionState& exceptionState)
« no previous file with comments | « LayoutTests/fast/dom/attribute-change-on-mutate-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698