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

Unified Diff: Source/web/WebRemoteFrameImpl.cpp

Issue 348833005: [DO NOT COMMIT] Random hacks to unblock work on replication. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More random hacks, including also dcheng's https://codereview.chromium.org/346403002 Created 6 years, 6 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/web/WebRemoteFrameImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebRemoteFrameImpl.cpp
diff --git a/Source/web/WebRemoteFrameImpl.cpp b/Source/web/WebRemoteFrameImpl.cpp
index cf1a3a37e5b05df9d32fdc9f15e32dcc4e7b462e..7d5d298800d802c12d002babdfbc7d2c67d4172d 100644
--- a/Source/web/WebRemoteFrameImpl.cpp
+++ b/Source/web/WebRemoteFrameImpl.cpp
@@ -7,8 +7,11 @@
#include "core/frame/FrameOwner.h"
#include "core/frame/RemoteFrame.h"
+#include "core/html/HTMLFrameOwnerElement.h"
#include "core/page/Page.h"
+#include "core/rendering/RenderLayer.h"
#include "public/platform/WebFloatRect.h"
+#include "public/platform/WebLayer.h"
#include "public/platform/WebRect.h"
#include "public/web/WebDocument.h"
#include "public/web/WebPerformance.h"
@@ -158,12 +161,25 @@ WebVector<WebIconURL> WebRemoteFrameImpl::iconURLs(int iconTypesMask) const
void WebRemoteFrameImpl::setIsRemote(bool)
{
+
ASSERT_NOT_REACHED();
}
-void WebRemoteFrameImpl::setRemoteWebLayer(WebLayer*)
+void WebRemoteFrameImpl::setRemoteWebLayer(WebLayer* webLayer)
{
- ASSERT_NOT_REACHED();
+ if (!frame())
+ return;
+
+ if (frame()->remotePlatformLayer())
+ GraphicsLayer::unregisterContentsLayer(frame()->remotePlatformLayer());
+ if (webLayer)
+ GraphicsLayer::registerContentsLayer(webLayer);
+ frame()->setRemotePlatformLayer(webLayer);
+
+ // FIXME: This should be moved to WebRemoteFrame.
+ frame()->deprecatedLocalOwner()->setNeedsCompositingUpdate();
+ if (RenderPart* renderer = frame()->ownerRenderer())
+ renderer->layer()->updateSelfPaintingLayer();
}
void WebRemoteFrameImpl::setPermissionClient(WebPermissionClient*)
@@ -248,7 +264,7 @@ void WebRemoteFrameImpl::removeChild(WebFrame* frame)
WebDocument WebRemoteFrameImpl::document() const
{
- ASSERT_NOT_REACHED();
+ //ASSERT_NOT_REACHED();
return WebDocument();
}
@@ -507,12 +523,12 @@ bool WebRemoteFrameImpl::isCommandEnabled(const WebString&) const
void WebRemoteFrameImpl::enableContinuousSpellChecking(bool)
{
- ASSERT_NOT_REACHED();
+ //ASSERT_NOT_REACHED();
}
bool WebRemoteFrameImpl::isContinuousSpellCheckingEnabled() const
{
- ASSERT_NOT_REACHED();
+ //ASSERT_NOT_REACHED();
return false;
}
@@ -793,16 +809,17 @@ WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebFr
// result in the browser observing two navigations to about:blank (one from the initial
// frame creation, and one from swapping it into the remote process). FrameLoader might
// need a special initialization function for this case to avoid that duplicate navigation.
- child->initializeAsChildFrame(frame()->host(), result.storedValue->value.get(), name, AtomicString());
+ child->initializeWebCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom);
// Partially related with the above FIXME--the init() call may trigger JS dispatch. However,
// if the parent is remote, it should never be detached synchronously...
ASSERT(child->frame());
return child;
}
-void WebRemoteFrameImpl::initializeAsMainFrame(Page* page)
+void WebRemoteFrameImpl::initializeWebCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name)
{
- setWebCoreFrame(RemoteFrame::create(&m_frameClient, &page->frameHost(), 0));
+ setWebCoreFrame(RemoteFrame::create(&m_frameClient, host, owner));
+ m_frame->tree().setName(name, nullAtom);
}
WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(const WebString& name, WebFrameClient* client)
@@ -811,9 +828,7 @@ WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(const WebString& name, Web
HashMap<WebFrame*, OwnPtr<FrameOwner> >::AddResult result =
m_ownersForChildren.add(child, adoptPtr(new PlaceholderFrameOwner));
appendChild(child);
- RefPtr<RemoteFrame> childFrame = RemoteFrame::create(&child->m_frameClient, frame()->host(), result.storedValue->value.get());
- child->setWebCoreFrame(childFrame);
- childFrame->tree().setName(name, AtomicString());
+ child->initializeWebCoreFrame(frame()->host(), result.storedValue->value.get(), name);
return child;
}
« no previous file with comments | « Source/web/WebRemoteFrameImpl.h ('k') | Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698