Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp |
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
index 36b71712621945b2dd1d631db89dcb742d92e0be..de32ac74b86cda3a1a74af230d251067c10c41c3 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
@@ -923,6 +923,18 @@ FrameNavigationDisabler::~FrameNavigationDisabler() { |
m_frame->enableNavigation(); |
} |
+bool LocalFrame::isNavigationAllowed() const { |
+ for (const Frame* currentFrame = this; currentFrame; |
+ currentFrame = currentFrame->tree().parent()) { |
+ if (currentFrame->isLocalFrame() && |
dcheng
2017/01/04 23:12:02
I'd rather keep this non-recursive: I don't like h
lfg
2017/01/09 19:04:12
Done.
|
+ toLocalFrame(currentFrame)->m_navigationDisableCount > 0) { |
+ return false; |
+ } |
+ } |
+ |
+ return true; |
+} |
+ |
ScopedFrameBlamer::ScopedFrameBlamer(LocalFrame* frame) : m_frame(frame) { |
if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
m_frame->client()->frameBlameContext()->Enter(); |