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) |