OLD | NEW |
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 28 matching lines...) Expand all Loading... |
39 // If this enum changes change the unsigned bitfields using it. | 39 // If this enum changes change the unsigned bitfields using it. |
40 enum RenderSVGResourceMode { | 40 enum RenderSVGResourceMode { |
41 ApplyToDefaultMode = 1 << 0, // used for all resources except gradient/patte
rn | 41 ApplyToDefaultMode = 1 << 0, // used for all resources except gradient/patte
rn |
42 ApplyToFillMode = 1 << 1, | 42 ApplyToFillMode = 1 << 1, |
43 ApplyToStrokeMode = 1 << 2, | 43 ApplyToStrokeMode = 1 << 2, |
44 ApplyToTextMode = 1 << 3 // used in combination with ApplyTo{Fill|Stroke}
Mode | 44 ApplyToTextMode = 1 << 3 // used in combination with ApplyTo{Fill|Stroke}
Mode |
45 }; | 45 }; |
46 typedef unsigned RenderSVGResourceModeFlags; | 46 typedef unsigned RenderSVGResourceModeFlags; |
47 | 47 |
48 class GraphicsContext; | 48 class GraphicsContext; |
49 class Path; | |
50 class RenderObject; | 49 class RenderObject; |
51 class RenderStyle; | 50 class RenderStyle; |
52 class RenderSVGResourceSolidColor; | 51 class RenderSVGResourceSolidColor; |
53 | 52 |
54 class RenderSVGResource { | 53 class RenderSVGResource { |
55 public: | 54 public: |
56 RenderSVGResource() { } | 55 RenderSVGResource() { } |
57 virtual ~RenderSVGResource() { } | 56 virtual ~RenderSVGResource() { } |
58 | 57 |
59 virtual void removeAllClientsFromCache(bool markForInvalidation = true) = 0; | 58 virtual void removeAllClientsFromCache(bool markForInvalidation = true) = 0; |
(...skipping 30 matching lines...) Expand all Loading... |
90 private: | 89 private: |
91 static RenderSVGResource* requestPaintingResource(RenderSVGResourceMode, Ren
derObject*, const RenderStyle*, bool& hasFallback); | 90 static RenderSVGResource* requestPaintingResource(RenderSVGResourceMode, Ren
derObject*, const RenderStyle*, bool& hasFallback); |
92 }; | 91 }; |
93 | 92 |
94 #define DEFINE_RENDER_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \ | 93 #define DEFINE_RENDER_SVG_RESOURCE_TYPE_CASTS(thisType, typeName) \ |
95 DEFINE_TYPE_CASTS(thisType, RenderSVGResource, resource, resource->resourceT
ype() == typeName, resource.resourceType() == typeName) | 94 DEFINE_TYPE_CASTS(thisType, RenderSVGResource, resource, resource->resourceT
ype() == typeName, resource.resourceType() == typeName) |
96 | 95 |
97 } | 96 } |
98 | 97 |
99 #endif | 98 #endif |
OLD | NEW |