| 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 19 matching lines...) Expand all Loading... |
| 30 public: | 30 public: |
| 31 enum ClipMode { PathOnlyClipMode, MaskClipMode }; | 31 enum ClipMode { PathOnlyClipMode, MaskClipMode }; |
| 32 | 32 |
| 33 // We should eventually cache the combined clip path here, when switching to
path ops clipping. | 33 // We should eventually cache the combined clip path here, when switching to
path ops clipping. |
| 34 // For now we only cache a marker to let postApply know whether it needs to
perform any work. | 34 // For now we only cache a marker to let postApply know whether it needs to
perform any work. |
| 35 ClipMode clipMode; | 35 ClipMode clipMode; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 class RenderSVGResourceClipper FINAL : public RenderSVGResourceContainer { | 38 class RenderSVGResourceClipper FINAL : public RenderSVGResourceContainer { |
| 39 public: | 39 public: |
| 40 RenderSVGResourceClipper(SVGClipPathElement*); | 40 explicit RenderSVGResourceClipper(SVGClipPathElement*); |
| 41 virtual ~RenderSVGResourceClipper(); | 41 virtual ~RenderSVGResourceClipper(); |
| 42 | 42 |
| 43 virtual const char* renderName() const { return "RenderSVGResourceClipper";
} | 43 virtual const char* renderName() const { return "RenderSVGResourceClipper";
} |
| 44 | 44 |
| 45 virtual void removeAllClientsFromCache(bool markForInvalidation = true); | 45 virtual void removeAllClientsFromCache(bool markForInvalidation = true); |
| 46 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation =
true); | 46 virtual void removeClientFromCache(RenderObject*, bool markForInvalidation =
true); |
| 47 | 47 |
| 48 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, u
nsigned short resourceMode) OVERRIDE; | 48 virtual bool applyResource(RenderObject*, RenderStyle*, GraphicsContext*&, u
nsigned short resourceMode) OVERRIDE; |
| 49 virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned sh
ort, const Path*, const RenderSVGShape*) OVERRIDE; | 49 virtual void postApplyResource(RenderObject*, GraphicsContext*&, unsigned sh
ort, const Path*, const RenderSVGShape*) OVERRIDE; |
| 50 // clipPath can be clipped too, but don't have a boundingBox or repaintRect.
So we can't call | 50 // clipPath can be clipped too, but don't have a boundingBox or repaintRect.
So we can't call |
| (...skipping 24 matching lines...) Expand all Loading... |
| 75 | 75 |
| 76 inline RenderSVGResourceClipper* toRenderSVGResourceClipper(RenderSVGResource* r
esource) | 76 inline RenderSVGResourceClipper* toRenderSVGResourceClipper(RenderSVGResource* r
esource) |
| 77 { | 77 { |
| 78 ASSERT_WITH_SECURITY_IMPLICATION(!resource || resource->resourceType() == Cl
ipperResourceType); | 78 ASSERT_WITH_SECURITY_IMPLICATION(!resource || resource->resourceType() == Cl
ipperResourceType); |
| 79 return static_cast<RenderSVGResourceClipper*>(resource); | 79 return static_cast<RenderSVGResourceClipper*>(resource); |
| 80 } | 80 } |
| 81 | 81 |
| 82 } | 82 } |
| 83 | 83 |
| 84 #endif | 84 #endif |
| OLD | NEW |