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(); |