| 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 15 matching lines...) Expand all Loading... |
| 26 #include "core/layout/compositing/CompositedLayerMapping.h" | 26 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 27 | 27 |
| 28 #include "core/HTMLNames.h" | 28 #include "core/HTMLNames.h" |
| 29 #include "core/dom/DOMNodeIds.h" | 29 #include "core/dom/DOMNodeIds.h" |
| 30 #include "core/fetch/ImageResource.h" | 30 #include "core/fetch/ImageResource.h" |
| 31 #include "core/frame/FrameHost.h" | 31 #include "core/frame/FrameHost.h" |
| 32 #include "core/frame/FrameView.h" | 32 #include "core/frame/FrameView.h" |
| 33 #include "core/frame/RemoteFrame.h" | 33 #include "core/frame/RemoteFrame.h" |
| 34 #include "core/frame/Settings.h" | 34 #include "core/frame/Settings.h" |
| 35 #include "core/html/HTMLCanvasElement.h" | 35 #include "core/html/HTMLCanvasElement.h" |
| 36 #include "core/html/HTMLFrameletElement.h" |
| 36 #include "core/html/HTMLIFrameElement.h" | 37 #include "core/html/HTMLIFrameElement.h" |
| 37 #include "core/html/HTMLMediaElement.h" | 38 #include "core/html/HTMLMediaElement.h" |
| 38 #include "core/html/HTMLVideoElement.h" | 39 #include "core/html/HTMLVideoElement.h" |
| 39 #include "core/html/canvas/CanvasRenderingContext.h" | 40 #include "core/html/canvas/CanvasRenderingContext.h" |
| 40 #include "core/inspector/InspectorInstrumentation.h" | 41 #include "core/inspector/InspectorInstrumentation.h" |
| 41 #include "core/layout/LayoutEmbeddedObject.h" | 42 #include "core/layout/LayoutEmbeddedObject.h" |
| 42 #include "core/layout/LayoutHTMLCanvas.h" | 43 #include "core/layout/LayoutHTMLCanvas.h" |
| 43 #include "core/layout/LayoutImage.h" | 44 #include "core/layout/LayoutImage.h" |
| 44 #include "core/layout/LayoutPart.h" | 45 #include "core/layout/LayoutPart.h" |
| 45 #include "core/layout/LayoutVideo.h" | 46 #include "core/layout/LayoutVideo.h" |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 if (layoutObject->isImage()) { | 527 if (layoutObject->isImage()) { |
| 527 if (isDirectlyCompositedImage()) { | 528 if (isDirectlyCompositedImage()) { |
| 528 updateImageContents(); | 529 updateImageContents(); |
| 529 } else if (m_graphicsLayer->hasContentsLayer()) { | 530 } else if (m_graphicsLayer->hasContentsLayer()) { |
| 530 m_graphicsLayer->setContentsToImage(nullptr); | 531 m_graphicsLayer->setContentsToImage(nullptr); |
| 531 } | 532 } |
| 532 } | 533 } |
| 533 | 534 |
| 534 if (WebLayer* layer = platformLayerForPlugin(layoutObject)) { | 535 if (WebLayer* layer = platformLayerForPlugin(layoutObject)) { |
| 535 m_graphicsLayer->setContentsToPlatformLayer(layer); | 536 m_graphicsLayer->setContentsToPlatformLayer(layer); |
| 537 } else if (layoutObject->isLayoutFramelet()) { |
| 538 HTMLFrameletElement* framelet = (HTMLFrameletElement*)layoutObject->node
(); |
| 539 m_graphicsLayer->setContentsToPlatformLayer(framelet->webLayer()); |
| 536 } else if (layoutObject->node() && layoutObject->node()->isFrameOwnerElement
() && toHTMLFrameOwnerElement(layoutObject->node())->contentFrame()) { | 540 } else if (layoutObject->node() && layoutObject->node()->isFrameOwnerElement
() && toHTMLFrameOwnerElement(layoutObject->node())->contentFrame()) { |
| 537 Frame* frame = toHTMLFrameOwnerElement(layoutObject->node())->contentFra
me(); | 541 Frame* frame = toHTMLFrameOwnerElement(layoutObject->node())->contentFra
me(); |
| 538 if (frame->isRemoteFrame()) { | 542 if (frame->isRemoteFrame()) { |
| 539 WebLayer* layer = toRemoteFrame(frame)->remotePlatformLayer(); | 543 WebLayer* layer = toRemoteFrame(frame)->remotePlatformLayer(); |
| 540 m_graphicsLayer->setContentsToPlatformLayer(layer); | 544 m_graphicsLayer->setContentsToPlatformLayer(layer); |
| 541 } | 545 } |
| 542 } else if (layoutObject->isVideo()) { | 546 } else if (layoutObject->isVideo()) { |
| 543 HTMLMediaElement* mediaElement = toHTMLMediaElement(layoutObject->node()
); | 547 HTMLMediaElement* mediaElement = toHTMLMediaElement(layoutObject->node()
); |
| 544 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer(
)); | 548 m_graphicsLayer->setContentsToPlatformLayer(mediaElement->platformLayer(
)); |
| 545 } else if (isAcceleratedCanvas(layoutObject)) { | 549 } else if (isAcceleratedCanvas(layoutObject)) { |
| (...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2582 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2586 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
| 2583 name = "Scrolling Block Selection Layer"; | 2587 name = "Scrolling Block Selection Layer"; |
| 2584 } else { | 2588 } else { |
| 2585 ASSERT_NOT_REACHED(); | 2589 ASSERT_NOT_REACHED(); |
| 2586 } | 2590 } |
| 2587 | 2591 |
| 2588 return name; | 2592 return name; |
| 2589 } | 2593 } |
| 2590 | 2594 |
| 2591 } // namespace blink | 2595 } // namespace blink |
| OLD | NEW |