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

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

Issue 2392773002: Reenable framebusting deprecation, change it to allow navigation if iframe has ever had a user gestu (Closed)
Patch Set: TODOs and TouchEventmanager 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/TouchEventManager.h" 5 #include "core/input/TouchEventManager.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/events/TouchEvent.h" 8 #include "core/events/TouchEvent.h"
9 #include "core/frame/Deprecation.h" 9 #include "core/frame/Deprecation.h"
10 #include "core/frame/EventHandlerRegistry.h" 10 #include "core/frame/EventHandlerRegistry.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 callback = this; 533 callback = this;
534 } 534 }
535 if (m_touchSequenceUserGestureToken) 535 if (m_touchSequenceUserGestureToken)
536 gestureIndicator = wrapUnique(new UserGestureIndicator( 536 gestureIndicator = wrapUnique(new UserGestureIndicator(
537 m_touchSequenceUserGestureToken.release(), callback)); 537 m_touchSequenceUserGestureToken.release(), callback));
538 else 538 else
539 gestureIndicator = wrapUnique( 539 gestureIndicator = wrapUnique(
540 new UserGestureIndicator(DefinitelyProcessingUserGesture, callback)); 540 new UserGestureIndicator(DefinitelyProcessingUserGesture, callback));
541 m_touchSequenceUserGestureToken = UserGestureIndicator::currentToken(); 541 m_touchSequenceUserGestureToken = UserGestureIndicator::currentToken();
542 } 542 }
543 // TODO(japhet): UserGestureIndicator should setHasReceivedUserGesture()
544 // on the Document.
545 if (UserGestureIndicator::processingUserGesture())
546 m_frame->document()->setHasReceivedUserGesture();
Rick Byers 2016/10/06 16:26:47 I believe this is the wrong document. Here m_fram
543 547
544 return dispatchTouchEvents(event, touchInfos, allTouchesReleased); 548 return dispatchTouchEvents(event, touchInfos, allTouchesReleased);
545 } 549 }
546 550
547 bool TouchEventManager::isAnyTouchActive() const { 551 bool TouchEventManager::isAnyTouchActive() const {
548 return m_touchPressed; 552 return m_touchPressed;
549 } 553 }
550 554
551 void TouchEventManager::userGestureUtilized() { 555 void TouchEventManager::userGestureUtilized() {
552 // This is invoked for UserGestureIndicators created in 556 // This is invoked for UserGestureIndicators created in
(...skipping 13 matching lines...) Expand all
566 feature = UseCounter::TouchEndDuringScrollUserGestureUtilized; 570 feature = UseCounter::TouchEndDuringScrollUserGestureUtilized;
567 break; 571 break;
568 default: 572 default:
569 NOTREACHED(); 573 NOTREACHED();
570 return; 574 return;
571 } 575 }
572 Deprecation::countDeprecation(m_frame, feature); 576 Deprecation::countDeprecation(m_frame, feature);
573 } 577 }
574 578
575 } // namespace blink 579 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698