Chromium Code Reviews| 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 562818bc489268d2705db002be931d20c22c1dc0..f7d246439af17f05749b83727ab1323720a1fbc8 100644 |
| --- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
| +++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
| @@ -922,6 +922,15 @@ FrameNavigationDisabler::~FrameNavigationDisabler() { |
| m_frame->enableNavigation(); |
| } |
| +bool LocalFrame::isNavigationAllowed() const { |
| + for (const Frame* cur = this; cur; cur = cur->tree().parent()) { |
|
dcheng
2016/12/08 23:16:53
Nit: no abbreviations in naming
lfg
2016/12/12 23:12:40
Done.
|
| + 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(); |