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 06675fc43a650521f920fa59bd12e8b2fd423db5..6b913d81beb6edf4acfd4d3af602ae155d29369c 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
@@ -915,6 +915,15 @@ FrameNavigationDisabler::~FrameNavigationDisabler() { |
m_frame->enableNavigation(); |
} |
+bool LocalFrame::isNavigationAllowed() const { |
+ for (const Frame* cur = this; cur; cur = cur->tree().parent()) { |
+ if (cur->isLocalFrame() && toLocalFrame(cur)->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(); |