| 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 "core/paint/ReplacedPainter.h" | 5 #include "core/paint/ReplacedPainter.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutReplaced.h" | 7 #include "core/layout/LayoutReplaced.h" |
| 8 #include "core/layout/api/SelectionState.h" | 8 #include "core/layout/api/SelectionState.h" |
| 9 #include "core/layout/compositing/CompositedLayerMapping.h" | 9 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 10 #include "core/layout/svg/LayoutSVGRoot.h" | 10 #include "core/layout/svg/LayoutSVGRoot.h" |
| 11 #include "core/paint/BoxPainter.h" | 11 #include "core/paint/BoxPainter.h" |
| 12 #include "core/paint/LayoutObjectDrawingRecorder.h" | 12 #include "core/paint/LayoutObjectDrawingRecorder.h" |
| 13 #include "core/paint/ObjectPainter.h" | 13 #include "core/paint/ObjectPainter.h" |
| 14 #include "core/paint/PaintInfo.h" | 14 #include "core/paint/PaintInfo.h" |
| 15 #include "core/paint/PaintLayer.h" | 15 #include "core/paint/PaintLayer.h" |
| 16 #include "core/paint/RoundedInnerRectClipper.h" | 16 #include "core/paint/RoundedInnerRectClipper.h" |
| 17 #include "wtf/Optional.h" | 17 #include "platform/wtf/Optional.h" |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 | 20 |
| 21 static bool ShouldApplyViewportClip(const LayoutReplaced& layout_replaced) { | 21 static bool ShouldApplyViewportClip(const LayoutReplaced& layout_replaced) { |
| 22 return !layout_replaced.IsSVGRoot() || | 22 return !layout_replaced.IsSVGRoot() || |
| 23 ToLayoutSVGRoot(&layout_replaced)->ShouldApplyViewportClip(); | 23 ToLayoutSVGRoot(&layout_replaced)->ShouldApplyViewportClip(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 void ReplacedPainter::Paint(const PaintInfo& paint_info, | 26 void ReplacedPainter::Paint(const PaintInfo& paint_info, |
| 27 const LayoutPoint& paint_offset) { | 27 const LayoutPoint& paint_offset) { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 paint_rect.Unite(layout_replaced_.LocalSelectionRect()); | 159 paint_rect.Unite(layout_replaced_.LocalSelectionRect()); |
| 160 paint_rect.MoveBy(adjusted_paint_offset); | 160 paint_rect.MoveBy(adjusted_paint_offset); |
| 161 | 161 |
| 162 if (!paint_info.GetCullRect().IntersectsCullRect(paint_rect)) | 162 if (!paint_info.GetCullRect().IntersectsCullRect(paint_rect)) |
| 163 return false; | 163 return false; |
| 164 | 164 |
| 165 return true; | 165 return true; |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| OLD | NEW |