Chromium Code Reviews| 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 24 matching lines...) Expand all Loading... | |
| 35 #include "core/html/HTMLCanvasElement.h" | 35 #include "core/html/HTMLCanvasElement.h" |
| 36 #include "core/html/HTMLIFrameElement.h" | 36 #include "core/html/HTMLIFrameElement.h" |
| 37 #include "core/html/HTMLMediaElement.h" | 37 #include "core/html/HTMLMediaElement.h" |
| 38 #include "core/html/HTMLVideoElement.h" | 38 #include "core/html/HTMLVideoElement.h" |
| 39 #include "core/html/canvas/CanvasRenderingContext.h" | 39 #include "core/html/canvas/CanvasRenderingContext.h" |
| 40 #include "core/inspector/InspectorInstrumentation.h" | 40 #include "core/inspector/InspectorInstrumentation.h" |
| 41 #include "core/layout/LayoutEmbeddedObject.h" | 41 #include "core/layout/LayoutEmbeddedObject.h" |
| 42 #include "core/layout/LayoutHTMLCanvas.h" | 42 #include "core/layout/LayoutHTMLCanvas.h" |
| 43 #include "core/layout/LayoutImage.h" | 43 #include "core/layout/LayoutImage.h" |
| 44 #include "core/layout/LayoutPart.h" | 44 #include "core/layout/LayoutPart.h" |
| 45 #include "core/layout/LayoutVideo.h" | 45 #include "core/layout/LayoutVideo.h" |
|
watk
2016/04/21 00:38:30
TODO remove this and HTMLME if possible
| |
| 46 #include "core/layout/LayoutView.h" | 46 #include "core/layout/LayoutView.h" |
| 47 #include "core/layout/compositing/PaintLayerCompositor.h" | 47 #include "core/layout/compositing/PaintLayerCompositor.h" |
| 48 #include "core/page/ChromeClient.h" | 48 #include "core/page/ChromeClient.h" |
| 49 #include "core/page/Page.h" | 49 #include "core/page/Page.h" |
| 50 #include "core/page/scrolling/ScrollingCoordinator.h" | 50 #include "core/page/scrolling/ScrollingCoordinator.h" |
| 51 #include "core/paint/PaintInfo.h" | 51 #include "core/paint/PaintInfo.h" |
| 52 #include "core/paint/PaintLayerPainter.h" | 52 #include "core/paint/PaintLayerPainter.h" |
| 53 #include "core/paint/PaintLayerStackingNodeIterator.h" | 53 #include "core/paint/PaintLayerStackingNodeIterator.h" |
| 54 #include "core/paint/PaintTiming.h" | 54 #include "core/paint/PaintTiming.h" |
| 55 #include "core/paint/ScrollableAreaPainter.h" | 55 #include "core/paint/ScrollableAreaPainter.h" |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 759 | 759 |
| 760 FloatSize oldSize = m_graphicsLayer->size(); | 760 FloatSize oldSize = m_graphicsLayer->size(); |
| 761 const FloatSize contentsSize(relativeCompositingBounds.size()); | 761 const FloatSize contentsSize(relativeCompositingBounds.size()); |
| 762 if (oldSize != contentsSize) | 762 if (oldSize != contentsSize) |
| 763 m_graphicsLayer->setSize(contentsSize); | 763 m_graphicsLayer->setSize(contentsSize); |
| 764 | 764 |
| 765 // m_graphicsLayer is the corresponding GraphicsLayer for this PaintLayer an d its non-compositing | 765 // m_graphicsLayer is the corresponding GraphicsLayer for this PaintLayer an d its non-compositing |
| 766 // descendants. So, the visibility flag for m_graphicsLayer should be true i f there are any | 766 // descendants. So, the visibility flag for m_graphicsLayer should be true i f there are any |
| 767 // non-compositing visible layers. | 767 // non-compositing visible layers. |
| 768 bool contentsVisible = m_owningLayer.hasVisibleContent() || hasVisibleNonCom positingDescendant(&m_owningLayer); | 768 bool contentsVisible = m_owningLayer.hasVisibleContent() || hasVisibleNonCom positingDescendant(&m_owningLayer); |
| 769 if (layoutObject()->isVideo()) { | 769 |
| 770 HTMLVideoElement* videoElement = toHTMLVideoElement(layoutObject()->node ()); | |
| 771 if (videoElement->isFullscreen() && videoElement->usesOverlayFullscreenV ideo()) | |
| 772 contentsVisible = false; | |
| 773 } | |
| 774 m_graphicsLayer->setContentsVisible(contentsVisible); | 770 m_graphicsLayer->setContentsVisible(contentsVisible); |
| 775 | 771 |
| 776 m_graphicsLayer->setBackfaceVisibility(layoutObject()->style()->backfaceVisi bility() == BackfaceVisibilityVisible); | 772 m_graphicsLayer->setBackfaceVisibility(layoutObject()->style()->backfaceVisi bility() == BackfaceVisibilityVisible); |
| 777 } | 773 } |
| 778 | 774 |
| 779 void CompositedLayerMapping::computeGraphicsLayerParentLocation(const PaintLayer * compositingContainer, const IntRect& ancestorCompositingBounds, IntPoint& grap hicsLayerParentLocation) | 775 void CompositedLayerMapping::computeGraphicsLayerParentLocation(const PaintLayer * compositingContainer, const IntRect& ancestorCompositingBounds, IntPoint& grap hicsLayerParentLocation) |
| 780 { | 776 { |
| 781 if (compositingContainer && compositingContainer->compositedLayerMapping()-> hasClippingLayer()) { | 777 if (compositingContainer && compositingContainer->compositedLayerMapping()-> hasClippingLayer()) { |
| 782 // If the compositing ancestor has a layer to clip children, we parent i n that, and therefore | 778 // If the compositing ancestor has a layer to clip children, we parent i n that, and therefore |
| 783 // position relative to it. | 779 // position relative to it. |
| (...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2573 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { | 2569 } else if (graphicsLayer == m_scrollingContentsLayer.get()) { |
| 2574 name = "Scrolling Contents Layer"; | 2570 name = "Scrolling Contents Layer"; |
| 2575 } else { | 2571 } else { |
| 2576 ASSERT_NOT_REACHED(); | 2572 ASSERT_NOT_REACHED(); |
| 2577 } | 2573 } |
| 2578 | 2574 |
| 2579 return name; | 2575 return name; |
| 2580 } | 2576 } |
| 2581 | 2577 |
| 2582 } // namespace blink | 2578 } // namespace blink |
| OLD | NEW |