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

Unified Diff: Source/web/WebFrameImpl.cpp

Issue 104433003: Attach a WebLayer to a frame element for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved WebLayer back to Frame again. Created 7 years 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/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index 23dfa4720749c85b546f9aea1b7b5a338b3e01de..7400be452064b312fa886f5c5695c520b598894f 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -188,6 +188,7 @@
#include "public/platform/WebFileSystem.h"
#include "public/platform/WebFloatPoint.h"
#include "public/platform/WebFloatRect.h"
+#include "public/platform/WebLayer.h"
#include "public/platform/WebPoint.h"
#include "public/platform/WebRect.h"
#include "public/platform/WebSize.h"
@@ -555,6 +556,18 @@ WebVector<WebIconURL> WebFrameImpl::iconURLs(int iconTypesMask) const
return WebVector<WebIconURL>();
}
+void WebFrameImpl::setWebLayer(WebLayer* webLayer)
+{
+ if (frame()) {
eseidel 2013/12/11 18:50:01 early return is generally preferred: if (!frame())
kenrb 2013/12/11 22:44:56 Done.
+ if (frame()->platformLayer())
+ GraphicsLayer::unregisterContentsLayer(frame()->platformLayer());
+ if (webLayer)
+ GraphicsLayer::registerContentsLayer(webLayer);
+ frame()->setPlatformLayer(webLayer);
+ frame()->ownerElement()->setNeedsStyleRecalc(WebCore::SubtreeStyleChange, WebCore::StyleChangeFromRenderer);
eseidel 2013/12/11 18:50:01 I don't think you want to be scheduling your own s
kenrb 2013/12/11 22:44:56 The goal is to trigger a layout so that the new la
+ }
+}
+
WebSize WebFrameImpl::scrollOffset() const
{
FrameView* view = frameView();

Powered by Google App Engine
This is Rietveld 408576698