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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 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: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index bdb9f83799b35ebb9e31f8519a1466cb35af12bf..20273bfbf15fc226b8d479c6c9710f0f4f5f4edc 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -680,16 +680,6 @@ WebView* WebLocalFrameImpl::view() const
return viewImpl();
}
-void WebLocalFrameImpl::setOpener(WebFrame* opener)
-{
- WebFrame::setOpener(opener);
-
- // TODO(alexmos,dcheng): This should ASSERT(m_frame) once we no longer have
- // provisional local frames.
- if (m_frame && m_frame->document())
- m_frame->document()->initSecurityContext();
-}
-
WebDocument WebLocalFrameImpl::document() const
{
if (!frame() || !frame()->document())
@@ -1419,9 +1409,9 @@ WebString WebLocalFrameImpl::layerTreeAsText(bool showDebugInfo) const
// WebLocalFrameImpl public ---------------------------------------------------------
-WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* client)
+WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* client, WebFrame* opener)
{
- return WebLocalFrameImpl::create(scope, client);
+ return WebLocalFrameImpl::create(scope, client, opener);
}
WebLocalFrame* WebLocalFrame::createProvisional(WebFrameClient* client, WebRemoteFrame* oldWebFrame, WebSandboxFlags flags, const WebFrameOwnerProperties& frameOwnerProperties)
@@ -1429,9 +1419,10 @@ WebLocalFrame* WebLocalFrame::createProvisional(WebFrameClient* client, WebRemot
return WebLocalFrameImpl::createProvisional(client, oldWebFrame, flags, frameOwnerProperties);
}
-WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameClient* client)
+WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameClient* client, WebFrame* opener)
{
WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client);
+ frame->setOpener(opener);
#if ENABLE(OILPAN)
return frame;
#else

Powered by Google App Engine
This is Rietveld 408576698