| 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 18 matching lines...) Expand all Loading... |
| 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/frame/VisualViewport.h" | 35 #include "core/frame/VisualViewport.h" |
| 36 #include "core/html/HTMLCanvasElement.h" | 36 #include "core/html/HTMLCanvasElement.h" |
| 37 #include "core/html/HTMLIFrameElement.h" | 37 #include "core/html/HTMLIFrameElement.h" |
| 38 #include "core/html/HTMLMediaElement.h" | 38 #include "core/html/HTMLMediaElement.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" |
| 46 #include "core/layout/LayoutView.h" | 47 #include "core/layout/LayoutView.h" |
| 47 #include "core/layout/compositing/PaintLayerCompositor.h" | 48 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 48 #include "core/page/ChromeClient.h" | 49 #include "core/page/ChromeClient.h" |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 | 793 |
| 793 FloatSize oldSize = m_graphicsLayer->size(); | 794 FloatSize oldSize = m_graphicsLayer->size(); |
| 794 const FloatSize contentsSize(relativeCompositingBounds.size()); | 795 const FloatSize contentsSize(relativeCompositingBounds.size()); |
| 795 if (oldSize != contentsSize) | 796 if (oldSize != contentsSize) |
| 796 m_graphicsLayer->setSize(contentsSize); | 797 m_graphicsLayer->setSize(contentsSize); |
| 797 | 798 |
| 798 // m_graphicsLayer is the corresponding GraphicsLayer for this PaintLayer an
d its non-compositing | 799 // m_graphicsLayer is the corresponding GraphicsLayer for this PaintLayer an
d its non-compositing |
| 799 // descendants. So, the visibility flag for m_graphicsLayer should be true i
f there are any | 800 // descendants. So, the visibility flag for m_graphicsLayer should be true i
f there are any |
| 800 // non-compositing visible layers. | 801 // non-compositing visible layers. |
| 801 bool contentsVisible = m_owningLayer.hasVisibleContent() || hasVisibleNonCom
positingDescendant(&m_owningLayer); | 802 bool contentsVisible = m_owningLayer.hasVisibleContent() || hasVisibleNonCom
positingDescendant(&m_owningLayer); |
| 802 | 803 if (layoutObject()->isVideo()) { |
| 804 HTMLVideoElement* videoElement = toHTMLVideoElement(layoutObject()->node
()); |
| 805 if (videoElement->isFullscreen() && videoElement->overlayFullscreenVideo
Mode() == WebMediaPlayer::OverlayFullscreenVideoMode::VideoLayerInvisible) |
| 806 contentsVisible = false; |
| 807 } |
| 803 m_graphicsLayer->setContentsVisible(contentsVisible); | 808 m_graphicsLayer->setContentsVisible(contentsVisible); |
| 804 | 809 |
| 805 m_graphicsLayer->setBackfaceVisibility(layoutObject()->style()->backfaceVisi
bility() == BackfaceVisibilityVisible); | 810 m_graphicsLayer->setBackfaceVisibility(layoutObject()->style()->backfaceVisi
bility() == BackfaceVisibilityVisible); |
| 806 } | 811 } |
| 807 | 812 |
| 808 void CompositedLayerMapping::computeGraphicsLayerParentLocation(const PaintLayer
* compositingContainer, const IntRect& ancestorCompositingBounds, IntPoint& grap
hicsLayerParentLocation) | 813 void CompositedLayerMapping::computeGraphicsLayerParentLocation(const PaintLayer
* compositingContainer, const IntRect& ancestorCompositingBounds, IntPoint& grap
hicsLayerParentLocation) |
| 809 { | 814 { |
| 810 if (compositingContainer && compositingContainer->compositedLayerMapping()->
hasClippingLayer()) { | 815 if (compositingContainer && compositingContainer->compositedLayerMapping()->
hasClippingLayer()) { |
| 811 // If the compositing ancestor has a layer to clip children, we parent i
n that, and therefore | 816 // If the compositing ancestor has a layer to clip children, we parent i
n that, and therefore |
| 812 // position relative to it. | 817 // position relative to it. |
| (...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2641 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2646 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2642 name = "Scrolling Contents Layer"; | 2647 name = "Scrolling Contents Layer"; |
| 2643 } else { | 2648 } else { |
| 2644 ASSERT_NOT_REACHED(); | 2649 ASSERT_NOT_REACHED(); |
| 2645 } | 2650 } |
| 2646 | 2651 |
| 2647 return name; | 2652 return name; |
| 2648 } | 2653 } |
| 2649 | 2654 |
| 2650 } // namespace blink | 2655 } // namespace blink |
| OLD | NEW |