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

Side by Side Diff: Source/core/rendering/CompositedLayerMapping.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: Added missing null check 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 unified diff | Download patch
« no previous file with comments | « Source/core/frame/Frame.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 497 }
498 498
499 updateBackgroundColor(isSimpleContainerCompositingLayer()); 499 updateBackgroundColor(isSimpleContainerCompositingLayer());
500 500
501 if (isDirectlyCompositedImage()) 501 if (isDirectlyCompositedImage())
502 updateImageContents(); 502 updateImageContents();
503 503
504 if (renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->allows AcceleratedCompositing()) { 504 if (renderer->isEmbeddedObject() && toRenderEmbeddedObject(renderer)->allows AcceleratedCompositing()) {
505 PluginView* pluginView = toPluginView(toRenderWidget(renderer)->widget() ); 505 PluginView* pluginView = toPluginView(toRenderWidget(renderer)->widget() );
506 m_graphicsLayer->setContentsToPlatformLayer(pluginView->platformLayer()) ; 506 m_graphicsLayer->setContentsToPlatformLayer(pluginView->platformLayer()) ;
507 } else if (renderer->node() && renderer->node()->isFrameOwnerElement() && to HTMLFrameOwnerElement(renderer->node())->contentFrame()) {
508 blink::WebLayer* layer = toHTMLFrameOwnerElement(renderer->node())->cont entFrame()->remotePlatformLayer();
509 if (layer)
510 m_graphicsLayer->setContentsToPlatformLayer(layer);
507 } else if (renderer->isVideo()) { 511 } else if (renderer->isVideo()) {
508 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer->node()); 512 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer->node());
509 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer( )); 513 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer( ));
510 } else if (isAcceleratedCanvas(renderer)) { 514 } else if (isAcceleratedCanvas(renderer)) {
511 HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); 515 HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node());
512 if (CanvasRenderingContext* context = canvas->renderingContext()) 516 if (CanvasRenderingContext* context = canvas->renderingContext())
513 m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer() ); 517 m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer() );
514 layerConfigChanged = true; 518 layerConfigChanged = true;
515 } 519 }
516 if (renderer->isRenderPart()) 520 if (renderer->isRenderPart())
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { 2052 } else if (graphicsLayer == m_scrollingContentsLayer.get()) {
2049 name = "Scrolling Contents Layer"; 2053 name = "Scrolling Contents Layer";
2050 } else { 2054 } else {
2051 ASSERT_NOT_REACHED(); 2055 ASSERT_NOT_REACHED();
2052 } 2056 }
2053 2057
2054 return name; 2058 return name;
2055 } 2059 }
2056 2060
2057 } // namespace WebCore 2061 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/frame/Frame.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698