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

Unified Diff: third_party/WebKit/Source/core/loader/NavigationScheduler.cpp

Issue 1444183003: Cancel javascript: URL navigations if the frame was navigated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More comments Created 5 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/core/loader/NavigationScheduler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
diff --git a/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp b/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
index 9001aff3b51cb429c9b096eb3bb1c6c6aec8081d..68e6b76b6a503a570456791f92f819cceaebe458 100644
--- a/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
+++ b/third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
@@ -56,17 +56,6 @@ namespace blink {
unsigned NavigationDisablerForBeforeUnload::s_navigationDisableCount = 0;
-FrameNavigationDisabler::FrameNavigationDisabler(LocalFrame* frame)
- : m_navigationScheduler(&frame->navigationScheduler())
-{
- m_navigationScheduler->disableFrameNavigation();
-}
-
-FrameNavigationDisabler::~FrameNavigationDisabler()
-{
- m_navigationScheduler->enableFrameNavigation();
-}
-
class ScheduledNavigation : public NoBaseWillBeGarbageCollectedFinalized<ScheduledNavigation> {
WTF_MAKE_NONCOPYABLE(ScheduledNavigation); USING_FAST_MALLOC_WILL_BE_REMOVED(ScheduledNavigation);
public:
@@ -269,7 +258,6 @@ private:
NavigationScheduler::NavigationScheduler(LocalFrame* frame)
: m_frame(frame)
, m_navigateTaskFactory(CancellableTaskFactory::create(this, &NavigationScheduler::navigateTask))
- , m_navigationDisableCount(0)
{
}
@@ -293,12 +281,12 @@ bool NavigationScheduler::isNavigationScheduled() const
inline bool NavigationScheduler::shouldScheduleReload() const
{
- return m_frame->page() && isFrameNavigationAllowed() && NavigationDisablerForBeforeUnload::isNavigationAllowed();
+ return m_frame->page() && m_frame->isNavigationAllowed() && NavigationDisablerForBeforeUnload::isNavigationAllowed();
}
inline bool NavigationScheduler::shouldScheduleNavigation(const String& url) const
{
- return m_frame->page() && isFrameNavigationAllowed() && (protocolIsJavaScript(url) || NavigationDisablerForBeforeUnload::isNavigationAllowed());
+ return m_frame->page() && m_frame->isNavigationAllowed() && (protocolIsJavaScript(url) || NavigationDisablerForBeforeUnload::isNavigationAllowed());
}
void NavigationScheduler::scheduleRedirect(double delay, const String& url)
« no previous file with comments | « third_party/WebKit/Source/core/loader/NavigationScheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698