OLD | NEW |
---|---|
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 Loading... | |
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->isRenderIFrame() || renderer->isFrame()) && toHTMLFram eOwnerElement(renderer->node())->contentFrame() && toHTMLFrameOwnerElement(rende rer->node())->contentFrame()->platformLayer()) { | |
eseidel
2013/12/11 18:50:01
Don't we have a frame base class for these both?
kenrb
2013/12/11 22:44:56
The base class (RenderFrameBase) was removed a few
| |
508 m_graphicsLayer->setContentsToPlatformLayer(toHTMLFrameOwnerElement(rend erer->node())->contentFrame()->platformLayer()); | |
eseidel
2013/12/11 18:50:01
You just if-checked this long lookup, maybe you wa
kenrb
2013/12/11 22:44:56
Done.
| |
507 } else if (renderer->isVideo()) { | 509 } else if (renderer->isVideo()) { |
508 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer->node()); | 510 HTMLMediaElement* mediaElement = toHTMLMediaElement(renderer->node()); |
509 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer( )); | 511 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer( )); |
510 } else if (isAcceleratedCanvas(renderer)) { | 512 } else if (isAcceleratedCanvas(renderer)) { |
511 HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); | 513 HTMLCanvasElement* canvas = toHTMLCanvasElement(renderer->node()); |
512 if (CanvasRenderingContext* context = canvas->renderingContext()) | 514 if (CanvasRenderingContext* context = canvas->renderingContext()) |
513 m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer() ); | 515 m_graphicsLayer->setContentsToPlatformLayer(context->platformLayer() ); |
514 layerConfigChanged = true; | 516 layerConfigChanged = true; |
515 } | 517 } |
516 if (renderer->isRenderPart()) | 518 if (renderer->isRenderPart()) |
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2048 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2050 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
2049 name = "Scrolling Contents Layer"; | 2051 name = "Scrolling Contents Layer"; |
2050 } else { | 2052 } else { |
2051 ASSERT_NOT_REACHED(); | 2053 ASSERT_NOT_REACHED(); |
2052 } | 2054 } |
2053 | 2055 |
2054 return name; | 2056 return name; |
2055 } | 2057 } |
2056 | 2058 |
2057 } // namespace WebCore | 2059 } // namespace WebCore |
OLD | NEW |