OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/paint/LayerPainter.h" | 6 #include "core/paint/LayerPainter.h" |
7 | 7 |
8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
9 #include "core/page/Page.h" | 9 #include "core/page/Page.h" |
10 #include "core/paint/CompositingRecorder.h" | 10 #include "core/paint/CompositingRecorder.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 localPaintFlags |= PaintLayerPaintingCompositingAllPhases; | 99 localPaintFlags |= PaintLayerPaintingCompositingAllPhases; |
100 paintLayerContents(context, paintingInfo, localPaintFlags); | 100 paintLayerContents(context, paintingInfo, localPaintFlags); |
101 } | 101 } |
102 | 102 |
103 class ClipPathHelper { | 103 class ClipPathHelper { |
104 public: | 104 public: |
105 ClipPathHelper(GraphicsContext* context, const RenderLayer& renderLayer, con
st LayerPaintingInfo& paintingInfo, LayoutRect& rootRelativeBounds, bool& rootRe
lativeBoundsComputed, | 105 ClipPathHelper(GraphicsContext* context, const RenderLayer& renderLayer, con
st LayerPaintingInfo& paintingInfo, LayoutRect& rootRelativeBounds, bool& rootRe
lativeBoundsComputed, |
106 const LayoutPoint& offsetFromRoot, PaintLayerFlags paintFlags) | 106 const LayoutPoint& offsetFromRoot, PaintLayerFlags paintFlags) |
107 : m_resourceClipper(0), m_clipStateSaver(*context, false), m_renderLayer
(renderLayer), m_context(context) | 107 : m_resourceClipper(0), m_clipStateSaver(*context, false), m_renderLayer
(renderLayer), m_context(context) |
108 { | 108 { |
109 RenderStyle* style = renderLayer.renderer()->style(); | 109 const RenderStyle* style = renderLayer.renderer()->style(); |
110 | 110 |
111 // Clip-path, like border radius, must not be applied to the contents of
a composited-scrolling container. | 111 // Clip-path, like border radius, must not be applied to the contents of
a composited-scrolling container. |
112 // It must, however, still be applied to the mask layer, so that the com
positor can properly mask the | 112 // It must, however, still be applied to the mask layer, so that the com
positor can properly mask the |
113 // scrolling contents and scrollbars. | 113 // scrolling contents and scrollbars. |
114 if (!renderLayer.renderer()->hasClipPath() || !style || (renderLayer.nee
dsCompositedScrolling() && !(paintFlags & PaintLayerPaintingChildClippingMaskPha
se))) | 114 if (!renderLayer.renderer()->hasClipPath() || !style || (renderLayer.nee
dsCompositedScrolling() && !(paintFlags & PaintLayerPaintingChildClippingMaskPha
se))) |
115 return; | 115 return; |
116 | 116 |
117 m_clipperState = RenderSVGResourceClipper::ClipperNotApplied; | 117 m_clipperState = RenderSVGResourceClipper::ClipperNotApplied; |
118 | 118 |
119 ASSERT(style->clipPath()); | 119 ASSERT(style->clipPath()); |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 if (!m_renderLayer.containsDirtyOverlayScrollbars()) | 723 if (!m_renderLayer.containsDirtyOverlayScrollbars()) |
724 return; | 724 return; |
725 | 725 |
726 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect),
paintBehavior, LayoutSize(), paintingRoot); | 726 LayerPaintingInfo paintingInfo(&m_renderLayer, enclosingIntRect(damageRect),
paintBehavior, LayoutSize(), paintingRoot); |
727 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 727 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
728 | 728 |
729 m_renderLayer.setContainsDirtyOverlayScrollbars(false); | 729 m_renderLayer.setContainsDirtyOverlayScrollbars(false); |
730 } | 730 } |
731 | 731 |
732 } // namespace blink | 732 } // namespace blink |
OLD | NEW |