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/SVGShapePainter.h" | 6 #include "core/paint/SVGShapePainter.h" |
7 | 7 |
8 #include "core/layout/svg/LayoutSVGPath.h" | 8 #include "core/layout/svg/LayoutSVGPath.h" |
9 #include "core/layout/svg/LayoutSVGResourceMarker.h" | 9 #include "core/layout/svg/LayoutSVGResourceMarker.h" |
10 #include "core/layout/svg/LayoutSVGShape.h" | 10 #include "core/layout/svg/LayoutSVGShape.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 } | 109 } |
110 } | 110 } |
111 } | 111 } |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
115 if (m_layoutSVGShape.style()->outlineWidth()) { | 115 if (m_layoutSVGShape.style()->outlineWidth()) { |
116 PaintInfo outlinePaintInfo(paintInfoBeforeFiltering); | 116 PaintInfo outlinePaintInfo(paintInfoBeforeFiltering); |
117 outlinePaintInfo.phase = PaintPhaseSelfOutline; | 117 outlinePaintInfo.phase = PaintPhaseSelfOutline; |
118 LayoutRect layoutObjectBounds(boundingBox); | 118 LayoutRect layoutObjectBounds(boundingBox); |
119 ObjectPainter(m_layoutSVGShape).paintOutline(outlinePaintInfo, layoutObj
ectBounds, layoutObjectBounds); | 119 LayoutRect visualOverflowRect = ObjectPainter::outlineBounds(layoutObjec
tBounds, m_layoutSVGShape.styleRef()); |
| 120 ObjectPainter(m_layoutSVGShape).paintOutline(outlinePaintInfo, layoutObj
ectBounds, visualOverflowRect); |
120 } | 121 } |
121 } | 122 } |
122 | 123 |
123 class PathWithTemporaryWindingRule { | 124 class PathWithTemporaryWindingRule { |
124 public: | 125 public: |
125 PathWithTemporaryWindingRule(Path& path, SkPath::FillType fillType) | 126 PathWithTemporaryWindingRule(Path& path, SkPath::FillType fillType) |
126 : m_path(const_cast<SkPath&>(path.skPath())) | 127 : m_path(const_cast<SkPath&>(path.skPath())) |
127 { | 128 { |
128 m_savedFillType = m_path.getFillType(); | 129 m_savedFillType = m_path.getFillType(); |
129 m_path.setFillType(fillType); | 130 m_path.setFillType(fillType); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 // This open-codes LayoutSVGShape::nonScalingStrokePath, because the | 255 // This open-codes LayoutSVGShape::nonScalingStrokePath, because the |
255 // requirements here differ (we have a temporary path that we can | 256 // requirements here differ (we have a temporary path that we can |
256 // mutate.) | 257 // mutate.) |
257 if (m_layoutSVGShape.hasNonScalingStroke()) | 258 if (m_layoutSVGShape.hasNonScalingStroke()) |
258 tempPath.transform(nonScalingTransform); | 259 tempPath.transform(nonScalingTransform); |
259 context->drawPath(tempPath.skPath(), fillPaint); | 260 context->drawPath(tempPath.skPath(), fillPaint); |
260 } | 261 } |
261 } | 262 } |
262 | 263 |
263 } // namespace blink | 264 } // namespace blink |
OLD | NEW |