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

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

Issue 2392773002: Reenable framebusting deprecation, change it to allow navigation if iframe has ever had a user gestu (Closed)
Patch Set: Fix faliing content_browsertest Created 4 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 // 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/editing/SelectionController.h" 8 #include "core/editing/SelectionController.h"
9 #include "core/events/GestureEvent.h" 9 #include "core/events/GestureEvent.h"
10 #include "core/frame/FrameHost.h" 10 #include "core/frame/FrameHost.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return hitType | HitTestRequest::Active | HitTestRequest::ReadOnly; 64 return hitType | HitTestRequest::Active | HitTestRequest::ReadOnly;
65 default: 65 default:
66 NOTREACHED(); 66 NOTREACHED();
67 return hitType | HitTestRequest::Active | HitTestRequest::ReadOnly; 67 return hitType | HitTestRequest::Active | HitTestRequest::ReadOnly;
68 } 68 }
69 } 69 }
70 70
71 WebInputEventResult GestureManager::handleGestureEventInFrame( 71 WebInputEventResult GestureManager::handleGestureEventInFrame(
72 const GestureEventWithHitTestResults& targetedEvent) { 72 const GestureEventWithHitTestResults& targetedEvent) {
73 DCHECK(!targetedEvent.event().isScrollEvent()); 73 DCHECK(!targetedEvent.event().isScrollEvent());
74 m_frame->document()->setHasReceivedUserGesture();
74 75
75 Node* eventTarget = targetedEvent.hitTestResult().innerNode(); 76 Node* eventTarget = targetedEvent.hitTestResult().innerNode();
76 const PlatformGestureEvent& gestureEvent = targetedEvent.event(); 77 const PlatformGestureEvent& gestureEvent = targetedEvent.event();
77 78
78 if (m_scrollManager->canHandleGestureEvent(targetedEvent)) 79 if (m_scrollManager->canHandleGestureEvent(targetedEvent))
79 return WebInputEventResult::HandledSuppressed; 80 return WebInputEventResult::HandledSuppressed;
80 81
81 if (eventTarget) { 82 if (eventTarget) {
82 GestureEvent* gestureDomEvent = 83 GestureEvent* gestureDomEvent =
83 GestureEvent::create(eventTarget->document().domWindow(), gestureEvent); 84 GestureEvent::create(eventTarget->document().domWindow(), gestureEvent);
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 return nullptr; 408 return nullptr;
408 409
409 return &m_frame->page()->frameHost(); 410 return &m_frame->page()->frameHost();
410 } 411 }
411 412
412 double GestureManager::getLastShowPressTimestamp() const { 413 double GestureManager::getLastShowPressTimestamp() const {
413 return m_lastShowPressTimestamp; 414 return m_lastShowPressTimestamp;
414 } 415 }
415 416
416 } // namespace blink 417 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698