Changeset 143303 in webkit


Ignore:
Timestamp:
Feb 18, 2013 11:57:37 PM (11 years ago)
Author:
hayato@chromium.org
Message:

Make EventDispatcher take an Event object in its constructor.
https://bugs.webkit.org/show_bug.cgi?id=109898

Reviewed by Dimitri Glazkov.

Source/WebCore:

Re-landing r143145, which caused a crash when deltaX and deltaY of a PlatformWheelEvent are both zero.

Fixed a crash by early exiting in EventDispatcher::dispatchEvent(Node*, PassRefPtr<EventDispatcher*>)
if mediator's event() returns null.

Also Added a layout test to catch this kind of crash in the future.

Test: fast/events/platform-wheelevent-with-delta-zero-crash.html

  • dom/EventDispatchMediator.cpp:

(WebCore::EventDispatchMediator::dispatchEvent):

  • dom/EventDispatcher.cpp:

(WebCore::EventDispatcher::dispatchEvent):
(WebCore::EventDispatcher::EventDispatcher):
(WebCore::EventDispatcher::ensureEventPath):
(WebCore::EventDispatcher::dispatchSimulatedClick):
(WebCore::EventDispatcher::dispatch):
(WebCore::EventDispatcher::dispatchEventPreProcess):
(WebCore::EventDispatcher::dispatchEventAtCapturing):
(WebCore::EventDispatcher::dispatchEventAtTarget):
(WebCore::EventDispatcher::dispatchEventAtBubbling):
(WebCore::EventDispatcher::dispatchEventPostProcess):

  • dom/EventDispatcher.h:

(EventDispatcher):
(WebCore::EventDispatcher::node):
(WebCore::EventDispatcher::event):

  • dom/FocusEvent.cpp:

(WebCore::FocusEventDispatchMediator::dispatchEvent):
(WebCore::BlurEventDispatchMediator::dispatchEvent):
(WebCore::FocusInEventDispatchMediator::dispatchEvent):
(WebCore::FocusOutEventDispatchMediator::dispatchEvent):

  • dom/GestureEvent.cpp:

(WebCore::GestureEventDispatchMediator::dispatchEvent):

  • dom/MouseEvent.cpp:

(WebCore::MouseEventDispatchMediator::dispatchEvent):

  • dom/WheelEvent.cpp:

(WebCore::WheelEventDispatchMediator::dispatchEvent):
Assert event() rather than an early exit since this code path should be hit only when event() is non-null.

LayoutTests:

  • fast/events/platform-wheelevent-with-delta-zero-crash-expected.txt: Added.
  • fast/events/platform-wheelevent-with-delta-zero-crash.html: Added.
Location:
trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r143301 r143303  
     12013-02-18  Hayato Ito  <hayato@chromium.org>
     2
     3        Make EventDispatcher take an Event object in its constructor.
     4        https://bugs.webkit.org/show_bug.cgi?id=109898
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        * fast/events/platform-wheelevent-with-delta-zero-crash-expected.txt: Added.
     9        * fast/events/platform-wheelevent-with-delta-zero-crash.html: Added.
     10
    1112013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r143300 r143303  
     12013-02-18  Hayato Ito  <hayato@chromium.org>
     2
     3        Make EventDispatcher take an Event object in its constructor.
     4        https://bugs.webkit.org/show_bug.cgi?id=109898
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        Re-landing r143145, which caused a crash when deltaX and deltaY of a PlatformWheelEvent are both zero.
     9
     10        Fixed a crash by early exiting in EventDispatcher::dispatchEvent(Node*, PassRefPtr<EventDispatcher*>)
     11        if mediator's event() returns null.
     12
     13        Also Added a layout test to catch this kind of crash in the future.
     14
     15        Test: fast/events/platform-wheelevent-with-delta-zero-crash.html
     16
     17        * dom/EventDispatchMediator.cpp:
     18        (WebCore::EventDispatchMediator::dispatchEvent):
     19        * dom/EventDispatcher.cpp:
     20        (WebCore::EventDispatcher::dispatchEvent):
     21        (WebCore::EventDispatcher::EventDispatcher):
     22        (WebCore::EventDispatcher::ensureEventPath):
     23        (WebCore::EventDispatcher::dispatchSimulatedClick):
     24        (WebCore::EventDispatcher::dispatch):
     25        (WebCore::EventDispatcher::dispatchEventPreProcess):
     26        (WebCore::EventDispatcher::dispatchEventAtCapturing):
     27        (WebCore::EventDispatcher::dispatchEventAtTarget):
     28        (WebCore::EventDispatcher::dispatchEventAtBubbling):
     29        (WebCore::EventDispatcher::dispatchEventPostProcess):
     30        * dom/EventDispatcher.h:
     31        (EventDispatcher):
     32        (WebCore::EventDispatcher::node):
     33        (WebCore::EventDispatcher::event):
     34        * dom/FocusEvent.cpp:
     35        (WebCore::FocusEventDispatchMediator::dispatchEvent):
     36        (WebCore::BlurEventDispatchMediator::dispatchEvent):
     37        (WebCore::FocusInEventDispatchMediator::dispatchEvent):
     38        (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
     39        * dom/GestureEvent.cpp:
     40        (WebCore::GestureEventDispatchMediator::dispatchEvent):
     41        * dom/MouseEvent.cpp:
     42        (WebCore::MouseEventDispatchMediator::dispatchEvent):
     43        * dom/WheelEvent.cpp:
     44        (WebCore::WheelEventDispatchMediator::dispatchEvent):
     45        Assert event() rather than an early exit since this code path should be hit only when event() is non-null.
     46
    1472013-02-18  Takashi Sakamoto  <tasak@google.com>
    248
  • trunk/Source/WebCore/dom/EventDispatchMediator.cpp

    r143244 r143303  
    5151bool EventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
    5252{
    53     return dispatcher->dispatchEvent(m_event.get());
     53    ASSERT(m_event.get() == dispatcher->event());
     54    return dispatcher->dispatch();
    5455}
    5556
  • trunk/Source/WebCore/dom/EventDispatcher.cpp

    r143244 r143303  
    5151{
    5252    ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
    53 
    54     EventDispatcher dispatcher(node);
     53    if (!mediator->event())
     54        return true;
     55    EventDispatcher dispatcher(node, mediator->event());
    5556    return mediator->dispatchEvent(&dispatcher);
    5657}
    5758
    58 EventDispatcher::EventDispatcher(Node* node)
     59EventDispatcher::EventDispatcher(Node* node, PassRefPtr<Event> event)
    5960    : m_node(node)
     61    , m_event(event)
    6062    , m_eventPathInitialized(false)
    6163#ifndef NDEBUG
     
    6466{
    6567    ASSERT(node);
     68    ASSERT(m_event.get());
     69    ASSERT(!m_event->type().isNull()); // JavaScript code can create an event with an empty name, but not null.
    6670    m_view = node->document()->view();
    6771}
    6872
    69 EventPath& EventDispatcher::ensureEventPath(Event* event)
     73EventPath& EventDispatcher::ensureEventPath()
    7074{
    7175    if (m_eventPathInitialized)
    7276        return m_eventPath;
    7377    m_eventPathInitialized = true;
    74     EventRetargeter::calculateEventPath(m_node.get(), event, m_eventPath);
     78    EventRetargeter::calculateEventPath(m_node.get(), m_event.get(), m_eventPath);
    7579    return m_eventPath;
    7680}
     
    96100
    97101    if (mouseEventOptions == SendMouseOverUpDownEvents)
    98         EventDispatcher(node).dispatchEvent(SimulatedMouseEvent::create(eventNames().mouseoverEvent, node->document()->defaultView(), underlyingEvent));
     102        EventDispatcher(node, SimulatedMouseEvent::create(eventNames().mouseoverEvent, node->document()->defaultView(), underlyingEvent)).dispatch();
    99103
    100104    if (mouseEventOptions != SendNoEvents)
    101         EventDispatcher(node).dispatchEvent(SimulatedMouseEvent::create(eventNames().mousedownEvent, node->document()->defaultView(), underlyingEvent));
     105        EventDispatcher(node, SimulatedMouseEvent::create(eventNames().mousedownEvent, node->document()->defaultView(), underlyingEvent)).dispatch();
    102106    node->setActive(true, visualOptions == ShowPressedLook);
    103107    if (mouseEventOptions != SendNoEvents)
    104         EventDispatcher(node).dispatchEvent(SimulatedMouseEvent::create(eventNames().mouseupEvent, node->document()->defaultView(), underlyingEvent));
     108        EventDispatcher(node, SimulatedMouseEvent::create(eventNames().mouseupEvent, node->document()->defaultView(), underlyingEvent)).dispatch();
    105109    node->setActive(false);
    106110
    107111    // always send click
    108     EventDispatcher(node).dispatchEvent(SimulatedMouseEvent::create(eventNames().clickEvent, node->document()->defaultView(), underlyingEvent));
     112    EventDispatcher(node, SimulatedMouseEvent::create(eventNames().clickEvent, node->document()->defaultView(), underlyingEvent)).dispatch();
    109113
    110114    gNodesDispatchingSimulatedClicks->remove(node);
    111115}
    112116
    113 bool EventDispatcher::dispatchEvent(PassRefPtr<Event> prpEvent)
     117bool EventDispatcher::dispatch()
    114118{
    115119#ifndef NDEBUG
     
    117121    m_eventDispatched = true;
    118122#endif
    119     RefPtr<Event> event = prpEvent;
    120123    ChildNodesLazySnapshot::takeChildNodesLazySnapshot();
    121124
    122     event->setTarget(EventRetargeter::eventTargetRespectingTargetRules(m_node.get()));
     125    m_event->setTarget(EventRetargeter::eventTargetRespectingTargetRules(m_node.get()));
    123126    ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
    124     ASSERT(event->target());
    125     ASSERT(!event->type().isNull()); // JavaScript code can create an event with an empty name, but not null.
    126     ensureEventPath(event.get());
    127     WindowEventContext windowEventContext(event.get(), m_node.get(), topEventContext());
    128     InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEvent(m_node->document(), *event, windowEventContext.window(), m_node.get(), m_eventPath);
     127    ASSERT(m_event->target());
     128    ensureEventPath();
     129    WindowEventContext windowEventContext(m_event.get(), m_node.get(), topEventContext());
     130    InspectorInstrumentationCookie cookie = InspectorInstrumentation::willDispatchEvent(m_node->document(), *m_event, windowEventContext.window(), m_node.get(), m_eventPath);
    129131
    130132    void* preDispatchEventHandlerResult;
    131     if (dispatchEventPreProcess(event, preDispatchEventHandlerResult) == ContinueDispatching)
    132         if (dispatchEventAtCapturing(event, windowEventContext) == ContinueDispatching)
    133             if (dispatchEventAtTarget(event) == ContinueDispatching)
    134                 dispatchEventAtBubbling(event, windowEventContext);
    135     dispatchEventPostProcess(event, preDispatchEventHandlerResult);
     133    if (dispatchEventPreProcess(preDispatchEventHandlerResult) == ContinueDispatching)
     134        if (dispatchEventAtCapturing(windowEventContext) == ContinueDispatching)
     135            if (dispatchEventAtTarget() == ContinueDispatching)
     136                dispatchEventAtBubbling(windowEventContext);
     137    dispatchEventPostProcess(preDispatchEventHandlerResult);
    136138
    137139    // Ensure that after event dispatch, the event's target object is the
    138140    // outermost shadow DOM boundary.
    139     event->setTarget(windowEventContext.target());
    140     event->setCurrentTarget(0);
     141    m_event->setTarget(windowEventContext.target());
     142    m_event->setCurrentTarget(0);
    141143    InspectorInstrumentation::didDispatchEvent(cookie);
    142144
    143     return !event->defaultPrevented();
    144 }
    145 
    146 inline EventDispatchContinuation EventDispatcher::dispatchEventPreProcess(PassRefPtr<Event> event, void*& preDispatchEventHandlerResult)
     145    return !m_event->defaultPrevented();
     146}
     147
     148inline EventDispatchContinuation EventDispatcher::dispatchEventPreProcess(void*& preDispatchEventHandlerResult)
    147149{
    148150    // Give the target node a chance to do some work before DOM event handlers get a crack.
    149     preDispatchEventHandlerResult = m_node->preDispatchEventHandler(event.get());
    150     return (m_eventPath.isEmpty() || event->propagationStopped()) ? DoneDispatching : ContinueDispatching;
    151 }
    152 
    153 inline EventDispatchContinuation EventDispatcher::dispatchEventAtCapturing(PassRefPtr<Event> event, WindowEventContext& windowEventContext)
     151    preDispatchEventHandlerResult = m_node->preDispatchEventHandler(m_event.get());
     152    return (m_eventPath.isEmpty() || m_event->propagationStopped()) ? DoneDispatching : ContinueDispatching;
     153}
     154
     155inline EventDispatchContinuation EventDispatcher::dispatchEventAtCapturing(WindowEventContext& windowEventContext)
    154156{
    155157    // Trigger capturing event handlers, starting at the top and working our way down.
    156     event->setEventPhase(Event::CAPTURING_PHASE);
    157 
    158     if (windowEventContext.handleLocalEvents(event.get()) && event->propagationStopped())
     158    m_event->setEventPhase(Event::CAPTURING_PHASE);
     159
     160    if (windowEventContext.handleLocalEvents(m_event.get()) && m_event->propagationStopped())
    159161        return DoneDispatching;
    160162
     
    162164        const EventContext& eventContext = *m_eventPath[i];
    163165        if (eventContext.currentTargetSameAsTarget()) {
    164             if (event->bubbles())
     166            if (m_event->bubbles())
    165167                continue;
    166             event->setEventPhase(Event::AT_TARGET);
     168            m_event->setEventPhase(Event::AT_TARGET);
    167169        } else
    168             event->setEventPhase(Event::CAPTURING_PHASE);
    169         eventContext.handleLocalEvents(event.get());
    170         if (event->propagationStopped())
     170            m_event->setEventPhase(Event::CAPTURING_PHASE);
     171        eventContext.handleLocalEvents(m_event.get());
     172        if (m_event->propagationStopped())
    171173            return DoneDispatching;
    172174    }
     
    175177}
    176178
    177 inline EventDispatchContinuation EventDispatcher::dispatchEventAtTarget(PassRefPtr<Event> event)
    178 {
    179     event->setEventPhase(Event::AT_TARGET);
    180     m_eventPath[0]->handleLocalEvents(event.get());
    181     return event->propagationStopped() ? DoneDispatching : ContinueDispatching;
    182 }
    183 
    184 inline EventDispatchContinuation EventDispatcher::dispatchEventAtBubbling(PassRefPtr<Event> event, WindowEventContext& windowContext)
    185 {
    186     if (event->bubbles() && !event->cancelBubble()) {
     179inline EventDispatchContinuation EventDispatcher::dispatchEventAtTarget()
     180{
     181    m_event->setEventPhase(Event::AT_TARGET);
     182    m_eventPath[0]->handleLocalEvents(m_event.get());
     183    return m_event->propagationStopped() ? DoneDispatching : ContinueDispatching;
     184}
     185
     186inline EventDispatchContinuation EventDispatcher::dispatchEventAtBubbling(WindowEventContext& windowContext)
     187{
     188    if (m_event->bubbles() && !m_event->cancelBubble()) {
    187189        // Trigger bubbling event handlers, starting at the bottom and working our way up.
    188         event->setEventPhase(Event::BUBBLING_PHASE);
     190        m_event->setEventPhase(Event::BUBBLING_PHASE);
    189191
    190192        size_t size = m_eventPath.size();
     
    192194            const EventContext& eventContext = *m_eventPath[i];
    193195            if (eventContext.currentTargetSameAsTarget())
    194                 event->setEventPhase(Event::AT_TARGET);
     196                m_event->setEventPhase(Event::AT_TARGET);
    195197            else
    196                 event->setEventPhase(Event::BUBBLING_PHASE);
    197             eventContext.handleLocalEvents(event.get());
    198             if (event->propagationStopped() || event->cancelBubble())
     198                m_event->setEventPhase(Event::BUBBLING_PHASE);
     199            eventContext.handleLocalEvents(m_event.get());
     200            if (m_event->propagationStopped() || m_event->cancelBubble())
    199201                return DoneDispatching;
    200202        }
    201         windowContext.handleLocalEvents(event.get());
     203        windowContext.handleLocalEvents(m_event.get());
    202204    }
    203205    return ContinueDispatching;
    204206}
    205207
    206 inline void EventDispatcher::dispatchEventPostProcess(PassRefPtr<Event> event, void* preDispatchEventHandlerResult)
    207 {
    208     event->setTarget(EventRetargeter::eventTargetRespectingTargetRules(m_node.get()));
    209     event->setCurrentTarget(0);
    210     event->setEventPhase(0);
     208inline void EventDispatcher::dispatchEventPostProcess(void* preDispatchEventHandlerResult)
     209{
     210    m_event->setTarget(EventRetargeter::eventTargetRespectingTargetRules(m_node.get()));
     211    m_event->setCurrentTarget(0);
     212    m_event->setEventPhase(0);
    211213
    212214    // Pass the data from the preDispatchEventHandler to the postDispatchEventHandler.
    213     m_node->postDispatchEventHandler(event.get(), preDispatchEventHandlerResult);
     215    m_node->postDispatchEventHandler(m_event.get(), preDispatchEventHandlerResult);
    214216
    215217    // Call default event handlers. While the DOM does have a concept of preventing
    216218    // default handling, the detail of which handlers are called is an internal
    217219    // implementation detail and not part of the DOM.
    218     if (!event->defaultPrevented() && !event->defaultHandled()) {
     220    if (!m_event->defaultPrevented() && !m_event->defaultHandled()) {
    219221        // Non-bubbling events call only one default event handler, the one for the target.
    220         m_node->defaultEventHandler(event.get());
    221         ASSERT(!event->defaultPrevented());
    222         if (event->defaultHandled())
     222        m_node->defaultEventHandler(m_event.get());
     223        ASSERT(!m_event->defaultPrevented());
     224        if (m_event->defaultHandled())
    223225            return;
    224226        // For bubbling events, call default event handlers on the same targets in the
    225227        // same order as the bubbling phase.
    226         if (event->bubbles()) {
     228        if (m_event->bubbles()) {
    227229            size_t size = m_eventPath.size();
    228230            for (size_t i = 1; i < size; ++i) {
    229                 m_eventPath[i]->node()->defaultEventHandler(event.get());
    230                 ASSERT(!event->defaultPrevented());
    231                 if (event->defaultHandled())
     231                m_eventPath[i]->node()->defaultEventHandler(m_event.get());
     232                ASSERT(!m_event->defaultPrevented());
     233                if (m_event->defaultHandled())
    232234                    return;
    233235            }
  • trunk/Source/WebCore/dom/EventDispatcher.h

    r143244 r143303  
    3131#include <wtf/Forward.h>
    3232#include <wtf/HashMap.h>
     33#include <wtf/PassRefPtr.h>
    3334#include <wtf/Vector.h>
    3435
     
    5859    static void dispatchSimulatedClick(Node*, Event* underlyingEvent, SimulatedClickMouseEventOptions, SimulatedClickVisualOptions);
    5960
    60     bool dispatchEvent(PassRefPtr<Event>);
    61     Node* node() const;
    62     EventPath& ensureEventPath(Event*);
     61    bool dispatch();
     62    Node* node() const { return m_node.get(); }
     63    Event* event() const { return m_event.get(); }
     64    EventPath& ensureEventPath();
    6365
    6466private:
    65     EventDispatcher(Node*);
     67    EventDispatcher(Node*, PassRefPtr<Event>);
    6668    const EventContext* topEventContext();
    6769
    68     EventDispatchContinuation dispatchEventPreProcess(PassRefPtr<Event>, void*& preDispatchEventHandlerResult);
    69     EventDispatchContinuation dispatchEventAtCapturing(PassRefPtr<Event>, WindowEventContext&);
    70     EventDispatchContinuation dispatchEventAtTarget(PassRefPtr<Event>);
    71     EventDispatchContinuation dispatchEventAtBubbling(PassRefPtr<Event>, WindowEventContext&);
    72     void dispatchEventPostProcess(PassRefPtr<Event>, void* preDispatchEventHandlerResult);
     70    EventDispatchContinuation dispatchEventPreProcess(void*& preDispatchEventHandlerResult);
     71    EventDispatchContinuation dispatchEventAtCapturing(WindowEventContext&);
     72    EventDispatchContinuation dispatchEventAtTarget();
     73    EventDispatchContinuation dispatchEventAtBubbling(WindowEventContext&);
     74    void dispatchEventPostProcess(void* preDispatchEventHandlerResult);
    7375
    7476    EventPath m_eventPath;
    7577    RefPtr<Node> m_node;
     78    RefPtr<Event> m_event;
    7679    RefPtr<FrameView> m_view;
    7780    bool m_eventPathInitialized;
     
    8184};
    8285
    83 inline Node* EventDispatcher::node() const
    84 {
    85     return m_node.get();
    86 }
    87 
    8886}
    8987
  • trunk/Source/WebCore/dom/FocusEvent.cpp

    r143244 r143303  
    7878bool FocusEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
    7979{
    80     EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->ensureEventPath(event()));
     80    EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->ensureEventPath());
    8181    return EventDispatchMediator::dispatchEvent(dispatcher);
    8282}
     
    9494bool BlurEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
    9595{
    96     EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->ensureEventPath(event()));
     96    EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->ensureEventPath());
    9797    return EventDispatchMediator::dispatchEvent(dispatcher);
    9898}
     
    110110bool FocusInEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
    111111{
    112     EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->ensureEventPath(event()));
     112    EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->ensureEventPath());
    113113    return EventDispatchMediator::dispatchEvent(dispatcher);
    114114}
     
    126126bool FocusOutEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
    127127{
    128     EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->ensureEventPath(event()));
     128    EventRetargeter::adjustForFocusEvent(dispatcher->node(), *event(), dispatcher->ensureEventPath());
    129129    return EventDispatchMediator::dispatchEvent(dispatcher);
    130130}
  • trunk/Source/WebCore/dom/GestureEvent.cpp

    r143244 r143303  
    123123        return true;
    124124
    125     dispatcher->dispatchEvent(event());
     125    dispatcher->dispatch();
    126126    ASSERT(!event()->defaultPrevented());
    127127    return event()->defaultHandled() || event()->defaultPrevented();
  • trunk/Source/WebCore/dom/MouseEvent.cpp

    r143244 r143303  
    263263{
    264264    if (isSyntheticMouseEvent()) {
    265         EventRetargeter::adjustForMouseEvent(dispatcher->node(), *event(),  dispatcher->ensureEventPath(event()));
    266         return dispatcher->dispatchEvent(event());
     265        EventRetargeter::adjustForMouseEvent(dispatcher->node(), *event(),  dispatcher->ensureEventPath());
     266        return dispatcher->dispatch();
    267267    }
    268268
     
    276276
    277277    EventTarget* relatedTarget = event()->relatedTarget();
    278     EventRetargeter::adjustForMouseEvent(dispatcher->node(), *event(),  dispatcher->ensureEventPath(event()));
    279 
    280     dispatcher->dispatchEvent(event());
     278    EventRetargeter::adjustForMouseEvent(dispatcher->node(), *event(),  dispatcher->ensureEventPath());
     279
     280    dispatcher->dispatch();
    281281    bool swallowEvent = event()->defaultHandled() || event()->defaultPrevented();
    282282
  • trunk/Source/WebCore/dom/WheelEvent.cpp

    r141826 r143303  
    139139bool WheelEventDispatchMediator::dispatchEvent(EventDispatcher* dispatcher) const
    140140{
    141     if (!event())
    142         return true;
    143 
     141    ASSERT(event());
    144142    return EventDispatchMediator::dispatchEvent(dispatcher) && !event()->defaultHandled();
    145143}
Note: See TracChangeset for help on using the changeset viewer.