Changeset 116618 in webkit


Ignore:
Timestamp:
May 10, 2012 12:42:03 AM (12 years ago)
Author:
inferno@chromium.org
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.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r116614 r116618  
     12012-05-10  Abhishek Arya  <inferno@chromium.org>
     2
     3        Make DOMCharacterDataModified a scoped event (similar to r73690).
     4        https://bugs.webkit.org/show_bug.cgi?id=85920
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * fast/events/scoped/editing-commands.html: test modified to check DOMCharacterDataModified event.
     9
    1102012-05-10  Zan Dobersek  <zandobersek@gmail.com>
    211
  • trunk/LayoutTests/fast/events/scoped/editing-commands.html

    r73690 r116618  
    4848
    4949var events = {
     50    'DOMCharacterDataModified': false,
    5051    'DOMSubtreeModified': false,
    5152    'DOMNodeInserted': false,
  • trunk/Source/WebCore/ChangeLog

    r116617 r116618  
     12012-05-10  Abhishek Arya  <inferno@chromium.org>
     2
     3        Make DOMCharacterDataModified a scoped event (similar to r73690).
     4        https://bugs.webkit.org/show_bug.cgi?id=85920
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        DOMCharacterDataModified was missing in the list of already scoped
     9        DOM mutation events like DOMSubtreeModified, DOMNodeInserted, etc.
     10        It helps to delay event dispatches until the completion of each call
     11        of EditCommand::doApply. This has been useful in the past and helped to
     12        prevent unexpected DOM tree mutations while the editing command is executing.
     13
     14        * dom/CharacterData.cpp:
     15        (WebCore::CharacterData::dispatchModifiedEvent):
     16
    1172012-05-10  Alexandre Elias  <aelias@google.com>
    218
  • trunk/Source/WebCore/dom/CharacterData.cpp

    r110320 r116618  
    201201        parentNode()->childrenChanged();
    202202    if (document()->hasListenerType(Document::DOMCHARACTERDATAMODIFIED_LISTENER))
    203         dispatchEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, true, 0, oldData, m_data));
     203        dispatchScopedEvent(MutationEvent::create(eventNames().DOMCharacterDataModifiedEvent, true, 0, oldData, m_data));
    204204    dispatchSubtreeModifiedEvent();
    205205#if ENABLE(INSPECTOR)
Note: See TracChangeset for help on using the changeset viewer.