Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 1362973004: Rename FROM_HERE to BLINK_FROM_HERE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv ed.
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies)
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 2628 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 } 2639 }
2640 2640
2641 GestureEventWithHitTestResults eventWithHitTestResults = hitTestResultForGes tureEvent(gestureEvent, hitType); 2641 GestureEventWithHitTestResults eventWithHitTestResults = hitTestResultForGes tureEvent(gestureEvent, hitType);
2642 // Now apply hover/active state to the final target. 2642 // Now apply hover/active state to the final target.
2643 HitTestRequest request(hitType | HitTestRequest::AllowChildFrameContent); 2643 HitTestRequest request(hitType | HitTestRequest::AllowChildFrameContent);
2644 if (!request.readOnly()) 2644 if (!request.readOnly())
2645 updateGestureHoverActiveState(request, eventWithHitTestResults.hitTestRe sult().innerElement()); 2645 updateGestureHoverActiveState(request, eventWithHitTestResults.hitTestRe sult().innerElement());
2646 2646
2647 if (shouldKeepActiveForMinInterval) { 2647 if (shouldKeepActiveForMinInterval) {
2648 m_lastDeferredTapElement = eventWithHitTestResults.hitTestResult().inner Element(); 2648 m_lastDeferredTapElement = eventWithHitTestResults.hitTestResult().inner Element();
2649 m_activeIntervalTimer.startOneShot(minimumActiveInterval - activeInterva l, FROM_HERE); 2649 m_activeIntervalTimer.startOneShot(minimumActiveInterval - activeInterva l, BLINK_FROM_HERE);
2650 } 2650 }
2651 2651
2652 return eventWithHitTestResults; 2652 return eventWithHitTestResults;
2653 } 2653 }
2654 2654
2655 GestureEventWithHitTestResults EventHandler::hitTestResultForGestureEvent(const PlatformGestureEvent& gestureEvent, HitTestRequest::HitTestRequestType hitType) 2655 GestureEventWithHitTestResults EventHandler::hitTestResultForGestureEvent(const PlatformGestureEvent& gestureEvent, HitTestRequest::HitTestRequestType hitType)
2656 { 2656 {
2657 // Perform the rect-based hit-test (or point-based if adjustment is disabled ). Note that 2657 // Perform the rect-based hit-test (or point-based if adjustment is disabled ). Note that
2658 // we don't yet apply hover/active state here because we need to resolve tou ch adjustment 2658 // we don't yet apply hover/active state here because we need to resolve tou ch adjustment
2659 // first so that we apply hover/active it to the final adjusted node. 2659 // first so that we apply hover/active it to the final adjusted node.
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 // FIXME: Send HitTestResults to avoid redundant hit tests. 2866 // FIXME: Send HitTestResults to avoid redundant hit tests.
2867 handleMousePressEvent(mouseEvent); 2867 handleMousePressEvent(mouseEvent);
2868 return sendContextMenuEvent(mouseEvent); 2868 return sendContextMenuEvent(mouseEvent);
2869 // We do not need to send a corresponding mouse release because in case of 2869 // We do not need to send a corresponding mouse release because in case of
2870 // right-click, the context menu takes capture and consumes all events. 2870 // right-click, the context menu takes capture and consumes all events.
2871 } 2871 }
2872 2872
2873 void EventHandler::scheduleHoverStateUpdate() 2873 void EventHandler::scheduleHoverStateUpdate()
2874 { 2874 {
2875 if (!m_hoverTimer.isActive()) 2875 if (!m_hoverTimer.isActive())
2876 m_hoverTimer.startOneShot(0, FROM_HERE); 2876 m_hoverTimer.startOneShot(0, BLINK_FROM_HERE);
2877 } 2877 }
2878 2878
2879 void EventHandler::scheduleCursorUpdate() 2879 void EventHandler::scheduleCursorUpdate()
2880 { 2880 {
2881 // We only want one timer for the page, rather than each frame having it's o wn timer 2881 // We only want one timer for the page, rather than each frame having it's o wn timer
2882 // competing which eachother (since there's only one mouse cursor). 2882 // competing which eachother (since there's only one mouse cursor).
2883 ASSERT(m_frame == m_frame->localFrameRoot()); 2883 ASSERT(m_frame == m_frame->localFrameRoot());
2884 2884
2885 if (!m_cursorUpdateTimer.isActive()) 2885 if (!m_cursorUpdateTimer.isActive())
2886 m_cursorUpdateTimer.startOneShot(cursorUpdateInterval, FROM_HERE); 2886 m_cursorUpdateTimer.startOneShot(cursorUpdateInterval, BLINK_FROM_HERE);
2887 } 2887 }
2888 2888
2889 bool EventHandler::cursorUpdatePending() 2889 bool EventHandler::cursorUpdatePending()
2890 { 2890 {
2891 return m_cursorUpdateTimer.isActive(); 2891 return m_cursorUpdateTimer.isActive();
2892 } 2892 }
2893 2893
2894 void EventHandler::dispatchFakeMouseMoveEventSoon() 2894 void EventHandler::dispatchFakeMouseMoveEventSoon()
2895 { 2895 {
2896 if (m_mousePressed) 2896 if (m_mousePressed)
2897 return; 2897 return;
2898 2898
2899 if (m_mousePositionIsUnknown) 2899 if (m_mousePositionIsUnknown)
2900 return; 2900 return;
2901 2901
2902 Settings* settings = m_frame->settings(); 2902 Settings* settings = m_frame->settings();
2903 if (settings && !settings->deviceSupportsMouse()) 2903 if (settings && !settings->deviceSupportsMouse())
2904 return; 2904 return;
2905 2905
2906 // Reschedule the timer, to prevent dispatching mouse move events 2906 // Reschedule the timer, to prevent dispatching mouse move events
2907 // during a scroll. This avoids a potential source of scroll jank. 2907 // during a scroll. This avoids a potential source of scroll jank.
2908 if (m_fakeMouseMoveEventTimer.isActive()) 2908 if (m_fakeMouseMoveEventTimer.isActive())
2909 m_fakeMouseMoveEventTimer.stop(); 2909 m_fakeMouseMoveEventTimer.stop();
2910 m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveInterval, FROM_HERE); 2910 m_fakeMouseMoveEventTimer.startOneShot(fakeMouseMoveInterval, BLINK_FROM_HER E);
2911 } 2911 }
2912 2912
2913 void EventHandler::dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad& quad) 2913 void EventHandler::dispatchFakeMouseMoveEventSoonInQuad(const FloatQuad& quad)
2914 { 2914 {
2915 FrameView* view = m_frame->view(); 2915 FrameView* view = m_frame->view();
2916 if (!view) 2916 if (!view)
2917 return; 2917 return;
2918 2918
2919 if (!quad.containsPoint(view->rootFrameToContents(m_lastKnownMousePosition)) ) 2919 if (!quad.containsPoint(view->rootFrameToContents(m_lastKnownMousePosition)) )
2920 return; 2920 return;
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
4021 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() 4021 PlatformEvent::Modifiers EventHandler::accessKeyModifiers()
4022 { 4022 {
4023 #if OS(MACOSX) 4023 #if OS(MACOSX)
4024 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); 4024 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey);
4025 #else 4025 #else
4026 return PlatformEvent::AltKey; 4026 return PlatformEvent::AltKey;
4027 #endif 4027 #endif
4028 } 4028 }
4029 4029
4030 } // namespace blink 4030 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698