Turn forbidEventDispatch and allowEventDispatch into a RAII object
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2012 21:20:49 +0000 (21:20 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Oct 2012 21:20:49 +0000 (21:20 +0000)
commitdebf1af25b69abd4a326c242cf60ac893a42e27f
treec868c57a88030d4b6b17e2318af181917c4f45f0
parent70d382a50b1a001813f2f6024ee0172a4faf0b02
Turn forbidEventDispatch and allowEventDispatch into a RAII object
https://bugs.webkit.org/show_bug.cgi?id=96717

Reviewed by Abhishek Arya.

Replaced forbidEventDispatch and allowEventDispatch by AssertNoEventDispatch.

* dom/ContainerNode.cpp:
(WebCore):
(WebCore::ContainerNode::insertBeforeCommon):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::removeChildren):
(WebCore::ContainerNode::appendChild):
(WebCore::ContainerNode::parserAddChild):
(WebCore::dispatchChildInsertionEvents):
(WebCore::dispatchChildRemovalEvents):
* dom/ContainerNode.h:
(AssertNoEventDispatch):
(WebCore::AssertNoEventDispatch::AssertNoEventDispatch):
(WebCore::AssertNoEventDispatch::~AssertNoEventDispatch):
(WebCore::AssertNoEventDispatch::isEventDispatchForbidden):
(WebCore):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
(WebCore::ChildNodeInsertionNotifier::notify):
(WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromTree):
* dom/Document.cpp:
(WebCore::Document::dispatchWindowEvent):
(WebCore::Document::dispatchWindowLoadEvent):
* dom/EventDispatcher.cpp:
(WebCore::EventDispatcher::dispatchEvent):
* dom/EventTarget.cpp:
(WebCore):
(WebCore::EventTarget::fireEventListeners):
* dom/EventTarget.h:
(WebCore):
* dom/Node.cpp:
(WebCore::Node::dispatchSubtreeModifiedEvent):
(WebCore::Node::dispatchFocusInEvent):
(WebCore::Node::dispatchFocusOutEvent):
(WebCore::Node::dispatchDOMActivateEvent):
* dom/WebKitNamedFlow.cpp:
(WebCore::WebKitNamedFlow::dispatchRegionLayoutUpdateEvent):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadInternal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ContainerNode.cpp
Source/WebCore/dom/ContainerNode.h
Source/WebCore/dom/ContainerNodeAlgorithms.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/EventDispatcher.cpp
Source/WebCore/dom/EventTarget.cpp
Source/WebCore/dom/EventTarget.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/WebKitNamedFlow.cpp
Source/WebCore/html/HTMLMediaElement.cpp