Commit d83fd03d authored by tonikitoo@webkit.org's avatar tonikitoo@webkit.org

Fix some "explicit braces to avoid ambiguous 'else'" warnings

https://bugs.webkit.org/show_bug.cgi?id=37088

Reviewed by Darin Adler.
Patch by Antonio Gomes (tonikitoo@webkit.org)

* dom/Node.cpp:
(WebCore::Node::dispatchGenericEvent):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 3c67e74d
2010-04-05 Antonio Gomes <tonikitoo@webkit.org>
Reviewed by Darin Adler.
Fix some "explicit braces to avoid ambiguous 'else'" warnings
https://bugs.webkit.org/show_bug.cgi?id=37088
* dom/Node.cpp:
(WebCore::Node::dispatchGenericEvent):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::dispatchEvent):
2010-04-05 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
......@@ -2611,11 +2611,12 @@ bool Node::dispatchGenericEvent(PassRefPtr<Event> prpEvent)
#if ENABLE(INSPECTOR)
Page* inspectedPage = InspectorTimelineAgent::instanceCount() ? document()->page() : 0;
if (inspectedPage)
if (inspectedPage) {
if (InspectorTimelineAgent* timelineAgent = eventHasListeners(event->type(), targetForWindowEvents, this, ancestors) ? inspectedPage->inspectorTimelineAgent() : 0)
timelineAgent->willDispatchEvent(*event);
else
inspectedPage = 0;
}
#endif
// Give the target node a chance to do some work before DOM event handlers get a crack.
......
......@@ -1434,11 +1434,12 @@ bool DOMWindow::dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventTarget
#if ENABLE(INSPECTOR)
Page* inspectedPage = InspectorTimelineAgent::instanceCount() && frame() ? frame()->page() : 0;
if (inspectedPage)
if (inspectedPage) {
if (InspectorTimelineAgent* timelineAgent = hasEventListeners(event->type()) ? inspectedPage->inspectorTimelineAgent() : 0)
timelineAgent->willDispatchEvent(*event);
else
inspectedPage = 0;
}
#endif
bool result = fireEventListeners(event.get());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment