Changeset 173024 in webkit


Ignore:
Timestamp:
Aug 27, 2014, 3:25:30 PM (10 years ago)
Author:
Simon Fraser
Message:

Some EventHandler naming cleanup
https://bugs.webkit.org/show_bug.cgi?id=136303

Reviewed by Beth Dakin.

Rename PlatformMouseEvent variables from "mouseEvent" to "platformMouseEvent"
so that a later patch can rename "mev" to "mouseEvent".

0 => nullptr.

No behavior change.

  • page/EventHandler.cpp:

(WebCore::EventHandler::clear):
(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::handleMouseDoubleClickEvent):
(WebCore::EventHandler::handleMouseMoveEvent):
(WebCore::EventHandler::invalidateClick):
(WebCore::EventHandler::handleMouseReleaseEvent):
(WebCore::EventHandler::handlePasteGlobalSelection):
(WebCore::EventHandler::updateMouseEventTargetNode):
(WebCore::EventHandler::dispatchMouseEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r173023 r173024  
     12014-08-27  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Some EventHandler naming cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=136303
     5
     6        Reviewed by Beth Dakin.
     7
     8        Rename PlatformMouseEvent variables from "mouseEvent" to "platformMouseEvent"
     9        so that a later patch can rename "mev" to "mouseEvent".
     10       
     11        0 => nullptr.
     12       
     13        No behavior change.
     14
     15        * page/EventHandler.cpp:
     16        (WebCore::EventHandler::clear):
     17        (WebCore::EventHandler::handleMousePressEvent):
     18        (WebCore::EventHandler::handleMouseDoubleClickEvent):
     19        (WebCore::EventHandler::handleMouseMoveEvent):
     20        (WebCore::EventHandler::invalidateClick):
     21        (WebCore::EventHandler::handleMouseReleaseEvent):
     22        (WebCore::EventHandler::handlePasteGlobalSelection):
     23        (WebCore::EventHandler::updateMouseEventTargetNode):
     24        (WebCore::EventHandler::dispatchMouseEvent):
     25        (WebCore::EventHandler::sendContextMenuEventForKey):
     26        (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
     27
    1282014-08-27  Beth Dakin  <bdakin@apple.com>
    229
  • trunk/Source/WebCore/page/EventHandler.cpp

    r172969 r173024  
    458458#endif
    459459    clearLongMousePressState();
    460     m_resizeLayer = 0;
     460    m_resizeLayer = nullptr;
    461461    m_elementUnderMouse = nullptr;
    462462    m_lastElementUnderMouse = nullptr;
    463     m_instanceUnderMouse = 0;
    464     m_lastInstanceUnderMouse = 0;
    465     m_lastMouseMoveEventSubframe = 0;
    466     m_lastScrollbarUnderMouse = 0;
     463    m_instanceUnderMouse = nullptr;
     464    m_lastInstanceUnderMouse = nullptr;
     465    m_lastMouseMoveEventSubframe = nullptr;
     466    m_lastScrollbarUnderMouse = nullptr;
    467467    m_clickCount = 0;
    468     m_clickNode = 0;
     468    m_clickNode = nullptr;
    469469#if ENABLE(IOS_GESTURE_EVENTS)
    470470    m_gestureInitialDiameter = GestureUnknown;
     
    477477    m_touches.clear();
    478478    m_firstTouchID = InvalidTouchIdentifier;
    479     m_touchEventTargetSubframe = 0;
    480 #endif
    481     m_frameSetBeingResized = 0;
     479    m_touchEventTargetSubframe = nullptr;
     480#endif
     481    m_frameSetBeingResized = nullptr;
    482482#if ENABLE(DRAG_SUPPORT)
    483     m_dragTarget = 0;
     483    m_dragTarget = nullptr;
    484484    m_shouldOnlyFireDragOverEvent = false;
    485485#endif
     
    732732#if ENABLE(DRAG_SUPPORT)
    733733    // Reset drag state.
    734     dragState().source = 0;
     734    dragState().source = nullptr;
    735735#endif
    736736
     
    16441644}
    16451645
    1646 bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)
     1646bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& plaformMouseEvent)
    16471647{
    16481648    RefPtr<FrameView> protector(m_frame.view());
     
    16691669    m_mousePressed = true;
    16701670    m_capturesDragging = true;
    1671     setLastKnownMousePosition(mouseEvent);
    1672     m_mouseDownTimestamp = mouseEvent.timestamp();
     1671    setLastKnownMousePosition(plaformMouseEvent);
     1672    m_mouseDownTimestamp = plaformMouseEvent.timestamp();
    16731673#if ENABLE(DRAG_SUPPORT)
    16741674    m_mouseDownMayStartDrag = false;
     
    16771677    m_mouseDownMayStartAutoscroll = false;
    16781678    if (FrameView* view = m_frame.view())
    1679         m_mouseDownPos = view->windowToContents(mouseEvent.position());
     1679        m_mouseDownPos = view->windowToContents(plaformMouseEvent.position());
    16801680    else {
    16811681        invalidateClick();
     
    16871687    // Save the document point we generate in case the window coordinate is invalidated by what happens
    16881688    // when we dispatch the event.
    1689     LayoutPoint documentPoint = documentPointForWindowPoint(m_frame, mouseEvent.position());
    1690     MouseEventWithHitTestResults mev = m_frame.document()->prepareMouseEvent(request, documentPoint, mouseEvent);
     1689    LayoutPoint documentPoint = documentPointForWindowPoint(m_frame, plaformMouseEvent.position());
     1690    MouseEventWithHitTestResults mev = m_frame.document()->prepareMouseEvent(request, documentPoint, plaformMouseEvent);
    16911691
    16921692    if (!mev.targetNode()) {
     
    17231723#endif
    17241724
    1725     m_clickCount = mouseEvent.clickCount();
     1725    m_clickCount = plaformMouseEvent.clickCount();
    17261726    m_clickNode = mev.targetNode();
    17271727
     
    17331733    if (FrameView* view = m_frame.view()) {
    17341734        RenderLayer* layer = m_clickNode->renderer() ? m_clickNode->renderer()->enclosingLayer() : 0;
    1735         IntPoint p = view->windowToContents(mouseEvent.position());
     1735        IntPoint p = view->windowToContents(plaformMouseEvent.position());
    17361736        if (layer && layer->isPointInResizeControl(p)) {
    17371737            layer->setInResizeMode(true);
     
    17451745    m_frame.selection().setCaretBlinkingSuspended(true);
    17461746
    1747     bool swallowEvent = !dispatchMouseEvent(eventNames().mousedownEvent, mev.targetNode(), true, m_clickCount, mouseEvent, true);
     1747    bool swallowEvent = !dispatchMouseEvent(eventNames().mousedownEvent, mev.targetNode(), true, m_clickCount, plaformMouseEvent, true);
    17481748    m_capturesDragging = !swallowEvent || mev.scrollbar();
    17491749
     
    17531753        const bool wasLastScrollBar = mev.scrollbar() == m_lastScrollbarUnderMouse.get();
    17541754        HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowShadowContent);
    1755         mev = m_frame.document()->prepareMouseEvent(request, documentPoint, mouseEvent);
     1755        mev = m_frame.document()->prepareMouseEvent(request, documentPoint, plaformMouseEvent);
    17561756        if (wasLastScrollBar && mev.scrollbar() != m_lastScrollbarUnderMouse.get())
    1757             m_lastScrollbarUnderMouse = 0;
     1757            m_lastScrollbarUnderMouse = nullptr;
    17581758    }
    17591759
     
    17731773        if (mev.targetNode()->isShadowRoot() && isHTMLInputElement(toShadowRoot(mev.targetNode())->hostElement())) {
    17741774            HitTestRequest request(HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::DisallowShadowContent);
    1775             mev = m_frame.document()->prepareMouseEvent(request, documentPoint, mouseEvent);
     1775            mev = m_frame.document()->prepareMouseEvent(request, documentPoint, plaformMouseEvent);
    17761776        }
    17771777
    17781778        FrameView* view = m_frame.view();
    1779         Scrollbar* scrollbar = view ? view->scrollbarAtPoint(mouseEvent.position()) : 0;
     1779        Scrollbar* scrollbar = view ? view->scrollbarAtPoint(plaformMouseEvent.position()) : 0;
    17801780        if (!scrollbar)
    17811781            scrollbar = mev.scrollbar();
     
    17931793
    17941794// This method only exists for platforms that don't know how to deliver
    1795 bool EventHandler::handleMouseDoubleClickEvent(const PlatformMouseEvent& mouseEvent)
     1795bool EventHandler::handleMouseDoubleClickEvent(const PlatformMouseEvent& plaformMouseEvent)
    17961796{
    17971797    RefPtr<FrameView> protector(m_frame.view());
     
    18031803    // We get this instead of a second mouse-up
    18041804    m_mousePressed = false;
    1805     setLastKnownMousePosition(mouseEvent);
     1805    setLastKnownMousePosition(plaformMouseEvent);
    18061806
    18071807    HitTestRequest request(HitTestRequest::Active | HitTestRequest::DisallowShadowContent);
    1808     MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);
     1808    MouseEventWithHitTestResults mev = prepareMouseEvent(request, plaformMouseEvent);
    18091809    Frame* subframe = subframeForHitTestResult(mev);
    18101810    if (m_eventHandlerWillResetCapturingMouseEventsElement)
     
    18131813        return true;
    18141814
    1815     m_clickCount = mouseEvent.clickCount();
    1816     bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, mev.targetNode(), true, m_clickCount, mouseEvent, false);
    1817 
    1818     bool swallowClickEvent = mouseEvent.button() != RightButton && mev.targetNode() == m_clickNode && !dispatchMouseEvent(eventNames().clickEvent, mev.targetNode(), true, m_clickCount, mouseEvent, true);
     1815    m_clickCount = plaformMouseEvent.clickCount();
     1816    bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, mev.targetNode(), true, m_clickCount, plaformMouseEvent, false);
     1817
     1818    bool swallowClickEvent = plaformMouseEvent.button() != RightButton && mev.targetNode() == m_clickNode && !dispatchMouseEvent(eventNames().clickEvent, mev.targetNode(), true, m_clickCount, plaformMouseEvent, true);
    18191819
    18201820    if (m_lastScrollbarUnderMouse)
    1821         swallowMouseUpEvent = m_lastScrollbarUnderMouse->mouseUp(mouseEvent);
     1821        swallowMouseUpEvent = m_lastScrollbarUnderMouse->mouseUp(plaformMouseEvent);
    18221822
    18231823    bool swallowMouseReleaseEvent = !swallowMouseUpEvent && handleMouseReleaseEvent(mev);
     
    18781878}
    18791879
    1880 bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, HitTestResult* hoveredNode, bool onlyUpdateScrollbars)
     1880bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& plaformMouseEvent, HitTestResult* hoveredNode, bool onlyUpdateScrollbars)
    18811881{
    18821882#if ENABLE(TOUCH_EVENTS)
    1883     bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
     1883    bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(plaformMouseEvent);
    18841884    if (defaultPrevented)
    18851885        return true;
    18861886#endif
    18871887
    1888     if (handleLongMousePressMouseMovedEvent(mouseEvent))
     1888    if (handleLongMousePressMouseMovedEvent(plaformMouseEvent))
    18891889        return true;
    18901890
    18911891    RefPtr<FrameView> protector(m_frame.view());
    18921892   
    1893     setLastKnownMousePosition(mouseEvent);
     1893    setLastKnownMousePosition(plaformMouseEvent);
    18941894
    18951895    if (m_hoverTimer.isActive())
     
    19101910
    19111911    if (m_frameSetBeingResized)
    1912         return !dispatchMouseEvent(eventNames().mousemoveEvent, m_frameSetBeingResized.get(), false, 0, mouseEvent, false);
     1912        return !dispatchMouseEvent(eventNames().mousemoveEvent, m_frameSetBeingResized.get(), false, 0, plaformMouseEvent, false);
    19131913
    19141914    // On iOS, our scrollbars are managed by UIKit.
     
    19161916    // Send events right to a scrollbar if the mouse is pressed.
    19171917    if (m_lastScrollbarUnderMouse && m_mousePressed)
    1918         return m_lastScrollbarUnderMouse->mouseMoved(mouseEvent);
     1918        return m_lastScrollbarUnderMouse->mouseMoved(plaformMouseEvent);
    19191919#endif
    19201920
     
    19361936#endif
    19371937    HitTestRequest request(hitType);
    1938     MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);
     1938    MouseEventWithHitTestResults mev = prepareMouseEvent(request, plaformMouseEvent);
    19391939    if (hoveredNode)
    19401940        *hoveredNode = mev.hitTestResult();
    19411941
    19421942    if (m_resizeLayer && m_resizeLayer->inResizeMode())
    1943         m_resizeLayer->resize(mouseEvent, m_offsetFromResizeCorner);
     1943        m_resizeLayer->resize(plaformMouseEvent, m_offsetFromResizeCorner);
    19441944    else {
    19451945        Scrollbar* scrollbar = mev.scrollbar();
     
    19491949#if !PLATFORM(IOS)
    19501950        if (!m_mousePressed && scrollbar)
    1951             scrollbar->mouseMoved(mouseEvent); // Handle hover effects on platforms that support visual feedback on scrollbar hovering.
     1951            scrollbar->mouseMoved(plaformMouseEvent); // Handle hover effects on platforms that support visual feedback on scrollbar hovering.
    19521952#endif
    19531953        if (onlyUpdateScrollbars)
     
    19641964    if (newSubframe) {
    19651965        // Update over/out state before passing the event to the subframe.
    1966         updateMouseEventTargetNode(mev.targetNode(), mouseEvent, true);
     1966        updateMouseEventTargetNode(mev.targetNode(), plaformMouseEvent, true);
    19671967       
    19681968        // Event dispatch in updateMouseEventTargetNode may have caused the subframe of the target
     
    19731973    } else {
    19741974        if (FrameView* view = m_frame.view()) {
    1975             OptionalCursor optionalCursor = selectCursor(mev.hitTestResult(), mouseEvent.shiftKey());
     1975            OptionalCursor optionalCursor = selectCursor(mev.hitTestResult(), plaformMouseEvent.shiftKey());
    19761976            if (optionalCursor.isCursorChange()) {
    19771977                m_currentMouseCursor = optionalCursor.cursor();
     
    19871987        return true;
    19881988   
    1989     swallowEvent = !dispatchMouseEvent(eventNames().mousemoveEvent, mev.targetNode(), false, 0, mouseEvent, true);
     1989    swallowEvent = !dispatchMouseEvent(eventNames().mousemoveEvent, mev.targetNode(), false, 0, plaformMouseEvent, true);
    19901990#if ENABLE(DRAG_SUPPORT)
    19911991    if (!swallowEvent)
     
    19991999{
    20002000    m_clickCount = 0;
    2001     m_clickNode = 0;
     2001    m_clickNode = nullptr;
    20022002}
    20032003
     
    20262026}
    20272027
    2028 bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)
     2028bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& plaformMouseEvent)
    20292029{
    20302030    RefPtr<FrameView> protector(m_frame.view());
     
    20332033
    20342034#if ENABLE(TOUCH_EVENTS)
    2035     bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(mouseEvent);
     2035    bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(plaformMouseEvent);
    20362036    if (defaultPrevented)
    20372037        return true;
     
    20412041
    20422042#if ENABLE(PAN_SCROLLING)
    2043     m_autoscrollController->handleMouseReleaseEvent(mouseEvent);
     2043    m_autoscrollController->handleMouseReleaseEvent(plaformMouseEvent);
    20442044#endif
    20452045
    20462046    m_mousePressed = false;
    2047     setLastKnownMousePosition(mouseEvent);
     2047    setLastKnownMousePosition(plaformMouseEvent);
    20482048
    20492049    if (m_svgPan) {
     
    20542054
    20552055    if (m_frameSetBeingResized)
    2056         return !dispatchMouseEvent(eventNames().mouseupEvent, m_frameSetBeingResized.get(), true, m_clickCount, mouseEvent, false);
     2056        return !dispatchMouseEvent(eventNames().mouseupEvent, m_frameSetBeingResized.get(), true, m_clickCount, plaformMouseEvent, false);
    20572057
    20582058    if (m_lastScrollbarUnderMouse) {
    20592059        invalidateClick();
    2060         m_lastScrollbarUnderMouse->mouseUp(mouseEvent);
     2060        m_lastScrollbarUnderMouse->mouseUp(plaformMouseEvent);
    20612061        bool cancelable = true;
    20622062        bool setUnder = false;
    2063         return !dispatchMouseEvent(eventNames().mouseupEvent, m_lastElementUnderMouse.get(), cancelable, m_clickCount, mouseEvent, setUnder);
     2063        return !dispatchMouseEvent(eventNames().mouseupEvent, m_lastElementUnderMouse.get(), cancelable, m_clickCount, plaformMouseEvent, setUnder);
    20642064    }
    20652065
    20662066    HitTestRequest request(HitTestRequest::Release | HitTestRequest::DisallowShadowContent);
    2067     MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);
     2067    MouseEventWithHitTestResults mev = prepareMouseEvent(request, plaformMouseEvent);
    20682068    Frame* subframe = m_capturingMouseEventsElement.get() ? subframeForTargetNode(m_capturingMouseEventsElement.get()) : subframeForHitTestResult(mev);
    20692069    if (m_eventHandlerWillResetCapturingMouseEventsElement)
     
    20722072        return true;
    20732073
    2074     bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, mev.targetNode(), true, m_clickCount, mouseEvent, false);
    2075 
    2076     bool contextMenuEvent = mouseEvent.button() == RightButton;
    2077 
    2078     bool swallowClickEvent = m_clickCount > 0 && !contextMenuEvent && mouseIsReleasedOnPressedElement(mev.targetNode(), m_clickNode.get()) && !dispatchMouseEvent(eventNames().clickEvent, mev.targetNode(), true, m_clickCount, mouseEvent, true);
     2074    bool swallowMouseUpEvent = !dispatchMouseEvent(eventNames().mouseupEvent, mev.targetNode(), true, m_clickCount, plaformMouseEvent, false);
     2075
     2076    bool contextMenuEvent = plaformMouseEvent.button() == RightButton;
     2077
     2078    bool swallowClickEvent = m_clickCount > 0 && !contextMenuEvent && mouseIsReleasedOnPressedElement(mev.targetNode(), m_clickNode.get()) && !dispatchMouseEvent(eventNames().clickEvent, mev.targetNode(), true, m_clickCount, plaformMouseEvent, true);
    20792079
    20802080    if (m_resizeLayer) {
    20812081        m_resizeLayer->setInResizeMode(false);
    2082         m_resizeLayer = 0;
     2082        m_resizeLayer = nullptr;
    20832083    }
    20842084
     
    20922092}
    20932093
    2094 bool EventHandler::handlePasteGlobalSelection(const PlatformMouseEvent& mouseEvent)
     2094bool EventHandler::handlePasteGlobalSelection(const PlatformMouseEvent& plaformMouseEvent)
    20952095{
    20962096    // If the event was a middle click, attempt to copy global selection in after
     
    21112111    // handlers have been fired.
    21122112#if PLATFORM(GTK)
    2113     if (mouseEvent.type() != PlatformEvent::MousePressed)
     2113    if (plaformMouseEvent.type() != PlatformEvent::MousePressed)
    21142114        return false;
    21152115#else
    2116     if (mouseEvent.type() != PlatformEvent::MouseReleased)
     2116    if (plaformMouseEvent.type() != PlatformEvent::MouseReleased)
    21172117        return false;
    21182118#endif
     
    24022402}
    24032403
    2404 void EventHandler::updateMouseEventTargetNode(Node* targetNode, const PlatformMouseEvent& mouseEvent, bool fireMouseOverOut)
     2404void EventHandler::updateMouseEventTargetNode(Node* targetNode, const PlatformMouseEvent& plaformMouseEvent, bool fireMouseOverOut)
    24052405{
    24062406    Element* targetElement = nullptr;
     
    24912491        if (m_lastElementUnderMouse && &m_lastElementUnderMouse->document() != m_frame.document()) {
    24922492            m_lastElementUnderMouse = nullptr;
    2493             m_lastScrollbarUnderMouse = 0;
    2494             m_lastInstanceUnderMouse = 0;
     2493            m_lastScrollbarUnderMouse = nullptr;
     2494            m_lastInstanceUnderMouse = nullptr;
    24952495        }
    24962496
     
    25312531            // Send mouseout event to the old node.
    25322532            if (m_lastElementUnderMouse)
    2533                 m_lastElementUnderMouse->dispatchMouseEvent(mouseEvent, eventNames().mouseoutEvent, 0, m_elementUnderMouse.get());
     2533                m_lastElementUnderMouse->dispatchMouseEvent(plaformMouseEvent, eventNames().mouseoutEvent, 0, m_elementUnderMouse.get());
    25342534
    25352535            // Send mouseleave to the node hierarchy no longer under the mouse.
    25362536            for (size_t i = 0; i < leftElementsChain.size(); ++i) {
    25372537                if (hasCapturingMouseLeaveListener || leftElementsChain[i]->hasEventListeners(eventNames().mouseleaveEvent))
    2538                     leftElementsChain[i]->dispatchMouseEvent(mouseEvent, eventNames().mouseleaveEvent, 0, m_elementUnderMouse.get());
     2538                    leftElementsChain[i]->dispatchMouseEvent(plaformMouseEvent, eventNames().mouseleaveEvent, 0, m_elementUnderMouse.get());
    25392539            }
    25402540
    25412541            // Send mouseover event to the new node.
    25422542            if (m_elementUnderMouse)
    2543                 m_elementUnderMouse->dispatchMouseEvent(mouseEvent, eventNames().mouseoverEvent, 0, m_lastElementUnderMouse.get());
     2543                m_elementUnderMouse->dispatchMouseEvent(plaformMouseEvent, eventNames().mouseoverEvent, 0, m_lastElementUnderMouse.get());
    25442544
    25452545            // Send mouseleave event to the nodes hierarchy under the mouse.
    25462546            for (size_t i = 0, size = enteredElementsChain.size(); i < size; ++i) {
    25472547                if (hasCapturingMouseEnterListener || enteredElementsChain[i]->hasEventListeners(eventNames().mouseenterEvent))
    2548                     enteredElementsChain[i]->dispatchMouseEvent(mouseEvent, eventNames().mouseenterEvent, 0, m_lastElementUnderMouse.get());
     2548                    enteredElementsChain[i]->dispatchMouseEvent(plaformMouseEvent, eventNames().mouseenterEvent, 0, m_lastElementUnderMouse.get());
    25492549            }
    25502550        }
     
    25542554}
    25552555
    2556 bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targetNode, bool /*cancelable*/, int clickCount, const PlatformMouseEvent& mouseEvent, bool setUnder)
     2556bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targetNode, bool /*cancelable*/, int clickCount, const PlatformMouseEvent& plaformMouseEvent, bool setUnder)
    25572557{
    25582558    if (FrameView* view = m_frame.view())
    25592559        view->disableLayerFlushThrottlingTemporarilyForInteraction();
    25602560
    2561     updateMouseEventTargetNode(targetNode, mouseEvent, setUnder);
     2561    updateMouseEventTargetNode(targetNode, plaformMouseEvent, setUnder);
    25622562
    25632563    bool swallowEvent = false;
    25642564
    25652565    if (m_elementUnderMouse)
    2566         swallowEvent = !(m_elementUnderMouse->dispatchMouseEvent(mouseEvent, eventType, clickCount));
     2566        swallowEvent = !(m_elementUnderMouse->dispatchMouseEvent(plaformMouseEvent, eventType, clickCount));
    25672567
    25682568    if (!swallowEvent && eventType == eventNames().mousedownEvent) {
     
    25702570        // If clicking on a frame scrollbar, do not mess up with content focus.
    25712571        if (FrameView* view = m_frame.view()) {
    2572             if (view->scrollbarAtPoint(mouseEvent.position()))
     2572            if (view->scrollbarAtPoint(plaformMouseEvent.position()))
    25732573                return true;
    25742574        }
     
    26012601
    26022602        // Only change the focus when clicking scrollbars if it can transfered to a mouse focusable node.
    2603         if ((!element || !element->isMouseFocusable()) && isInsideScrollbar(mouseEvent.position()))
     2603        if ((!element || !element->isMouseFocusable()) && isInsideScrollbar(plaformMouseEvent.position()))
    26042604            return false;
    26052605
     
    28792879#endif
    28802880
    2881     PlatformMouseEvent mouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, WTF::currentTime());
    2882 
    2883     return !dispatchMouseEvent(eventNames().contextmenuEvent, targetNode, true, 0, mouseEvent, false);
     2881    PlatformMouseEvent plaformMouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, WTF::currentTime());
     2882
     2883    return !dispatchMouseEvent(eventNames().contextmenuEvent, targetNode, true, 0, plaformMouseEvent, false);
    28842884}
    28852885#endif // ENABLE(CONTEXT_MENUS)
     
    39813981
    39823982#if ENABLE(TOUCH_EVENTS)
    3983 bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& event)
     3983bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& plaformMouseEvent)
    39843984{
    39853985#if ENABLE(IOS_TOUCH_EVENTS)
    3986     UNUSED_PARAM(event);
     3986    UNUSED_PARAM(plaformMouseEvent);
    39873987    return false;
    39883988#else
     
    39903990        return false;
    39913991
    3992     PlatformEvent::Type eventType = event.type();
     3992    PlatformEvent::Type eventType = plaformMouseEvent.type();
    39933993    if (eventType != PlatformEvent::MouseMoved && eventType != PlatformEvent::MousePressed && eventType != PlatformEvent::MouseReleased)
    39943994        return false;
    39953995
    39963996    HitTestRequest request(HitTestRequest::Active | HitTestRequest::DisallowShadowContent);
    3997     MouseEventWithHitTestResults mev = prepareMouseEvent(request, event);
     3997    MouseEventWithHitTestResults mev = prepareMouseEvent(request, plaformMouseEvent);
    39983998    if (mev.scrollbar() || subframeForHitTestResult(mev))
    39993999        return false;
     
    40034003        return true;
    40044004
    4005     SyntheticSingleTouchEvent touchEvent(event);
     4005    SyntheticSingleTouchEvent touchEvent(plaformMouseEvent);
    40064006    return handleTouchEvent(touchEvent);
    40074007#endif
Note: See TracChangeset for help on using the changeset viewer.