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

Unified Diff: Source/core/frame/Location.cpp

Issue 683013002: Extract a DOMWindow interface from LocalDOMWindow and use it in the idl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: whee Created 6 years, 2 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
Index: Source/core/frame/Location.cpp
diff --git a/Source/core/frame/Location.cpp b/Source/core/frame/Location.cpp
index 023edca250dada2eaa939ddaa91d73aa7c5ec5bf..6c9a666cbe742a373642f5c63a43ff5959a8bcaf 100644
--- a/Source/core/frame/Location.cpp
+++ b/Source/core/frame/Location.cpp
@@ -234,7 +234,9 @@ void Location::replace(LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWin
if (!m_frame)
return;
// Note: We call LocalDOMWindow::setLocation directly here because replace() always operates on the current frame.
- m_frame->domWindow()->setLocation(url, callingWindow, enteredWindow, LockHistoryAndBackForwardList);
+ // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger
+ // navigations across different origins.
+ m_frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow, LockHistoryAndBackForwardList);
}
void Location::reload(LocalDOMWindow* callingWindow)
@@ -249,10 +251,13 @@ void Location::reload(LocalDOMWindow* callingWindow)
void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow)
{
ASSERT(m_frame);
+ // FIXME: This is probably wrong.
dcheng 2014/10/31 03:20:41 I'm going to remove this FIXME in my next patchset
LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, callingWindow->document());
if (!frame)
return;
- frame->domWindow()->setLocation(url, callingWindow, enteredWindow);
+ // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger
+ // navigations across different origins.
+ frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698