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

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

Issue 2965603002: Update hover states when dragging the mouse into an element (Closed)
Patch Set: hover drag Created 3 years, 5 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/input/GestureManager.h" 5 #include "core/input/GestureManager.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/UserGestureIndicator.h" 8 #include "core/dom/UserGestureIndicator.h"
9 #include "core/editing/SelectionController.h" 9 #include "core/editing/SelectionController.h"
10 #include "core/events/GestureEvent.h" 10 #include "core/events/GestureEvent.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 HitTestRequest::HitTestRequestType GestureManager::GetHitTypeForGestureType( 49 HitTestRequest::HitTestRequestType GestureManager::GetHitTypeForGestureType(
50 WebInputEvent::Type type) { 50 WebInputEvent::Type type) {
51 HitTestRequest::HitTestRequestType hit_type = HitTestRequest::kTouchEvent; 51 HitTestRequest::HitTestRequestType hit_type = HitTestRequest::kTouchEvent;
52 switch (type) { 52 switch (type) {
53 case WebInputEvent::kGestureShowPress: 53 case WebInputEvent::kGestureShowPress:
54 case WebInputEvent::kGestureTapUnconfirmed: 54 case WebInputEvent::kGestureTapUnconfirmed:
55 return hit_type | HitTestRequest::kActive; 55 return hit_type | HitTestRequest::kActive;
56 case WebInputEvent::kGestureTapCancel: 56 case WebInputEvent::kGestureTapCancel:
57 // A TapDownCancel received when no element is active shouldn't really be 57 // A TapDownCancel received when no element is active shouldn't really be
58 // changing hover state. 58 // changing hover state.
59 if (!frame_->GetDocument()->ActiveHoverElement()) 59 if (!frame_->GetDocument()->GetActiveElement())
60 hit_type |= HitTestRequest::kReadOnly; 60 hit_type |= HitTestRequest::kReadOnly;
61 return hit_type | HitTestRequest::kRelease; 61 return hit_type | HitTestRequest::kRelease;
62 case WebInputEvent::kGestureTap: 62 case WebInputEvent::kGestureTap:
63 return hit_type | HitTestRequest::kRelease; 63 return hit_type | HitTestRequest::kRelease;
64 case WebInputEvent::kGestureTapDown: 64 case WebInputEvent::kGestureTapDown:
65 case WebInputEvent::kGestureLongPress: 65 case WebInputEvent::kGestureLongPress:
66 case WebInputEvent::kGestureLongTap: 66 case WebInputEvent::kGestureLongTap:
67 case WebInputEvent::kGestureTwoFingerTap: 67 case WebInputEvent::kGestureTwoFingerTap:
68 // FIXME: Shouldn't LongTap and TwoFingerTap clear the Active state? 68 // FIXME: Shouldn't LongTap and TwoFingerTap clear the Active state?
69 return hit_type | HitTestRequest::kActive | HitTestRequest::kReadOnly; 69 return hit_type | HitTestRequest::kActive | HitTestRequest::kReadOnly;
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } 426 }
427 return WebInputEventResult::kNotHandled; 427 return WebInputEventResult::kNotHandled;
428 } 428 }
429 429
430 WTF::Optional<WTF::TimeTicks> GestureManager::GetLastShowPressTimestamp() 430 WTF::Optional<WTF::TimeTicks> GestureManager::GetLastShowPressTimestamp()
431 const { 431 const {
432 return last_show_press_timestamp_; 432 return last_show_press_timestamp_;
433 } 433 }
434 434
435 } // namespace blink 435 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698