OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 */ | 18 */ |
19 | 19 |
20 #ifndef SVGViewSpec_h | 20 #ifndef SVGViewSpec_h |
21 #define SVGViewSpec_h | 21 #define SVGViewSpec_h |
22 | 22 |
23 #include "bindings/v8/ScriptWrappable.h" | 23 #include "bindings/v8/ScriptWrappable.h" |
24 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" | |
25 #include "core/svg/SVGAnimatedRect.h" | |
26 #include "core/svg/SVGFitToViewBox.h" | 24 #include "core/svg/SVGFitToViewBox.h" |
27 #include "core/svg/SVGSVGElement.h" | 25 #include "core/svg/SVGSVGElement.h" |
28 #include "core/svg/SVGTransformList.h" | 26 #include "core/svg/SVGTransformList.h" |
29 #include "core/svg/SVGZoomAndPan.h" | 27 #include "core/svg/SVGZoomAndPan.h" |
30 #include "wtf/WeakPtr.h" | 28 #include "wtf/WeakPtr.h" |
31 | 29 |
32 namespace WebCore { | 30 namespace WebCore { |
33 | 31 |
34 class SVGTransformListPropertyTearOff; | 32 class SVGTransformListPropertyTearOff; |
35 | 33 |
(...skipping 21 matching lines...) Expand all Loading... |
57 void setViewTargetString(const String& string) { m_viewTargetString = string
; } | 55 void setViewTargetString(const String& string) { m_viewTargetString = string
; } |
58 String viewTargetString() const { return m_viewTargetString; } | 56 String viewTargetString() const { return m_viewTargetString; } |
59 | 57 |
60 SVGElement* contextElement() const { return m_contextElement; } | 58 SVGElement* contextElement() const { return m_contextElement; } |
61 void detachContextElement(); | 59 void detachContextElement(); |
62 | 60 |
63 // Custom non-animated 'transform' property. | 61 // Custom non-animated 'transform' property. |
64 SVGTransformListPropertyTearOff* transform(); | 62 SVGTransformListPropertyTearOff* transform(); |
65 SVGTransformList transformBaseValue() const { return m_transform; } | 63 SVGTransformList transformBaseValue() const { return m_transform; } |
66 | 64 |
67 SVGAnimatedRect* viewBox() { return m_viewBox.get(); } | |
68 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAsp
ectRatio.get(); } | |
69 | |
70 private: | 65 private: |
71 explicit SVGViewSpec(SVGSVGElement*); | 66 explicit SVGViewSpec(SVGSVGElement*); |
72 | 67 |
73 static const SVGPropertyInfo* transformPropertyInfo(); | 68 static const SVGPropertyInfo* transformPropertyInfo(); |
74 | 69 |
75 static const AtomicString& transformIdentifier(); | 70 static const AtomicString& transformIdentifier(); |
76 | 71 |
77 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTransformWrapper(SVGVie
wSpec* contextElement); | 72 static PassRefPtr<SVGAnimatedProperty> lookupOrCreateTransformWrapper(SVGVie
wSpec* contextElement); |
78 | 73 |
79 template<typename CharType> | 74 template<typename CharType> |
80 bool parseViewSpecInternal(const CharType* ptr, const CharType* end); | 75 bool parseViewSpecInternal(const CharType* ptr, const CharType* end); |
81 | 76 |
82 // FIXME(oilpan): This is back-ptr to be cleared from contextElement. | 77 // FIXME(oilpan): This is back-ptr to be cleared from contextElement. |
83 SVGSVGElement* m_contextElement; | 78 SVGSVGElement* m_contextElement; |
84 SVGTransformList m_transform; | 79 SVGTransformList m_transform; |
85 RefPtr<SVGAnimatedRect> m_viewBox; | |
86 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | |
87 String m_viewTargetString; | 80 String m_viewTargetString; |
88 }; | 81 }; |
89 | 82 |
90 } // namespace WebCore | 83 } // namespace WebCore |
91 | 84 |
92 #endif | 85 #endif |
OLD | NEW |