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

Unified Diff: Source/core/layout/compositing/CompositedLayerMapping.cpp

Issue 842033003: Cleanup RemotePlatformLayer when disconnecting RemoteFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/core/frame/RemoteFrame.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/layout/compositing/CompositedLayerMapping.cpp b/Source/core/layout/compositing/CompositedLayerMapping.cpp
index ffa735753d836aeb5b97fe28c68cf638886ac499..f1d61feef51d232e67e96a6e87030d85956d4335 100644
--- a/Source/core/layout/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/layout/compositing/CompositedLayerMapping.cpp
@@ -30,6 +30,7 @@
#include "core/HTMLNames.h"
#include "core/fetch/ImageResource.h"
#include "core/frame/FrameView.h"
+#include "core/frame/RemoteFrame.h"
#include "core/html/HTMLCanvasElement.h"
#include "core/html/HTMLIFrameElement.h"
#include "core/html/HTMLMediaElement.h"
@@ -518,9 +519,11 @@ bool CompositedLayerMapping::updateGraphicsLayerConfiguration()
if (WebLayer* layer = platformLayerForPlugin(renderer)) {
m_graphicsLayer->setContentsToPlatformLayer(layer);
} else if (renderer->node() && renderer->node()->isFrameOwnerElement() && toHTMLFrameOwnerElement(renderer->node())->contentFrame()) {
- WebLayer* layer = toHTMLFrameOwnerElement(renderer->node())->contentFrame()->remotePlatformLayer();
- if (layer)
+ Frame* frame = toHTMLFrameOwnerElement(renderer->node())->contentFrame();
+ if (frame->isRemoteFrame()) {
+ WebLayer* layer = toRemoteFrame(frame)->remotePlatformLayer();
m_graphicsLayer->setContentsToPlatformLayer(layer);
+ }
} else if (renderer->isVideo()) {
HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer->node());
m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer());
« no previous file with comments | « Source/core/frame/RemoteFrame.cpp ('k') | Source/core/page/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698