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

Side by Side Diff: Source/core/layout/svg/LayoutSVGResourceContainer.h

Issue 1231363003: Fix virtual/override/final usage in Source/core/layout/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 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 22 matching lines...) Expand all
33 RadialGradientResourceType, 33 RadialGradientResourceType,
34 FilterResourceType, 34 FilterResourceType,
35 ClipperResourceType 35 ClipperResourceType
36 }; 36 };
37 37
38 class DeprecatedPaintLayer; 38 class DeprecatedPaintLayer;
39 39
40 class LayoutSVGResourceContainer : public LayoutSVGHiddenContainer { 40 class LayoutSVGResourceContainer : public LayoutSVGHiddenContainer {
41 public: 41 public:
42 explicit LayoutSVGResourceContainer(SVGElement*); 42 explicit LayoutSVGResourceContainer(SVGElement*);
43 virtual ~LayoutSVGResourceContainer(); 43 ~LayoutSVGResourceContainer() override;
44 44
45 virtual void removeAllClientsFromCache(bool markForInvalidation = true) = 0; 45 virtual void removeAllClientsFromCache(bool markForInvalidation = true) = 0;
46 virtual void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) = 0; 46 virtual void removeClientFromCache(LayoutObject*, bool markForInvalidation = true) = 0;
47 47
48 virtual void layout() override; 48 void layout() override;
49 virtual void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override final; 49 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) final;
50 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVGResourceContainer || LayoutSVGHiddenContainer::isOfType(type); } 50 bool isOfType(LayoutObjectType type) const override { return type == LayoutO bjectSVGResourceContainer || LayoutSVGHiddenContainer::isOfType(type); }
51 51
52 virtual LayoutSVGResourceType resourceType() const = 0; 52 virtual LayoutSVGResourceType resourceType() const = 0;
53 53
54 bool isSVGPaintServer() const 54 bool isSVGPaintServer() const
55 { 55 {
56 LayoutSVGResourceType resourceType = this->resourceType(); 56 LayoutSVGResourceType resourceType = this->resourceType();
57 return resourceType == PatternResourceType 57 return resourceType == PatternResourceType
58 || resourceType == LinearGradientResourceType 58 || resourceType == LinearGradientResourceType
59 || resourceType == RadialGradientResourceType; 59 || resourceType == RadialGradientResourceType;
60 } 60 }
(...skipping 16 matching lines...) Expand all
77 BoundariesInvalidation = 1 << 1, 77 BoundariesInvalidation = 1 << 1,
78 PaintInvalidation = 1 << 2, 78 PaintInvalidation = 1 << 2,
79 ParentOnlyInvalidation = 1 << 3 79 ParentOnlyInvalidation = 1 << 3
80 }; 80 };
81 81
82 // Used from the invalidateClient/invalidateClients methods from classes, in heriting from us. 82 // Used from the invalidateClient/invalidateClients methods from classes, in heriting from us.
83 void markAllClientsForInvalidation(InvalidationMode); 83 void markAllClientsForInvalidation(InvalidationMode);
84 void markAllClientLayersForInvalidation(); 84 void markAllClientLayersForInvalidation();
85 void markClientForInvalidation(LayoutObject*, InvalidationMode); 85 void markClientForInvalidation(LayoutObject*, InvalidationMode);
86 86
87 virtual void willBeDestroyed() override; 87 void willBeDestroyed() override;
88 88
89 bool m_isInLayout; 89 bool m_isInLayout;
90 90
91 private: 91 private:
92 friend class SVGResourcesCache; 92 friend class SVGResourcesCache;
93 void addClient(LayoutObject*); 93 void addClient(LayoutObject*);
94 void removeClient(LayoutObject*); 94 void removeClient(LayoutObject*);
95 95
96 void registerResource(); 96 void registerResource();
97 97
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 130
131 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceContainer, isSVGResourceContain er()); 131 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGResourceContainer, isSVGResourceContain er());
132 132
133 #define DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \ 133 #define DEFINE_LAYOUT_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \
134 DEFINE_TYPE_CASTS(thisType, LayoutSVGResourceContainer, resource, resource-> resourceType() == typeName, resource.resourceType() == typeName) 134 DEFINE_TYPE_CASTS(thisType, LayoutSVGResourceContainer, resource, resource-> resourceType() == typeName, resource.resourceType() == typeName)
135 135
136 } 136 }
137 137
138 #endif 138 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/svg/LayoutSVGResourceClipper.h ('k') | Source/core/layout/svg/LayoutSVGResourceFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698