commit | 963f3bcb08a4e07723b8360e5fd8b7473c46014b | [log] [tgz] |
---|---|---|
author | cdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Wed Aug 10 14:49:20 2016 +0000 |
committer | cdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Wed Aug 10 14:49:20 2016 +0000 |
tree | 7a0b435c599d6065332997f3eb4be7ec8b38642c | |
parent | cb221ff0c9c83281880fc2d4dab25f824027247d [diff] [blame] |
It should be possible to re-initialize a MutationEvent after it's been dispatched https://bugs.webkit.org/show_bug.cgi?id=160703 Reviewed by Sam Weinig. Source/WebCore: It should be possible to re-initialize a MutationEvent after it's been dispatched, similarly to Event: - https://www.w3.org/TR/2015/WD-uievents-20151215/#widl-MutationEvent-initMutationEvent Test: fast/events/initMutationEvent-after-dispatch.html * dom/MutationEvent.cpp: (WebCore::MutationEvent::initMutationEvent): LayoutTests: Add layout test coverage. * fast/events/initMutationEvent-after-dispatch-expected.txt: Added. * fast/events/initMutationEvent-after-dispatch.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@204331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/dom/MutationEvent.cpp b/Source/WebCore/dom/MutationEvent.cpp index a61ef76..6382350 100644 --- a/Source/WebCore/dom/MutationEvent.cpp +++ b/Source/WebCore/dom/MutationEvent.cpp
@@ -51,7 +51,7 @@ const String& prevValue, const String& newValue, const String& attrName, unsigned short attrChange) { - if (dispatched()) + if (isBeingDispatched()) return; initEvent(type, canBubble, cancelable);