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

Unified Diff: third_party/WebKit/Source/core/frame/Frame.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/Frame.cpp
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp
index b9b95f4a23e1dd76a6b994eecccfa175e934ea5c..1a999b09a4807bd1ab50de09eb3296013d7722fa 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -47,7 +47,6 @@
#include "core/page/FocusController.h"
#include "core/page/Page.h"
#include "platform/Histogram.h"
-#include "platform/UserGestureIndicator.h"
namespace blink {
@@ -171,7 +170,10 @@ bool Frame::canNavigate(const Frame& targetFrame) {
const unsigned allowedBit = 0x2;
unsigned framebustParams = 0;
UseCounter::count(&targetFrame, UseCounter::TopNavigationFromSubFrame);
- bool hasUserGesture = UserGestureIndicator::processingUserGesture();
+ bool hasUserGesture =
+ isLocalFrame()
+ ? toLocalFrame(this)->document()->hasReceivedUserGesture()
Rick Byers 2016/10/06 16:26:47 I've been looking over all the places that take a
+ : false;
if (hasUserGesture)
framebustParams |= userGestureBit;
if (isAllowedNavigation)

Powered by Google App Engine
This is Rietveld 408576698