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

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: Rebase 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 299e4b1da6900db3fc45ed4a10c1fe5a68ce3846..aa7ce85b880f4ad16e4293355fa7a168b22f5cb3 100644
--- a/third_party/WebKit/Source/core/frame/Frame.cpp
+++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -48,7 +48,6 @@
#include "core/page/Page.h"
#include "platform/Histogram.h"
#include "platform/InstanceCounters.h"
-#include "platform/UserGestureIndicator.h"
namespace blink {
@@ -173,7 +172,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()
+ : false;
if (hasUserGesture)
framebustParams |= userGestureBit;
if (isAllowedNavigation)

Powered by Google App Engine
This is Rietveld 408576698