Title: [116618] trunk
- Revision
- 116618
- Author
- [email protected]
- Date
- 2012-05-10 00:42:03 -0700 (Thu, 10 May 2012)
Log Message
Make DOMCharacterDataModified a scoped event (similar to r73690).
https://bugs.webkit.org/show_bug.cgi?id=85920
Reviewed by Ryosuke Niwa.
Source/WebCore:
DOMCharacterDataModified was missing in the list of already scoped
DOM mutation events like DOMSubtreeModified, DOMNodeInserted, etc.
It helps to delay event dispatches until the completion of each call
of EditCommand::doApply. This has been useful in the past and helped to
prevent unexpected DOM tree mutations while the editing command is executing.
* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent):
LayoutTests:
* fast/events/scoped/editing-commands.html: test modified to check DOMCharacterDataModified event.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (116617 => 116618)
--- trunk/LayoutTests/ChangeLog 2012-05-10 07:38:51 UTC (rev 116617)
+++ trunk/LayoutTests/ChangeLog 2012-05-10 07:42:03 UTC (rev 116618)
@@ -1,3 +1,12 @@
+2012-05-10 Abhishek Arya <[email protected]>
+
+ Make DOMCharacterDataModified a scoped event (similar to r73690).
+ https://bugs.webkit.org/show_bug.cgi?id=85920
+
+ Reviewed by Ryosuke Niwa.
+
+ * fast/events/scoped/editing-commands.html: test modified to check DOMCharacterDataModified event.
+
2012-05-10 Zan Dobersek <[email protected]>
Unreviewed GTK gardening.
Modified: trunk/LayoutTests/fast/events/scoped/editing-commands.html (116617 => 116618)
--- trunk/LayoutTests/fast/events/scoped/editing-commands.html 2012-05-10 07:38:51 UTC (rev 116617)
+++ trunk/LayoutTests/fast/events/scoped/editing-commands.html 2012-05-10 07:42:03 UTC (rev 116618)
@@ -47,6 +47,7 @@
];
var events = {
+ 'DOMCharacterDataModified': false,
'DOMSubtreeModified': false,
'DOMNodeInserted': false,
'DOMNodeRemoved': false,
Modified: trunk/Source/WebCore/ChangeLog (116617 => 116618)
--- trunk/Source/WebCore/ChangeLog 2012-05-10 07:38:51 UTC (rev 116617)
+++ trunk/Source/WebCore/ChangeLog 2012-05-10 07:42:03 UTC (rev 116618)
@@ -1,3 +1,19 @@
+2012-05-10 Abhishek Arya <[email protected]>
+
+ Make DOMCharacterDataModified a scoped event (similar to r73690).
+ https://bugs.webkit.org/show_bug.cgi?id=85920
+
+ Reviewed by Ryosuke Niwa.
+
+ DOMCharacterDataModified was missing in the list of already scoped
+ DOM mutation events like DOMSubtreeModified, DOMNodeInserted, etc.
+ It helps to delay event dispatches until the completion of each call
+ of EditCommand::doApply. This has been useful in the past and helped to
+ prevent unexpected DOM tree mutations while the editing command is executing.
+
+ * dom/CharacterData.cpp:
+ (WebCore::CharacterData::dispatchModifiedEvent):
+
2012-05-10 Alexandre Elias <[email protected]>
Default to null value for HistoryItem::m_pageScaleFactor
Modified: trunk/Source/WebCore/dom/CharacterData.cpp (116617 => 116618)
--- trunk/Source/WebCore/dom/CharacterData.cpp 2012-05-10 07:38:51 UTC (rev 116617)
+++ trunk/Source/WebCore/dom/CharacterData.cpp 2012-05-10 07:42:03 UTC (rev 116618)
@@ -200,7 +200,7 @@
if (parentNode())
parentNode()->childrenChanged();
if (document()->hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER))
- dispatchEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, true, 0, oldData, m_data));
+ dispatchScopedEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, true, 0, oldData, m_data));
dispatchSubtreeModifiedEvent();
#if ENABLE(INSPECTOR)
InspectorInstrumentation::characterDataModified(document(), this);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes