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

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

Issue 1331533002: [poc] curve-filter Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Ensure screen device profiles are matrix Created 4 years, 12 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "core/style/ComputedStyle.h" 84 #include "core/style/ComputedStyle.h"
85 #include "core/svg/SVGDocumentExtensions.h" 85 #include "core/svg/SVGDocumentExtensions.h"
86 #include "platform/PlatformGestureEvent.h" 86 #include "platform/PlatformGestureEvent.h"
87 #include "platform/PlatformKeyboardEvent.h" 87 #include "platform/PlatformKeyboardEvent.h"
88 #include "platform/PlatformTouchEvent.h" 88 #include "platform/PlatformTouchEvent.h"
89 #include "platform/PlatformWheelEvent.h" 89 #include "platform/PlatformWheelEvent.h"
90 #include "platform/RuntimeEnabledFeatures.h" 90 #include "platform/RuntimeEnabledFeatures.h"
91 #include "platform/TraceEvent.h" 91 #include "platform/TraceEvent.h"
92 #include "platform/WindowsKeyboardCodes.h" 92 #include "platform/WindowsKeyboardCodes.h"
93 #include "platform/geometry/FloatPoint.h" 93 #include "platform/geometry/FloatPoint.h"
94 #include "platform/graphics/GraphicsScreen.h"
94 #include "platform/graphics/Image.h" 95 #include "platform/graphics/Image.h"
95 #include "platform/heap/Handle.h" 96 #include "platform/heap/Handle.h"
96 #include "platform/scroll/ScrollAnimatorBase.h" 97 #include "platform/scroll/ScrollAnimatorBase.h"
97 #include "platform/scroll/Scrollbar.h" 98 #include "platform/scroll/Scrollbar.h"
98 #include "wtf/Assertions.h" 99 #include "wtf/Assertions.h"
99 #include "wtf/CurrentTime.h" 100 #include "wtf/CurrentTime.h"
100 #include "wtf/StdLibExtras.h" 101 #include "wtf/StdLibExtras.h"
101 #include "wtf/TemporaryChange.h" 102 #include "wtf/TemporaryChange.h"
102 103
103 namespace blink { 104 namespace blink {
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after
3442 // We are starting a text/image/url drag, so the cursor should be an arrow 3443 // We are starting a text/image/url drag, so the cursor should be an arrow
3443 // FIXME <rdar://7577595>: Custom cursors aren't supported during drag and d rop (default to pointer). 3444 // FIXME <rdar://7577595>: Custom cursors aren't supported during drag and d rop (default to pointer).
3444 m_frame->view()->setCursor(pointerCursor()); 3445 m_frame->view()->setCursor(pointerCursor());
3445 3446
3446 if (initiator == DragInitiator::Mouse && !dragHysteresisExceeded(event.event ().position())) 3447 if (initiator == DragInitiator::Mouse && !dragHysteresisExceeded(event.event ().position()))
3447 return true; 3448 return true;
3448 3449
3449 // Once we're past the hysteresis point, we don't want to treat this gesture as a click 3450 // Once we're past the hysteresis point, we don't want to treat this gesture as a click
3450 invalidateClick(); 3451 invalidateClick();
3451 3452
3452 if (!tryStartDrag(event)) { 3453 uintptr_t previousId = setCurrentScreenId(Page::screenId(m_frame->page()));
3453 // Something failed to start the drag, clean up. 3454 bool dragStarted = tryStartDrag(event);
3455 setCurrentScreenId(previousId);
3456
3457 if (!dragStarted) { // Something failed to start the drag, clean up.
3454 clearDragDataTransfer(); 3458 clearDragDataTransfer();
3455 dragState().m_dragSrc = nullptr; 3459 dragState().m_dragSrc = nullptr;
3456 } 3460 }
3457 3461
3458 m_mouseDownMayStartDrag = false; 3462 m_mouseDownMayStartDrag = false;
3459 // Whether or not the drag actually started, no more default handling (like selection). 3463 // Whether or not the drag actually started, no more default handling (like selection).
3460 return true; 3464 return true;
3461 } 3465 }
3462 3466
3463 bool EventHandler::tryStartDrag(const MouseEventWithHitTestResults& event) 3467 bool EventHandler::tryStartDrag(const MouseEventWithHitTestResults& event)
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
4141 PlatformEvent::Modifiers EventHandler::accessKeyModifiers() 4145 PlatformEvent::Modifiers EventHandler::accessKeyModifiers()
4142 { 4146 {
4143 #if OS(MACOSX) 4147 #if OS(MACOSX)
4144 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey); 4148 return static_cast<PlatformEvent::Modifiers>(PlatformEvent::CtrlKey | Platfo rmEvent::AltKey);
4145 #else 4149 #else
4146 return PlatformEvent::AltKey; 4150 return PlatformEvent::AltKey;
4147 #endif 4151 #endif
4148 } 4152 }
4149 4153
4150 } // namespace blink 4154 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698