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

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

Issue 799923006: Make canNavigate() OOPI-friendly (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 663597270001c1870c0985e9ec595b9c1a5849cf..0f82f12150080fb0eecf20a503508345e05bb9df 100644
--- a/Source/core/frame/Location.cpp
+++ b/Source/core/frame/Location.cpp
@@ -248,12 +248,12 @@ void Location::reload(LocalDOMWindow* callingWindow)
void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, LocalDOMWindow* enteredWindow)
{
ASSERT(m_frame);
- LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, callingWindow->document());
- if (!frame)
+ Frame* frame = m_frame->findFrameForNavigation(nullAtom, *callingWindow->frame());
+ if (!frame || !frame->isLocalFrame())
return;
// FIXME: setLocation() probably belongs on DOMWindow, since you can trigger
// navigations across different origins.
- frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow);
+ toLocalFrame(frame)->localDOMWindow()->setLocation(url, callingWindow, enteredWindow);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698