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

Unified Diff: Source/WebCore/page/DOMWindow.cpp

Issue 9963061: Merge 112184 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 months 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 | « Source/WebCore/loader/NavigationScheduler.cpp ('k') | Source/WebCore/page/History.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/DOMWindow.cpp
===================================================================
--- Source/WebCore/page/DOMWindow.cpp (revision 112895)
+++ Source/WebCore/page/DOMWindow.cpp (working copy)
@@ -951,11 +951,11 @@
if (context) {
ASSERT(isMainThread());
- Frame* activeFrame = static_cast<Document*>(context)->frame();
- if (!activeFrame)
+ Document* activeDocument = static_cast<Document*>(context);
+ if (!activeDocument)
return;
- if (!activeFrame->loader()->shouldAllowNavigation(m_frame))
+ if (!activeDocument->canNavigate(m_frame))
return;
}
@@ -1674,11 +1674,11 @@
if (!isCurrentlyDisplayedInFrame())
return;
- Frame* activeFrame = activeWindow->frame();
- if (!activeFrame)
+ Document* activeDocument = activeWindow->document();
+ if (!activeDocument)
return;
- if (!activeFrame->loader()->shouldAllowNavigation(m_frame))
+ if (!activeDocument->canNavigate(m_frame))
return;
Frame* firstFrame = firstWindow->frame();
@@ -1693,8 +1693,9 @@
return;
// We want a new history item if we are processing a user gesture.
- m_frame->navigationScheduler()->scheduleLocationChange(activeFrame->document()->securityOrigin(),
- completedURL, activeFrame->loader()->outgoingReferrer(),
+ m_frame->navigationScheduler()->scheduleLocationChange(activeDocument->securityOrigin(),
+ // FIXME: What if activeDocument()->frame() is 0?
+ completedURL, activeDocument->frame()->loader()->outgoingReferrer(),
locking != LockHistoryBasedOnGestureState || !ScriptController::processingUserGesture(),
locking != LockHistoryBasedOnGestureState);
}
@@ -1801,8 +1802,8 @@
{
if (!isCurrentlyDisplayedInFrame())
return 0;
- Frame* activeFrame = activeWindow->frame();
- if (!activeFrame)
+ Document* activeDocument = activeWindow->document();
+ if (!activeDocument)
return 0;
Frame* firstFrame = firstWindow->frame();
if (!firstFrame)
@@ -1827,7 +1828,7 @@
targetFrame = m_frame;
}
if (targetFrame) {
- if (!activeFrame->loader()->shouldAllowNavigation(targetFrame))
+ if (!activeDocument->canNavigate(targetFrame))
return 0;
KURL completedURL = firstFrame->document()->completeURL(urlString);
@@ -1842,7 +1843,7 @@
// determine the outgoing referrer. We replicate that behavior here.
bool lockHistory = !ScriptController::processingUserGesture();
targetFrame->navigationScheduler()->scheduleLocationChange(
- activeFrame->document()->securityOrigin(),
+ activeDocument->securityOrigin(),
completedURL,
firstFrame->loader()->outgoingReferrer(),
lockHistory,
« no previous file with comments | « Source/WebCore/loader/NavigationScheduler.cpp ('k') | Source/WebCore/page/History.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698