OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 virtual bool isValid() const { return SVGTests::isValid(); } | 52 virtual bool isValid() const { return SVGTests::isValid(); } |
53 virtual bool supportsFocus() const { return true; } | 53 virtual bool supportsFocus() const { return true; } |
54 | 54 |
55 // 'SVGSVGElement' functions | 55 // 'SVGSVGElement' functions |
56 const AtomicString& contentScriptType() const; | 56 const AtomicString& contentScriptType() const; |
57 void setContentScriptType(const AtomicString& type); | 57 void setContentScriptType(const AtomicString& type); |
58 | 58 |
59 const AtomicString& contentStyleType() const; | 59 const AtomicString& contentStyleType() const; |
60 void setContentStyleType(const AtomicString& type); | 60 void setContentStyleType(const AtomicString& type); |
61 | 61 |
62 FloatRect viewport() const; | 62 SVGRect viewport() const; |
63 | 63 |
64 float pixelUnitToMillimeterX() const; | 64 float pixelUnitToMillimeterX() const; |
65 float pixelUnitToMillimeterY() const; | 65 float pixelUnitToMillimeterY() const; |
66 float screenPixelToMillimeterX() const; | 66 float screenPixelToMillimeterX() const; |
67 float screenPixelToMillimeterY() const; | 67 float screenPixelToMillimeterY() const; |
68 | 68 |
69 bool useCurrentView() const { return m_useCurrentView; } | 69 bool useCurrentView() const { return m_useCurrentView; } |
70 SVGViewSpec* currentView(); | 70 SVGViewSpec* currentView(); |
71 | 71 |
72 enum ConsiderCSSMode { | 72 enum ConsiderCSSMode { |
73 RespectCSSProperties, | 73 RespectCSSProperties, |
74 IgnoreCSSProperties | 74 IgnoreCSSProperties |
75 }; | 75 }; |
76 | 76 |
77 // RenderSVGRoot wants to query the intrinsic size, by only examining the wi
dth/height attributes. | 77 // RenderSVGRoot wants to query the intrinsic size, by only examining the wi
dth/height attributes. |
78 Length intrinsicWidth(ConsiderCSSMode = RespectCSSProperties) const; | 78 Length intrinsicWidth(ConsiderCSSMode = RespectCSSProperties) const; |
79 Length intrinsicHeight(ConsiderCSSMode = RespectCSSProperties) const; | 79 Length intrinsicHeight(ConsiderCSSMode = RespectCSSProperties) const; |
80 FloatSize currentViewportSize() const; | 80 FloatSize currentViewportSize() const; |
81 FloatRect currentViewBoxRect() const; | 81 SVGRect currentViewBoxRect() const; |
82 | 82 |
83 float currentScale() const; | 83 float currentScale() const; |
84 void setCurrentScale(float scale); | 84 void setCurrentScale(float scale); |
85 | 85 |
86 SVGPoint& currentTranslate() { return m_translation; } | 86 SVGPoint& currentTranslate() { return m_translation; } |
87 void setCurrentTranslate(const FloatPoint&); | 87 void setCurrentTranslate(const FloatPoint&); |
88 | 88 |
89 // Only used from the bindings. | 89 // Only used from the bindings. |
90 void updateCurrentTranslate(); | 90 void updateCurrentTranslate(); |
91 | 91 |
92 SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); } | 92 SMILTimeContainer* timeContainer() const { return m_timeContainer.get(); } |
93 | 93 |
94 void pauseAnimations(); | 94 void pauseAnimations(); |
95 void unpauseAnimations(); | 95 void unpauseAnimations(); |
96 bool animationsPaused() const; | 96 bool animationsPaused() const; |
97 | 97 |
98 float getCurrentTime() const; | 98 float getCurrentTime() const; |
99 void setCurrentTime(float seconds); | 99 void setCurrentTime(float seconds); |
100 | 100 |
101 unsigned suspendRedraw(unsigned maxWaitMilliseconds); | 101 unsigned suspendRedraw(unsigned maxWaitMilliseconds); |
102 void unsuspendRedraw(unsigned suspendHandleId); | 102 void unsuspendRedraw(unsigned suspendHandleId); |
103 void unsuspendRedrawAll(); | 103 void unsuspendRedrawAll(); |
104 void forceRedraw(); | 104 void forceRedraw(); |
105 | 105 |
106 PassRefPtr<NodeList> getIntersectionList(const FloatRect&, SVGElement* refer
enceElement) const; | 106 PassRefPtr<NodeList> getIntersectionList(const SVGRect&, SVGElement* referen
ceElement) const; |
107 PassRefPtr<NodeList> getEnclosureList(const FloatRect&, SVGElement* referenc
eElement) const; | 107 PassRefPtr<NodeList> getEnclosureList(const SVGRect&, SVGElement* referenceE
lement) const; |
108 bool checkIntersection(SVGElement*, const FloatRect&) const; | 108 bool checkIntersection(SVGElement*, const SVGRect&) const; |
109 bool checkEnclosure(SVGElement*, const FloatRect&) const; | 109 bool checkEnclosure(SVGElement*, const SVGRect&) const; |
110 void deselectAll(); | 110 void deselectAll(); |
111 | 111 |
112 static float createSVGNumber(); | 112 static float createSVGNumber(); |
113 static SVGLength createSVGLength(); | 113 static SVGLength createSVGLength(); |
114 static SVGAngle createSVGAngle(); | 114 static SVGAngle createSVGAngle(); |
115 static SVGPoint createSVGPoint(); | 115 static SVGPoint createSVGPoint(); |
116 static SVGMatrix createSVGMatrix(); | 116 static SVGMatrix createSVGMatrix(); |
117 static FloatRect createSVGRect(); | 117 static SVGRect createSVGRect(); |
118 static SVGTransform createSVGTransform(); | 118 static SVGTransform createSVGTransform(); |
119 static SVGTransform createSVGTransformFromMatrix(const SVGMatrix&); | 119 static SVGTransform createSVGTransformFromMatrix(const SVGMatrix&); |
120 | 120 |
121 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; | 121 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; |
122 | 122 |
123 void setupInitialView(const String& fragmentIdentifier, Element* anchorNode)
; | 123 void setupInitialView(const String& fragmentIdentifier, Element* anchorNode)
; |
124 | 124 |
125 Element* getElementById(const AtomicString&) const; | 125 Element* getElementById(const AtomicString&) const; |
126 | 126 |
127 bool widthAttributeEstablishesViewport() const; | 127 bool widthAttributeEstablishesViewport() const; |
(...skipping 22 matching lines...) Expand all Loading... |
150 | 150 |
151 virtual bool selfHasRelativeLengths() const; | 151 virtual bool selfHasRelativeLengths() const; |
152 | 152 |
153 void inheritViewAttributes(SVGViewElement*); | 153 void inheritViewAttributes(SVGViewElement*); |
154 | 154 |
155 enum CollectIntersectionOrEnclosure { | 155 enum CollectIntersectionOrEnclosure { |
156 CollectIntersectionList, | 156 CollectIntersectionList, |
157 CollectEnclosureList | 157 CollectEnclosureList |
158 }; | 158 }; |
159 | 159 |
160 PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const FloatRect&, SV
GElement*, CollectIntersectionOrEnclosure) const; | 160 PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const SVGRect&, SVGE
lement*, CollectIntersectionOrEnclosure) const; |
161 | 161 |
162 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement) | 162 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement) |
163 DECLARE_ANIMATED_LENGTH(X, x) | 163 DECLARE_ANIMATED_LENGTH(X, x) |
164 DECLARE_ANIMATED_LENGTH(Y, y) | 164 DECLARE_ANIMATED_LENGTH(Y, y) |
165 DECLARE_ANIMATED_LENGTH(Width, width) | 165 DECLARE_ANIMATED_LENGTH(Width, width) |
166 DECLARE_ANIMATED_LENGTH(Height, height) | 166 DECLARE_ANIMATED_LENGTH(Height, height) |
167 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) | 167 DECLARE_ANIMATED_BOOLEAN(ExternalResourcesRequired, externalResourcesReq
uired) |
168 DECLARE_ANIMATED_RECT(ViewBox, viewBox) | 168 DECLARE_ANIMATED_RECT(ViewBox, viewBox) |
169 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) | 169 DECLARE_ANIMATED_PRESERVEASPECTRATIO(PreserveAspectRatio, preserveAspect
Ratio) |
170 END_DECLARE_ANIMATED_PROPERTIES | 170 END_DECLARE_ANIMATED_PROPERTIES |
(...skipping 10 matching lines...) Expand all Loading... |
181 inline SVGSVGElement* toSVGSVGElement(Node* node) | 181 inline SVGSVGElement* toSVGSVGElement(Node* node) |
182 { | 182 { |
183 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isSVGElement()); | 183 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->isSVGElement()); |
184 ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isSVGSVGElemen
t()); | 184 ASSERT_WITH_SECURITY_IMPLICATION(!node || toSVGElement(node)->isSVGSVGElemen
t()); |
185 return static_cast<SVGSVGElement*>(node); | 185 return static_cast<SVGSVGElement*>(node); |
186 } | 186 } |
187 | 187 |
188 } // namespace WebCore | 188 } // namespace WebCore |
189 | 189 |
190 #endif | 190 #endif |
OLD | NEW |