Index: Source/WebCore/page/DOMWindow.cpp |
=================================================================== |
--- Source/WebCore/page/DOMWindow.cpp (revision 91684) |
+++ Source/WebCore/page/DOMWindow.cpp (working copy) |
@@ -1671,7 +1671,7 @@ |
if (completedURL.isNull()) |
return; |
- if (isInsecureScriptAccess(activeWindow, urlString)) |
+ if (isInsecureScriptAccess(activeWindow, completedURL)) |
return; |
// We want a new history item if we are processing a user gesture. |
@@ -1756,7 +1756,7 @@ |
newFrame->loader()->setOpener(openerFrame); |
newFrame->page()->setOpenedByDOM(); |
- if (newFrame->domWindow()->isInsecureScriptAccess(activeWindow, urlString)) |
+ if (newFrame->domWindow()->isInsecureScriptAccess(activeWindow, completedURL)) |
return newFrame; |
if (function) |
@@ -1806,7 +1806,9 @@ |
if (!activeFrame->loader()->shouldAllowNavigation(targetFrame)) |
return 0; |
- if (targetFrame->domWindow()->isInsecureScriptAccess(activeWindow, urlString)) |
+ KURL completedURL = firstFrame->document()->completeURL(urlString); |
+ |
+ if (targetFrame->domWindow()->isInsecureScriptAccess(activeWindow, completedURL)) |
return targetFrame->domWindow(); |
if (urlString.isEmpty()) |
@@ -1815,7 +1817,7 @@ |
// For whatever reason, Firefox uses the first window rather than the active window to |
// determine the outgoing referrer. We replicate that behavior here. |
targetFrame->navigationScheduler()->scheduleLocationChange(activeFrame->document()->securityOrigin(), |
- firstFrame->document()->completeURL(urlString).string(), |
+ completedURL, |
firstFrame->loader()->outgoingReferrer(), |
!activeFrame->script()->anyPageIsProcessingUserGesture(), false); |