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

Side by Side Diff: Source/core/rendering/svg/RenderSVGShape.h

Issue 135563002: Update remaining rendering classes to use OVERRIDE / FINAL when needed (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/svg/RenderSVGRoot.h ('k') | Source/core/rendering/svg/RenderSVGTSpan.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 bool nodeAtFloatPointInternal(const HitTestRequest&, const FloatPoint&, Poin terEventsHitRules); 58 bool nodeAtFloatPointInternal(const HitTestRequest&, const FloatPoint&, Poin terEventsHitRules);
59 59
60 Path& path() const 60 Path& path() const
61 { 61 {
62 ASSERT(m_path); 62 ASSERT(m_path);
63 return *m_path; 63 return *m_path;
64 } 64 }
65 65
66 protected: 66 protected:
67 virtual void updateShapeFromElement(); 67 virtual void updateShapeFromElement();
68 virtual bool isEmpty() const; 68 virtual bool isEmpty() const OVERRIDE;
69 virtual bool shapeDependentStrokeContains(const FloatPoint&); 69 virtual bool shapeDependentStrokeContains(const FloatPoint&);
70 virtual bool shapeDependentFillContains(const FloatPoint&, const WindRule) c onst; 70 virtual bool shapeDependentFillContains(const FloatPoint&, const WindRule) c onst;
71 float strokeWidth() const; 71 float strokeWidth() const;
72 bool hasPath() const { return m_path.get(); } 72 bool hasPath() const { return m_path.get(); }
73 bool hasSmoothStroke() const; 73 bool hasSmoothStroke() const;
74 74
75 bool hasNonScalingStroke() const { return style()->svgStyle()->vectorEffect( ) == VE_NON_SCALING_STROKE; } 75 bool hasNonScalingStroke() const { return style()->svgStyle()->vectorEffect( ) == VE_NON_SCALING_STROKE; }
76 AffineTransform nonScalingStrokeTransform() const; 76 AffineTransform nonScalingStrokeTransform() const;
77 Path* nonScalingStrokePath(const Path*, const AffineTransform&) const; 77 Path* nonScalingStrokePath(const Path*, const AffineTransform&) const;
78 78
79 FloatRect m_fillBoundingBox; 79 FloatRect m_fillBoundingBox;
80 FloatRect m_strokeBoundingBox; 80 FloatRect m_strokeBoundingBox;
81 81
82 private: 82 private:
83 // Hit-detection separated for the fill and the stroke 83 // Hit-detection separated for the fill and the stroke
84 bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRul e fillRule = RULE_NONZERO); 84 bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRul e fillRule = RULE_NONZERO);
85 bool strokeContains(const FloatPoint&, bool requiresStroke = true); 85 bool strokeContains(const FloatPoint&, bool requiresStroke = true);
86 86
87 virtual FloatRect repaintRectInLocalCoordinates() const OVERRIDE FINAL { ret urn m_repaintBoundingBox; } 87 virtual FloatRect repaintRectInLocalCoordinates() const OVERRIDE FINAL { ret urn m_repaintBoundingBox; }
88 virtual const AffineTransform& localToParentTransform() const OVERRIDE FINAL { return m_localTransform; } 88 virtual const AffineTransform& localToParentTransform() const OVERRIDE FINAL { return m_localTransform; }
89 virtual AffineTransform localTransform() const OVERRIDE FINAL { return m_loc alTransform; } 89 virtual AffineTransform localTransform() const OVERRIDE FINAL { return m_loc alTransform; }
90 90
91 virtual bool isSVGShape() const OVERRIDE FINAL { return true; } 91 virtual bool isSVGShape() const OVERRIDE FINAL { return true; }
92 virtual const char* renderName() const { return "RenderSVGShape"; } 92 virtual const char* renderName() const OVERRIDE { return "RenderSVGShape"; }
93 93
94 virtual void layout() OVERRIDE FINAL; 94 virtual void layout() OVERRIDE FINAL;
95 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL; 95 virtual void paint(PaintInfo&, const LayoutPoint&) OVERRIDE FINAL;
96 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE FINAL; 96 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) OVERRIDE FINAL;
97 97
98 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) OVERRIDE FINAL; 98 virtual bool nodeAtFloatPoint(const HitTestRequest&, HitTestResult&, const F loatPoint& pointInParent, HitTestAction) OVERRIDE FINAL;
99 99
100 virtual FloatRect objectBoundingBox() const OVERRIDE FINAL { return m_fillBo undingBox; } 100 virtual FloatRect objectBoundingBox() const OVERRIDE FINAL { return m_fillBo undingBox; }
101 virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL { return m_stroke BoundingBox; } 101 virtual FloatRect strokeBoundingBox() const OVERRIDE FINAL { return m_stroke BoundingBox; }
102 FloatRect calculateObjectBoundingBox() const; 102 FloatRect calculateObjectBoundingBox() const;
(...skipping 20 matching lines...) Expand all
123 bool m_needsBoundariesUpdate : 1; 123 bool m_needsBoundariesUpdate : 1;
124 bool m_needsShapeUpdate : 1; 124 bool m_needsShapeUpdate : 1;
125 bool m_needsTransformUpdate : 1; 125 bool m_needsTransformUpdate : 1;
126 }; 126 };
127 127
128 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape()); 128 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGShape, isSVGShape());
129 129
130 } 130 }
131 131
132 #endif 132 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGRoot.h ('k') | Source/core/rendering/svg/RenderSVGTSpan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698