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

Side by Side Diff: Source/core/rendering/svg/RenderSVGResourceMarker.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2009-2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 18 matching lines...) Expand all
29 namespace WebCore { 29 namespace WebCore {
30 30
31 class AffineTransform; 31 class AffineTransform;
32 class RenderObject; 32 class RenderObject;
33 33
34 class RenderSVGResourceMarker FINAL : public RenderSVGResourceContainer { 34 class RenderSVGResourceMarker FINAL : public RenderSVGResourceContainer {
35 public: 35 public:
36 explicit RenderSVGResourceMarker(SVGMarkerElement*); 36 explicit RenderSVGResourceMarker(SVGMarkerElement*);
37 virtual ~RenderSVGResourceMarker(); 37 virtual ~RenderSVGResourceMarker();
38 38
39 virtual const char* renderName() const { return "RenderSVGResourceMarker"; } 39 virtual const char* renderName() const OVERRIDE { return "RenderSVGResourceM arker"; }
40 40
41 virtual void removeAllClientsFromCache(bool markForInvalidation = true); 41 virtual void removeAllClientsFromCache(bool markForInvalidation = true) OVER RIDE;
42 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true); 42 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation = true) OVERRIDE;
43 43
44 void draw(PaintInfo&, const AffineTransform&); 44 void draw(PaintInfo&, const AffineTransform&);
45 45
46 // Calculates marker boundaries, mapped to the target element's coordinate s pace 46 // Calculates marker boundaries, mapped to the target element's coordinate s pace
47 FloatRect markerBoundaries(const AffineTransform& markerTransformation) cons t; 47 FloatRect markerBoundaries(const AffineTransform& markerTransformation) cons t;
48 48
49 virtual void applyViewportClip(PaintInfo&); 49 virtual void applyViewportClip(PaintInfo&) OVERRIDE;
50 virtual void layout(); 50 virtual void layout() OVERRIDE;
51 virtual void calcViewport(); 51 virtual void calcViewport() OVERRIDE;
52 52
53 virtual const AffineTransform& localToParentTransform() const; 53 virtual const AffineTransform& localToParentTransform() const OVERRIDE;
54 AffineTransform markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const; 54 AffineTransform markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const;
55 55
56 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, u nsigned short) { return false; } 56 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, u nsigned short) OVERRIDE { return false; }
57 57
58 FloatPoint referencePoint() const; 58 FloatPoint referencePoint() const;
59 float angle() const; 59 float angle() const;
60 SVGMarkerUnitsType markerUnits() const { return toSVGMarkerElement(element() )->markerUnitsCurrentValue(); } 60 SVGMarkerUnitsType markerUnits() const { return toSVGMarkerElement(element() )->markerUnitsCurrentValue(); }
61 61
62 virtual RenderSVGResourceType resourceType() const { return s_resourceType; } 62 virtual RenderSVGResourceType resourceType() const OVERRIDE { return s_resou rceType; }
63 static const RenderSVGResourceType s_resourceType; 63 static const RenderSVGResourceType s_resourceType;
64 64
65 private: 65 private:
66 // Generates a transformation matrix usable to render marker content. Handle s scaling the marker content 66 // Generates a transformation matrix usable to render marker content. Handle s scaling the marker content
67 // acording to SVGs markerUnits="strokeWidth" concept, when a strokeWidth va lue != -1 is passed in. 67 // acording to SVGs markerUnits="strokeWidth" concept, when a strokeWidth va lue != -1 is passed in.
68 AffineTransform markerContentTransformation(const AffineTransform& contentTr ansformation, const FloatPoint& origin, float strokeWidth = -1) const; 68 AffineTransform markerContentTransformation(const AffineTransform& contentTr ansformation, const FloatPoint& origin, float strokeWidth = -1) const;
69 69
70 AffineTransform viewportTransform() const; 70 AffineTransform viewportTransform() const;
71 71
72 mutable AffineTransform m_localToParentTransform; 72 mutable AffineTransform m_localToParentTransform;
73 FloatRect m_viewport; 73 FloatRect m_viewport;
74 }; 74 };
75 75
76 DEFINE_RENDER_SVG_RESOURCE_TYPE_CASTS(RenderSVGResourceMarker, MarkerResourceTyp e); 76 DEFINE_RENDER_SVG_RESOURCE_TYPE_CASTS(RenderSVGResourceMarker, MarkerResourceTyp e);
77 77
78 } 78 }
79 79
80 #endif 80 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceLinearGradient.h ('k') | Source/core/rendering/svg/RenderSVGResourceMasker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698