| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 | 117 |
| 120 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; | 118 AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) co
nst; |
| 121 | 119 |
| 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 bool hasEmptyViewBox() const { return m_viewBox->currentValue()->isValid() &
& m_viewBox->currentValue()->value().isEmpty(); } | |
| 130 | |
| 131 SVGAnimatedLength* x() const { return m_x.get(); } | 127 SVGAnimatedLength* x() const { return m_x.get(); } |
| 132 SVGAnimatedLength* y() const { return m_y.get(); } | 128 SVGAnimatedLength* y() const { return m_y.get(); } |
| 133 SVGAnimatedLength* width() const { return m_width.get(); } | 129 SVGAnimatedLength* width() const { return m_width.get(); } |
| 134 SVGAnimatedLength* height() const { return m_height.get(); } | 130 SVGAnimatedLength* height() const { return m_height.get(); } |
| 135 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); } | |
| 136 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() { return m_preserveAsp
ectRatio.get(); } | |
| 137 | 131 |
| 138 private: | 132 private: |
| 139 explicit SVGSVGElement(Document&); | 133 explicit SVGSVGElement(Document&); |
| 140 virtual ~SVGSVGElement(); | 134 virtual ~SVGSVGElement(); |
| 141 | 135 |
| 142 virtual bool isSVGSVGElement() const OVERRIDE { return true; } | 136 virtual bool isSVGSVGElement() const OVERRIDE { return true; } |
| 143 | 137 |
| 144 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 138 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 145 | 139 |
| 146 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; | 140 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 161 CollectIntersectionList, | 155 CollectIntersectionList, |
| 162 CollectEnclosureList | 156 CollectEnclosureList |
| 163 }; | 157 }; |
| 164 | 158 |
| 165 PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const FloatRect&, SV
GElement*, CollectIntersectionOrEnclosure) const; | 159 PassRefPtr<NodeList> collectIntersectionOrEnclosureList(const FloatRect&, SV
GElement*, CollectIntersectionOrEnclosure) const; |
| 166 | 160 |
| 167 RefPtr<SVGAnimatedLength> m_x; | 161 RefPtr<SVGAnimatedLength> m_x; |
| 168 RefPtr<SVGAnimatedLength> m_y; | 162 RefPtr<SVGAnimatedLength> m_y; |
| 169 RefPtr<SVGAnimatedLength> m_width; | 163 RefPtr<SVGAnimatedLength> m_width; |
| 170 RefPtr<SVGAnimatedLength> m_height; | 164 RefPtr<SVGAnimatedLength> m_height; |
| 171 RefPtr<SVGAnimatedRect> m_viewBox; | |
| 172 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | |
| 173 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement) | 165 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGSVGElement) |
| 174 END_DECLARE_ANIMATED_PROPERTIES | 166 END_DECLARE_ANIMATED_PROPERTIES |
| 175 | 167 |
| 176 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const OVERRIDE; | 168 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const OVERRIDE; |
| 177 | 169 |
| 178 bool m_useCurrentView; | 170 bool m_useCurrentView; |
| 179 RefPtr<SMILTimeContainer> m_timeContainer; | 171 RefPtr<SMILTimeContainer> m_timeContainer; |
| 180 RefPtr<SVGPoint> m_translation; | 172 RefPtr<SVGPoint> m_translation; |
| 181 RefPtr<SVGViewSpec> m_viewSpec; | 173 RefPtr<SVGViewSpec> m_viewSpec; |
| 182 | 174 |
| 183 friend class SVGCurrentTranslateTearOff; | 175 friend class SVGCurrentTranslateTearOff; |
| 184 }; | 176 }; |
| 185 | 177 |
| 186 inline bool isSVGSVGElement(const Node& node) | 178 inline bool isSVGSVGElement(const Node& node) |
| 187 { | 179 { |
| 188 return node.isSVGElement() && toSVGElement(node).isSVGSVGElement(); | 180 return node.isSVGElement() && toSVGElement(node).isSVGSVGElement(); |
| 189 } | 181 } |
| 190 | 182 |
| 191 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGSVGElement); | 183 DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGSVGElement); |
| 192 | 184 |
| 193 } // namespace WebCore | 185 } // namespace WebCore |
| 194 | 186 |
| 195 #endif | 187 #endif |
| OLD | NEW |