| 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, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #ifndef SVGSVGElement_h | 21 #ifndef SVGSVGElement_h |
| 22 #define SVGSVGElement_h | 22 #define SVGSVGElement_h |
| 23 | 23 |
| 24 #include "core/svg/SVGAnimatedBoolean.h" | 24 #include "core/svg/SVGAnimatedBoolean.h" |
| 25 #include "core/svg/SVGAnimatedLength.h" | 25 #include "core/svg/SVGAnimatedLength.h" |
| 26 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" | |
| 27 #include "core/svg/SVGAnimatedRect.h" | |
| 28 #include "core/svg/SVGFitToViewBox.h" | 26 #include "core/svg/SVGFitToViewBox.h" |
| 29 #include "core/svg/SVGGraphicsElement.h" | 27 #include "core/svg/SVGGraphicsElement.h" |
| 30 #include "core/svg/SVGLengthTearOff.h" | 28 #include "core/svg/SVGLengthTearOff.h" |
| 31 #include "core/svg/SVGPointTearOff.h" | 29 #include "core/svg/SVGPointTearOff.h" |
| 32 #include "core/svg/SVGZoomAndPan.h" | 30 #include "core/svg/SVGZoomAndPan.h" |
| 33 | 31 |
| 34 namespace WebCore { | 32 namespace WebCore { |
| 35 | 33 |
| 36 class SVGAngle; | 34 class SVGAngle; |
| 37 class SVGMatrix; | 35 class SVGMatrix; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 void setupInitialView(const String& fragmentIdentifier, Element* anchorNode)
; | 120 void setupInitialView(const String& fragmentIdentifier, Element* anchorNode)
; |
| 123 | 121 |
| 124 Element* getElementById(const AtomicString&) const; | 122 Element* getElementById(const AtomicString&) const; |
| 125 | 123 |
| 126 bool widthAttributeEstablishesViewport() const; | 124 bool widthAttributeEstablishesViewport() const; |
| 127 bool heightAttributeEstablishesViewport() const; | 125 bool heightAttributeEstablishesViewport() const; |
| 128 | 126 |
| 129 SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; } | 127 SVGZoomAndPanType zoomAndPan() const { return m_zoomAndPan; } |
| 130 void setZoomAndPan(unsigned short zoomAndPan) { m_zoomAndPan = SVGZoomAndPan
::parseFromNumber(zoomAndPan); } | 128 void setZoomAndPan(unsigned short zoomAndPan) { m_zoomAndPan = SVGZoomAndPan
::parseFromNumber(zoomAndPan); } |
| 131 | 129 |
| 132 bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() &
& m_viewBox->currentValue()->value().isEmpty(); } | |
| 133 | |
| 134 SVGAnimatedLength* x() const { return m_x.get(); } | 130 SVGAnimatedLength* x() const { return m_x.get(); } |
| 135 SVGAnimatedLength* y() const { return m_y.get(); } | 131 SVGAnimatedLength* y() const { return m_y.get(); } |
| 136 SVGAnimatedLength* width() const { return m_width.get(); } | 132 SVGAnimatedLength* width() const { return m_width.get(); } |
| 137 SVGAnimatedLength* height() const { return m_height.get(); } | 133 SVGAnimatedLength* height() const { return m_height.get(); } |
| 138 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); } | |
| 139 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAsp
ectRatio.get(); } | |
| 140 | 134 |
| 141 private: | 135 private: |
| 142 explicit SVGSVGElement(Document&); | 136 explicit SVGSVGElement(Document&); |
| 143 virtual ~SVGSVGElement(); | 137 virtual ~SVGSVGElement(); |
| 144 | 138 |
| 145 virtual bool isSVGSVGElement() const OVERRIDE { return true; } | 139 virtual bool isSVGSVGElement() const OVERRIDE { return true; } |
| 146 | 140 |
| 147 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 141 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 148 | 142 |
| 149 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; | 143 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 164 CollectIntersectionList, | 158 CollectIntersectionList, |
| 165 CollectEnclosureList | 159 CollectEnclosureList |
| 166 }; | 160 }; |
| 167 | 161 |
| 168 PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const FloatRect&, SV
GElement*, CollectIntersectionOrEnclosure) const; | 162 PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const FloatRect&, SV
GElement*, CollectIntersectionOrEnclosure) const; |
| 169 | 163 |
| 170 RefPtr<SVGAnimatedLength> m_x; | 164 RefPtr<SVGAnimatedLength> m_x; |
| 171 RefPtr<SVGAnimatedLength> m_y; | 165 RefPtr<SVGAnimatedLength> m_y; |
| 172 RefPtr<SVGAnimatedLength> m_width; | 166 RefPtr<SVGAnimatedLength> m_width; |
| 173 RefPtr<SVGAnimatedLength> m_height; | 167 RefPtr<SVGAnimatedLength> m_height; |
| 174 RefPtr<SVGAnimatedRect> m_viewBox; | |
| 175 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | |
| 176 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement) | 168 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement) |
| 177 END_DECLARE_ANIMATED_PROPERTIES | 169 END_DECLARE_ANIMATED_PROPERTIES |
| 178 | 170 |
| 179 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const OVERRIDE; | 171 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const OVERRIDE; |
| 180 | 172 |
| 181 bool m_useCurrentView; | 173 bool m_useCurrentView; |
| 182 SVGZoomAndPanType m_zoomAndPan; | 174 SVGZoomAndPanType m_zoomAndPan; |
| 183 RefPtr<SMILTimeContainer> m_timeContainer; | 175 RefPtr<SMILTimeContainer> m_timeContainer; |
| 184 RefPtr<SVGPoint> m_translation; | 176 RefPtr<SVGPoint> m_translation; |
| 185 RefPtr<SVGViewSpec> m_viewSpec; | 177 RefPtr<SVGViewSpec> m_viewSpec; |
| 186 | 178 |
| 187 friend class SVGCurrentTranslateTearOff; | 179 friend class SVGCurrentTranslateTearOff; |
| 188 }; | 180 }; |
| 189 | 181 |
| 190 inline bool isSVGSVGElement(const Node& node) | 182 inline bool isSVGSVGElement(const Node& node) |
| 191 { | 183 { |
| 192 return node.isSVGElement() && toSVGElement(node).isSVGSVGElement(); | 184 return node.isSVGElement() && toSVGElement(node).isSVGSVGElement(); |
| 193 } | 185 } |
| 194 | 186 |
| 195 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGSVGElement); | 187 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGSVGElement); |
| 196 | 188 |
| 197 } // namespace WebCore | 189 } // namespace WebCore |
| 198 | 190 |
| 199 #endif | 191 #endif |
| OLD | NEW |