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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h

Issue 2444593002: Introduce Layout*::adjustVisualRectForRasterEffects and use it for SVG hairlines. (Closed)
Patch Set: none Created 4 years, 1 month 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 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org> 4 * Copyright (C) 2005 Eric Seidel <eric@webkit.org>
5 * Copyright (C) 2006 Apple Computer, Inc 5 * Copyright (C) 2006 Apple Computer, Inc
6 * Copyright (C) 2009 Google, Inc. 6 * Copyright (C) 2009 Google, Inc.
7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org> 7 * Copyright (C) 2011 Renata Hodovan <reni@webkit.org>
8 * Copyright (C) 2011 University of Szeged 8 * Copyright (C) 2011 University of Szeged
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 virtual ShapeGeometryCodePath geometryCodePath() const { 100 virtual ShapeGeometryCodePath geometryCodePath() const {
101 return PathGeometry; 101 return PathGeometry;
102 } 102 }
103 103
104 FloatRect objectBoundingBox() const final { return m_fillBoundingBox; } 104 FloatRect objectBoundingBox() const final { return m_fillBoundingBox; }
105 105
106 const char* name() const override { return "LayoutSVGShape"; } 106 const char* name() const override { return "LayoutSVGShape"; }
107 107
108 protected: 108 protected:
109 void adjustVisualRectForRasterEffects(LayoutRect&) const override;
110
109 void clearPath() { m_path.reset(); } 111 void clearPath() { m_path.reset(); }
110 void createPath(); 112 void createPath();
111 113
112 virtual void updateShapeFromElement(); 114 virtual void updateShapeFromElement();
113 // Calculates an inclusive bounding box of this shape as if this shape has 115 // Calculates an inclusive bounding box of this shape as if this shape has
114 // a stroke. If this shape has a stroke, then m_strokeBoundingBox is returned; 116 // a stroke. If this shape has a stroke, then m_strokeBoundingBox is returned;
115 // otherwise, estimates a bounding box (not necessarily tight) that would 117 // otherwise, estimates a bounding box (not necessarily tight) that would
116 // include this shape's stroke bounding box if it had a stroke. 118 // include this shape's stroke bounding box if it had a stroke.
117 virtual FloatRect hitTestStrokeBoundingBox() const; 119 virtual FloatRect hitTestStrokeBoundingBox() const;
118 virtual bool shapeDependentStrokeContains(const FloatPoint&); 120 virtual bool shapeDependentStrokeContains(const FloatPoint&);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 bool m_needsBoundariesUpdate : 1; 166 bool m_needsBoundariesUpdate : 1;
165 bool m_needsShapeUpdate : 1; 167 bool m_needsShapeUpdate : 1;
166 bool m_needsTransformUpdate : 1; 168 bool m_needsTransformUpdate : 1;
167 }; 169 };
168 170
169 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGShape, isSVGShape()); 171 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGShape, isSVGShape());
170 172
171 } // namespace blink 173 } // namespace blink
172 174
173 #endif 175 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698