Changeset 173024 in webkit
- Timestamp:
- Aug 27, 2014, 3:25:30 PM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r173023 r173024 1 2014-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 1 28 2014-08-27 Beth Dakin <bdakin@apple.com> 2 29 -
trunk/Source/WebCore/page/EventHandler.cpp
r172969 r173024 458 458 #endif 459 459 clearLongMousePressState(); 460 m_resizeLayer = 0;460 m_resizeLayer = nullptr; 461 461 m_elementUnderMouse = nullptr; 462 462 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; 467 467 m_clickCount = 0; 468 m_clickNode = 0;468 m_clickNode = nullptr; 469 469 #if ENABLE(IOS_GESTURE_EVENTS) 470 470 m_gestureInitialDiameter = GestureUnknown; … … 477 477 m_touches.clear(); 478 478 m_firstTouchID = InvalidTouchIdentifier; 479 m_touchEventTargetSubframe = 0;480 #endif 481 m_frameSetBeingResized = 0;479 m_touchEventTargetSubframe = nullptr; 480 #endif 481 m_frameSetBeingResized = nullptr; 482 482 #if ENABLE(DRAG_SUPPORT) 483 m_dragTarget = 0;483 m_dragTarget = nullptr; 484 484 m_shouldOnlyFireDragOverEvent = false; 485 485 #endif … … 732 732 #if ENABLE(DRAG_SUPPORT) 733 733 // Reset drag state. 734 dragState().source = 0;734 dragState().source = nullptr; 735 735 #endif 736 736 … … 1644 1644 } 1645 1645 1646 bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& mouseEvent)1646 bool EventHandler::handleMousePressEvent(const PlatformMouseEvent& plaformMouseEvent) 1647 1647 { 1648 1648 RefPtr<FrameView> protector(m_frame.view()); … … 1669 1669 m_mousePressed = true; 1670 1670 m_capturesDragging = true; 1671 setLastKnownMousePosition( mouseEvent);1672 m_mouseDownTimestamp = mouseEvent.timestamp();1671 setLastKnownMousePosition(plaformMouseEvent); 1672 m_mouseDownTimestamp = plaformMouseEvent.timestamp(); 1673 1673 #if ENABLE(DRAG_SUPPORT) 1674 1674 m_mouseDownMayStartDrag = false; … … 1677 1677 m_mouseDownMayStartAutoscroll = false; 1678 1678 if (FrameView* view = m_frame.view()) 1679 m_mouseDownPos = view->windowToContents( mouseEvent.position());1679 m_mouseDownPos = view->windowToContents(plaformMouseEvent.position()); 1680 1680 else { 1681 1681 invalidateClick(); … … 1687 1687 // Save the document point we generate in case the window coordinate is invalidated by what happens 1688 1688 // 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); 1691 1691 1692 1692 if (!mev.targetNode()) { … … 1723 1723 #endif 1724 1724 1725 m_clickCount = mouseEvent.clickCount();1725 m_clickCount = plaformMouseEvent.clickCount(); 1726 1726 m_clickNode = mev.targetNode(); 1727 1727 … … 1733 1733 if (FrameView* view = m_frame.view()) { 1734 1734 RenderLayer* layer = m_clickNode->renderer() ? m_clickNode->renderer()->enclosingLayer() : 0; 1735 IntPoint p = view->windowToContents( mouseEvent.position());1735 IntPoint p = view->windowToContents(plaformMouseEvent.position()); 1736 1736 if (layer && layer->isPointInResizeControl(p)) { 1737 1737 layer->setInResizeMode(true); … … 1745 1745 m_frame.selection().setCaretBlinkingSuspended(true); 1746 1746 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); 1748 1748 m_capturesDragging = !swallowEvent || mev.scrollbar(); 1749 1749 … … 1753 1753 const bool wasLastScrollBar = mev.scrollbar() == m_lastScrollbarUnderMouse.get(); 1754 1754 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); 1756 1756 if (wasLastScrollBar && mev.scrollbar() != m_lastScrollbarUnderMouse.get()) 1757 m_lastScrollbarUnderMouse = 0;1757 m_lastScrollbarUnderMouse = nullptr; 1758 1758 } 1759 1759 … … 1773 1773 if (mev.targetNode()->isShadowRoot() && isHTMLInputElement(toShadowRoot(mev.targetNode())->hostElement())) { 1774 1774 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); 1776 1776 } 1777 1777 1778 1778 FrameView* view = m_frame.view(); 1779 Scrollbar* scrollbar = view ? view->scrollbarAtPoint( mouseEvent.position()) : 0;1779 Scrollbar* scrollbar = view ? view->scrollbarAtPoint(plaformMouseEvent.position()) : 0; 1780 1780 if (!scrollbar) 1781 1781 scrollbar = mev.scrollbar(); … … 1793 1793 1794 1794 // This method only exists for platforms that don't know how to deliver 1795 bool EventHandler::handleMouseDoubleClickEvent(const PlatformMouseEvent& mouseEvent)1795 bool EventHandler::handleMouseDoubleClickEvent(const PlatformMouseEvent& plaformMouseEvent) 1796 1796 { 1797 1797 RefPtr<FrameView> protector(m_frame.view()); … … 1803 1803 // We get this instead of a second mouse-up 1804 1804 m_mousePressed = false; 1805 setLastKnownMousePosition( mouseEvent);1805 setLastKnownMousePosition(plaformMouseEvent); 1806 1806 1807 1807 HitTestRequest request(HitTestRequest::Active | HitTestRequest::DisallowShadowContent); 1808 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);1808 MouseEventWithHitTestResults mev = prepareMouseEvent(request, plaformMouseEvent); 1809 1809 Frame* subframe = subframeForHitTestResult(mev); 1810 1810 if (m_eventHandlerWillResetCapturingMouseEventsElement) … … 1813 1813 return true; 1814 1814 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); 1819 1819 1820 1820 if (m_lastScrollbarUnderMouse) 1821 swallowMouseUpEvent = m_lastScrollbarUnderMouse->mouseUp( mouseEvent);1821 swallowMouseUpEvent = m_lastScrollbarUnderMouse->mouseUp(plaformMouseEvent); 1822 1822 1823 1823 bool swallowMouseReleaseEvent = !swallowMouseUpEvent && handleMouseReleaseEvent(mev); … … 1878 1878 } 1879 1879 1880 bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& mouseEvent, HitTestResult* hoveredNode, bool onlyUpdateScrollbars)1880 bool EventHandler::handleMouseMoveEvent(const PlatformMouseEvent& plaformMouseEvent, HitTestResult* hoveredNode, bool onlyUpdateScrollbars) 1881 1881 { 1882 1882 #if ENABLE(TOUCH_EVENTS) 1883 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled( mouseEvent);1883 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(plaformMouseEvent); 1884 1884 if (defaultPrevented) 1885 1885 return true; 1886 1886 #endif 1887 1887 1888 if (handleLongMousePressMouseMovedEvent( mouseEvent))1888 if (handleLongMousePressMouseMovedEvent(plaformMouseEvent)) 1889 1889 return true; 1890 1890 1891 1891 RefPtr<FrameView> protector(m_frame.view()); 1892 1892 1893 setLastKnownMousePosition( mouseEvent);1893 setLastKnownMousePosition(plaformMouseEvent); 1894 1894 1895 1895 if (m_hoverTimer.isActive()) … … 1910 1910 1911 1911 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); 1913 1913 1914 1914 // On iOS, our scrollbars are managed by UIKit. … … 1916 1916 // Send events right to a scrollbar if the mouse is pressed. 1917 1917 if (m_lastScrollbarUnderMouse && m_mousePressed) 1918 return m_lastScrollbarUnderMouse->mouseMoved( mouseEvent);1918 return m_lastScrollbarUnderMouse->mouseMoved(plaformMouseEvent); 1919 1919 #endif 1920 1920 … … 1936 1936 #endif 1937 1937 HitTestRequest request(hitType); 1938 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);1938 MouseEventWithHitTestResults mev = prepareMouseEvent(request, plaformMouseEvent); 1939 1939 if (hoveredNode) 1940 1940 *hoveredNode = mev.hitTestResult(); 1941 1941 1942 1942 if (m_resizeLayer && m_resizeLayer->inResizeMode()) 1943 m_resizeLayer->resize( mouseEvent, m_offsetFromResizeCorner);1943 m_resizeLayer->resize(plaformMouseEvent, m_offsetFromResizeCorner); 1944 1944 else { 1945 1945 Scrollbar* scrollbar = mev.scrollbar(); … … 1949 1949 #if !PLATFORM(IOS) 1950 1950 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. 1952 1952 #endif 1953 1953 if (onlyUpdateScrollbars) … … 1964 1964 if (newSubframe) { 1965 1965 // Update over/out state before passing the event to the subframe. 1966 updateMouseEventTargetNode(mev.targetNode(), mouseEvent, true);1966 updateMouseEventTargetNode(mev.targetNode(), plaformMouseEvent, true); 1967 1967 1968 1968 // Event dispatch in updateMouseEventTargetNode may have caused the subframe of the target … … 1973 1973 } else { 1974 1974 if (FrameView* view = m_frame.view()) { 1975 OptionalCursor optionalCursor = selectCursor(mev.hitTestResult(), mouseEvent.shiftKey());1975 OptionalCursor optionalCursor = selectCursor(mev.hitTestResult(), plaformMouseEvent.shiftKey()); 1976 1976 if (optionalCursor.isCursorChange()) { 1977 1977 m_currentMouseCursor = optionalCursor.cursor(); … … 1987 1987 return true; 1988 1988 1989 swallowEvent = !dispatchMouseEvent(eventNames().mousemoveEvent, mev.targetNode(), false, 0, mouseEvent, true);1989 swallowEvent = !dispatchMouseEvent(eventNames().mousemoveEvent, mev.targetNode(), false, 0, plaformMouseEvent, true); 1990 1990 #if ENABLE(DRAG_SUPPORT) 1991 1991 if (!swallowEvent) … … 1999 1999 { 2000 2000 m_clickCount = 0; 2001 m_clickNode = 0;2001 m_clickNode = nullptr; 2002 2002 } 2003 2003 … … 2026 2026 } 2027 2027 2028 bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& mouseEvent)2028 bool EventHandler::handleMouseReleaseEvent(const PlatformMouseEvent& plaformMouseEvent) 2029 2029 { 2030 2030 RefPtr<FrameView> protector(m_frame.view()); … … 2033 2033 2034 2034 #if ENABLE(TOUCH_EVENTS) 2035 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled( mouseEvent);2035 bool defaultPrevented = dispatchSyntheticTouchEventIfEnabled(plaformMouseEvent); 2036 2036 if (defaultPrevented) 2037 2037 return true; … … 2041 2041 2042 2042 #if ENABLE(PAN_SCROLLING) 2043 m_autoscrollController->handleMouseReleaseEvent( mouseEvent);2043 m_autoscrollController->handleMouseReleaseEvent(plaformMouseEvent); 2044 2044 #endif 2045 2045 2046 2046 m_mousePressed = false; 2047 setLastKnownMousePosition( mouseEvent);2047 setLastKnownMousePosition(plaformMouseEvent); 2048 2048 2049 2049 if (m_svgPan) { … … 2054 2054 2055 2055 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); 2057 2057 2058 2058 if (m_lastScrollbarUnderMouse) { 2059 2059 invalidateClick(); 2060 m_lastScrollbarUnderMouse->mouseUp( mouseEvent);2060 m_lastScrollbarUnderMouse->mouseUp(plaformMouseEvent); 2061 2061 bool cancelable = true; 2062 2062 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); 2064 2064 } 2065 2065 2066 2066 HitTestRequest request(HitTestRequest::Release | HitTestRequest::DisallowShadowContent); 2067 MouseEventWithHitTestResults mev = prepareMouseEvent(request, mouseEvent);2067 MouseEventWithHitTestResults mev = prepareMouseEvent(request, plaformMouseEvent); 2068 2068 Frame* subframe = m_capturingMouseEventsElement.get() ? subframeForTargetNode(m_capturingMouseEventsElement.get()) : subframeForHitTestResult(mev); 2069 2069 if (m_eventHandlerWillResetCapturingMouseEventsElement) … … 2072 2072 return true; 2073 2073 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); 2079 2079 2080 2080 if (m_resizeLayer) { 2081 2081 m_resizeLayer->setInResizeMode(false); 2082 m_resizeLayer = 0;2082 m_resizeLayer = nullptr; 2083 2083 } 2084 2084 … … 2092 2092 } 2093 2093 2094 bool EventHandler::handlePasteGlobalSelection(const PlatformMouseEvent& mouseEvent)2094 bool EventHandler::handlePasteGlobalSelection(const PlatformMouseEvent& plaformMouseEvent) 2095 2095 { 2096 2096 // If the event was a middle click, attempt to copy global selection in after … … 2111 2111 // handlers have been fired. 2112 2112 #if PLATFORM(GTK) 2113 if ( mouseEvent.type() != PlatformEvent::MousePressed)2113 if (plaformMouseEvent.type() != PlatformEvent::MousePressed) 2114 2114 return false; 2115 2115 #else 2116 if ( mouseEvent.type() != PlatformEvent::MouseReleased)2116 if (plaformMouseEvent.type() != PlatformEvent::MouseReleased) 2117 2117 return false; 2118 2118 #endif … … 2402 2402 } 2403 2403 2404 void EventHandler::updateMouseEventTargetNode(Node* targetNode, const PlatformMouseEvent& mouseEvent, bool fireMouseOverOut)2404 void EventHandler::updateMouseEventTargetNode(Node* targetNode, const PlatformMouseEvent& plaformMouseEvent, bool fireMouseOverOut) 2405 2405 { 2406 2406 Element* targetElement = nullptr; … … 2491 2491 if (m_lastElementUnderMouse && &m_lastElementUnderMouse->document() != m_frame.document()) { 2492 2492 m_lastElementUnderMouse = nullptr; 2493 m_lastScrollbarUnderMouse = 0;2494 m_lastInstanceUnderMouse = 0;2493 m_lastScrollbarUnderMouse = nullptr; 2494 m_lastInstanceUnderMouse = nullptr; 2495 2495 } 2496 2496 … … 2531 2531 // Send mouseout event to the old node. 2532 2532 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()); 2534 2534 2535 2535 // Send mouseleave to the node hierarchy no longer under the mouse. 2536 2536 for (size_t i = 0; i < leftElementsChain.size(); ++i) { 2537 2537 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()); 2539 2539 } 2540 2540 2541 2541 // Send mouseover event to the new node. 2542 2542 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()); 2544 2544 2545 2545 // Send mouseleave event to the nodes hierarchy under the mouse. 2546 2546 for (size_t i = 0, size = enteredElementsChain.size(); i < size; ++i) { 2547 2547 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()); 2549 2549 } 2550 2550 } … … 2554 2554 } 2555 2555 2556 bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targetNode, bool /*cancelable*/, int clickCount, const PlatformMouseEvent& mouseEvent, bool setUnder)2556 bool EventHandler::dispatchMouseEvent(const AtomicString& eventType, Node* targetNode, bool /*cancelable*/, int clickCount, const PlatformMouseEvent& plaformMouseEvent, bool setUnder) 2557 2557 { 2558 2558 if (FrameView* view = m_frame.view()) 2559 2559 view->disableLayerFlushThrottlingTemporarilyForInteraction(); 2560 2560 2561 updateMouseEventTargetNode(targetNode, mouseEvent, setUnder);2561 updateMouseEventTargetNode(targetNode, plaformMouseEvent, setUnder); 2562 2562 2563 2563 bool swallowEvent = false; 2564 2564 2565 2565 if (m_elementUnderMouse) 2566 swallowEvent = !(m_elementUnderMouse->dispatchMouseEvent( mouseEvent, eventType, clickCount));2566 swallowEvent = !(m_elementUnderMouse->dispatchMouseEvent(plaformMouseEvent, eventType, clickCount)); 2567 2567 2568 2568 if (!swallowEvent && eventType == eventNames().mousedownEvent) { … … 2570 2570 // If clicking on a frame scrollbar, do not mess up with content focus. 2571 2571 if (FrameView* view = m_frame.view()) { 2572 if (view->scrollbarAtPoint( mouseEvent.position()))2572 if (view->scrollbarAtPoint(plaformMouseEvent.position())) 2573 2573 return true; 2574 2574 } … … 2601 2601 2602 2602 // 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())) 2604 2604 return false; 2605 2605 … … 2879 2879 #endif 2880 2880 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); 2884 2884 } 2885 2885 #endif // ENABLE(CONTEXT_MENUS) … … 3981 3981 3982 3982 #if ENABLE(TOUCH_EVENTS) 3983 bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& event)3983 bool EventHandler::dispatchSyntheticTouchEventIfEnabled(const PlatformMouseEvent& plaformMouseEvent) 3984 3984 { 3985 3985 #if ENABLE(IOS_TOUCH_EVENTS) 3986 UNUSED_PARAM( event);3986 UNUSED_PARAM(plaformMouseEvent); 3987 3987 return false; 3988 3988 #else … … 3990 3990 return false; 3991 3991 3992 PlatformEvent::Type eventType = event.type();3992 PlatformEvent::Type eventType = plaformMouseEvent.type(); 3993 3993 if (eventType != PlatformEvent::MouseMoved && eventType != PlatformEvent::MousePressed && eventType != PlatformEvent::MouseReleased) 3994 3994 return false; 3995 3995 3996 3996 HitTestRequest request(HitTestRequest::Active | HitTestRequest::DisallowShadowContent); 3997 MouseEventWithHitTestResults mev = prepareMouseEvent(request, event);3997 MouseEventWithHitTestResults mev = prepareMouseEvent(request, plaformMouseEvent); 3998 3998 if (mev.scrollbar() || subframeForHitTestResult(mev)) 3999 3999 return false; … … 4003 4003 return true; 4004 4004 4005 SyntheticSingleTouchEvent touchEvent( event);4005 SyntheticSingleTouchEvent touchEvent(plaformMouseEvent); 4006 4006 return handleTouchEvent(touchEvent); 4007 4007 #endif
Note:
See TracChangeset
for help on using the changeset viewer.