Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: third_party/WebKit/Source/core/paint/SVGShapePainter.cpp

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/SVGShapePainter.h" 5 #include "core/paint/SVGShapePainter.h"
6 6
7 #include "core/layout/svg/LayoutSVGResourceMarker.h" 7 #include "core/layout/svg/LayoutSVGResourceMarker.h"
8 #include "core/layout/svg/LayoutSVGShape.h" 8 #include "core/layout/svg/LayoutSVGShape.h"
9 #include "core/layout/svg/SVGLayoutSupport.h" 9 #include "core/layout/svg/SVGLayoutSupport.h"
10 #include "core/layout/svg/SVGMarkerData.h" 10 #include "core/layout/svg/SVGMarkerData.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 static SkPath::FillType fillRuleFromStyle(const PaintInfo& paintInfo, const SVGC omputedStyle& svgStyle) 38 static SkPath::FillType fillRuleFromStyle(const PaintInfo& paintInfo, const SVGC omputedStyle& svgStyle)
39 { 39 {
40 return WebCoreWindRuleToSkFillType(paintInfo.isRenderingClipPathAsMaskImage( ) ? svgStyle.clipRule() : svgStyle.fillRule()); 40 return WebCoreWindRuleToSkFillType(paintInfo.isRenderingClipPathAsMaskImage( ) ? svgStyle.clipRule() : svgStyle.fillRule());
41 } 41 }
42 42
43 void SVGShapePainter::paint(const PaintInfo& paintInfo) 43 void SVGShapePainter::paint(const PaintInfo& paintInfo)
44 { 44 {
45 if (paintInfo.phase != PaintPhaseForeground 45 if (paintInfo.phase != PaintPhaseForeground
46 || m_layoutSVGShape.style()->visibility() != VISIBLE 46 || m_layoutSVGShape.style()->visibility() != EVisibility::Visible
47 || m_layoutSVGShape.isShapeEmpty()) 47 || m_layoutSVGShape.isShapeEmpty())
48 return; 48 return;
49 49
50 FloatRect boundingBox = m_layoutSVGShape.paintInvalidationRectInLocalSVGCoor dinates(); 50 FloatRect boundingBox = m_layoutSVGShape.paintInvalidationRectInLocalSVGCoor dinates();
51 if (!paintInfo.cullRect().intersectsCullRect(m_layoutSVGShape.localSVGTransf orm(), boundingBox)) 51 if (!paintInfo.cullRect().intersectsCullRect(m_layoutSVGShape.localSVGTransf orm(), boundingBox))
52 return; 52 return;
53 53
54 PaintInfo paintInfoBeforeFiltering(paintInfo); 54 PaintInfo paintInfoBeforeFiltering(paintInfo);
55 // Shapes cannot have children so do not call updateCullRect. 55 // Shapes cannot have children so do not call updateCullRect.
56 SVGTransformContext transformContext(paintInfoBeforeFiltering.context, m_lay outSVGShape, m_layoutSVGShape.localSVGTransform()); 56 SVGTransformContext transformContext(paintInfoBeforeFiltering.context, m_lay outSVGShape, m_layoutSVGShape.localSVGTransform());
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 return; 215 return;
216 216
217 TransformRecorder transformRecorder(paintInfo.context, marker, marker.marker Transformation(position.origin, position.angle, strokeWidth)); 217 TransformRecorder transformRecorder(paintInfo.context, marker, marker.marker Transformation(position.origin, position.angle, strokeWidth));
218 Optional<FloatClipRecorder> clipRecorder; 218 Optional<FloatClipRecorder> clipRecorder;
219 if (SVGLayoutSupport::isOverflowHidden(&marker)) 219 if (SVGLayoutSupport::isOverflowHidden(&marker))
220 clipRecorder.emplace(paintInfo.context, marker, paintInfo.phase, marker. viewport()); 220 clipRecorder.emplace(paintInfo.context, marker, paintInfo.phase, marker. viewport());
221 SVGContainerPainter(marker).paint(paintInfo); 221 SVGContainerPainter(marker).paint(paintInfo);
222 } 222 }
223 223
224 } // namespace blink 224 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698