| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 #define SVGResources_h | 21 #define SVGResources_h |
| 22 | 22 |
| 23 #include "wtf/Allocator.h" | 23 #include "wtf/Allocator.h" |
| 24 #include "wtf/HashSet.h" | 24 #include "wtf/HashSet.h" |
| 25 #include "wtf/Noncopyable.h" | 25 #include "wtf/Noncopyable.h" |
| 26 #include "wtf/PtrUtil.h" | 26 #include "wtf/PtrUtil.h" |
| 27 #include <memory> | 27 #include <memory> |
| 28 | 28 |
| 29 namespace blink { | 29 namespace blink { |
| 30 | 30 |
| 31 class ComputedStyle; |
| 31 class LayoutObject; | 32 class LayoutObject; |
| 32 class LayoutSVGResourceClipper; | 33 class LayoutSVGResourceClipper; |
| 33 class LayoutSVGResourceContainer; | 34 class LayoutSVGResourceContainer; |
| 34 class LayoutSVGResourceFilter; | 35 class LayoutSVGResourceFilter; |
| 35 class LayoutSVGResourceMarker; | 36 class LayoutSVGResourceMarker; |
| 36 class LayoutSVGResourceMasker; | 37 class LayoutSVGResourceMasker; |
| 37 class LayoutSVGResourcePaintServer; | 38 class LayoutSVGResourcePaintServer; |
| 38 class SVGElement; | 39 class SVGElement; |
| 39 class SVGComputedStyle; | |
| 40 | 40 |
| 41 // Holds a set of resources associated with a LayoutObject | 41 // Holds a set of resources associated with a LayoutObject |
| 42 class SVGResources { | 42 class SVGResources { |
| 43 WTF_MAKE_NONCOPYABLE(SVGResources); USING_FAST_MALLOC(SVGResources); | 43 WTF_MAKE_NONCOPYABLE(SVGResources); USING_FAST_MALLOC(SVGResources); |
| 44 public: | 44 public: |
| 45 SVGResources(); | 45 SVGResources(); |
| 46 | 46 |
| 47 static std::unique_ptr<SVGResources> buildResources(const LayoutObject*, con
st SVGComputedStyle&); | 47 static std::unique_ptr<SVGResources> buildResources(const LayoutObject*, con
st ComputedStyle&); |
| 48 void layoutIfNeeded(); | 48 void layoutIfNeeded(); |
| 49 | 49 |
| 50 static bool supportsMarkers(const SVGElement&); | 50 static bool supportsMarkers(const SVGElement&); |
| 51 | 51 |
| 52 // Ordinary resources | 52 // Ordinary resources |
| 53 LayoutSVGResourceClipper* clipper() const { return m_clipperFilterMaskerData
? m_clipperFilterMaskerData->clipper : 0; } | 53 LayoutSVGResourceClipper* clipper() const { return m_clipperFilterMaskerData
? m_clipperFilterMaskerData->clipper : 0; } |
| 54 LayoutSVGResourceMarker* markerStart() const { return m_markerData ? m_marke
rData->markerStart : 0; } | 54 LayoutSVGResourceMarker* markerStart() const { return m_markerData ? m_marke
rData->markerStart : 0; } |
| 55 LayoutSVGResourceMarker* markerMid() const { return m_markerData ? m_markerD
ata->markerMid : 0; } | 55 LayoutSVGResourceMarker* markerMid() const { return m_markerData ? m_markerD
ata->markerMid : 0; } |
| 56 LayoutSVGResourceMarker* markerEnd() const { return m_markerData ? m_markerD
ata->markerEnd : 0; } | 56 LayoutSVGResourceMarker* markerEnd() const { return m_markerData ? m_markerD
ata->markerEnd : 0; } |
| 57 LayoutSVGResourceMasker* masker() const { return m_clipperFilterMaskerData ?
m_clipperFilterMaskerData->masker : 0; } | 57 LayoutSVGResourceMasker* masker() const { return m_clipperFilterMaskerData ?
m_clipperFilterMaskerData->masker : 0; } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 | 177 |
| 178 std::unique_ptr<ClipperFilterMaskerData> m_clipperFilterMaskerData; | 178 std::unique_ptr<ClipperFilterMaskerData> m_clipperFilterMaskerData; |
| 179 std::unique_ptr<MarkerData> m_markerData; | 179 std::unique_ptr<MarkerData> m_markerData; |
| 180 std::unique_ptr<FillStrokeData> m_fillStrokeData; | 180 std::unique_ptr<FillStrokeData> m_fillStrokeData; |
| 181 LayoutSVGResourceContainer* m_linkedResource; | 181 LayoutSVGResourceContainer* m_linkedResource; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 } // namespace blink | 184 } // namespace blink |
| 185 | 185 |
| 186 #endif | 186 #endif |
| OLD | NEW |