| 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/DeprecatedPaintLayerPainter.h" | 6 #include "core/paint/DeprecatedPaintLayerPainter.h" |
| 7 | 7 |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/layout/ClipPathOperation.h" | 9 #include "core/layout/ClipPathOperation.h" |
| 10 #include "core/layout/FilterEffectRenderer.h" | 10 #include "core/layout/FilterEffectRenderer.h" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 localPaintFlags |= PaintLayerPaintingCompositingAllPhases; | 104 localPaintFlags |= PaintLayerPaintingCompositingAllPhases; |
| 105 paintLayerContents(context, paintingInfo, localPaintFlags, fragmentPolicy); | 105 paintLayerContents(context, paintingInfo, localPaintFlags, fragmentPolicy); |
| 106 } | 106 } |
| 107 | 107 |
| 108 class ClipPathHelper { | 108 class ClipPathHelper { |
| 109 public: | 109 public: |
| 110 ClipPathHelper(GraphicsContext* context, const DeprecatedPaintLayer& renderL
ayer, const DeprecatedPaintLayerPaintingInfo& paintingInfo, LayoutRect& rootRela
tiveBounds, bool& rootRelativeBoundsComputed, | 110 ClipPathHelper(GraphicsContext* context, const DeprecatedPaintLayer& renderL
ayer, const DeprecatedPaintLayerPaintingInfo& paintingInfo, LayoutRect& rootRela
tiveBounds, bool& rootRelativeBoundsComputed, |
| 111 const LayoutPoint& offsetFromRoot, PaintLayerFlags paintFlags) | 111 const LayoutPoint& offsetFromRoot, PaintLayerFlags paintFlags) |
| 112 : m_resourceClipper(0), m_renderLayer(renderLayer), m_context(context) | 112 : m_resourceClipper(0), m_renderLayer(renderLayer), m_context(context) |
| 113 { | 113 { |
| 114 const LayoutStyle& style = renderLayer.layoutObject()->styleRef(); | 114 const ComputedStyle& style = renderLayer.layoutObject()->styleRef(); |
| 115 | 115 |
| 116 // Clip-path, like border radius, must not be applied to the contents of
a composited-scrolling container. | 116 // Clip-path, like border radius, must not be applied to the contents of
a composited-scrolling container. |
| 117 // It must, however, still be applied to the mask layer, so that the com
positor can properly mask the | 117 // It must, however, still be applied to the mask layer, so that the com
positor can properly mask the |
| 118 // scrolling contents and scrollbars. | 118 // scrolling contents and scrollbars. |
| 119 if (!renderLayer.layoutObject()->hasClipPath() || (renderLayer.needsComp
ositedScrolling() && !(paintFlags & PaintLayerPaintingChildClippingMaskPhase))) | 119 if (!renderLayer.layoutObject()->hasClipPath() || (renderLayer.needsComp
ositedScrolling() && !(paintFlags & PaintLayerPaintingChildClippingMaskPhase))) |
| 120 return; | 120 return; |
| 121 | 121 |
| 122 m_clipperState = SVGClipPainter::ClipperNotApplied; | 122 m_clipperState = SVGClipPainter::ClipperNotApplied; |
| 123 | 123 |
| 124 ASSERT(style.clipPath()); | 124 ASSERT(style.clipPath()); |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 if (!m_renderLayer.containsDirtyOverlayScrollbars()) | 731 if (!m_renderLayer.containsDirtyOverlayScrollbars()) |
| 732 return; | 732 return; |
| 733 | 733 |
| 734 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_renderLayer, LayoutRect(enc
losingIntRect(damageRect)), paintBehavior, LayoutSize(), paintingRoot); | 734 DeprecatedPaintLayerPaintingInfo paintingInfo(&m_renderLayer, LayoutRect(enc
losingIntRect(damageRect)), paintBehavior, LayoutSize(), paintingRoot); |
| 735 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); | 735 paintLayer(context, paintingInfo, PaintLayerPaintingOverlayScrollbars); |
| 736 | 736 |
| 737 m_renderLayer.setContainsDirtyOverlayScrollbars(false); | 737 m_renderLayer.setContainsDirtyOverlayScrollbars(false); |
| 738 } | 738 } |
| 739 | 739 |
| 740 } // namespace blink | 740 } // namespace blink |
| OLD | NEW |