| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 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 SVGPatternElement_h | 21 #ifndef SVGPatternElement_h |
| 22 #define SVGPatternElement_h | 22 #define SVGPatternElement_h |
| 23 | 23 |
| 24 #include "SVGNames.h" | 24 #include "SVGNames.h" |
| 25 #include "core/svg/SVGAnimatedBoolean.h" | 25 #include "core/svg/SVGAnimatedBoolean.h" |
| 26 #include "core/svg/SVGAnimatedEnumeration.h" | 26 #include "core/svg/SVGAnimatedEnumeration.h" |
| 27 #include "core/svg/SVGAnimatedLength.h" | 27 #include "core/svg/SVGAnimatedLength.h" |
| 28 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" | |
| 29 #include "core/svg/SVGAnimatedRect.h" | |
| 30 #include "core/svg/SVGAnimatedTransformList.h" | 28 #include "core/svg/SVGAnimatedTransformList.h" |
| 31 #include "core/svg/SVGElement.h" | 29 #include "core/svg/SVGElement.h" |
| 32 #include "core/svg/SVGFitToViewBox.h" | 30 #include "core/svg/SVGFitToViewBox.h" |
| 33 #include "core/svg/SVGTests.h" | 31 #include "core/svg/SVGTests.h" |
| 34 #include "core/svg/SVGURIReference.h" | 32 #include "core/svg/SVGURIReference.h" |
| 35 #include "core/svg/SVGUnitTypes.h" | 33 #include "core/svg/SVGUnitTypes.h" |
| 36 | 34 |
| 37 namespace WebCore { | 35 namespace WebCore { |
| 38 | 36 |
| 39 struct PatternAttributes; | 37 struct PatternAttributes; |
| 40 | 38 |
| 41 class SVGPatternElement FINAL : public SVGElement, | 39 class SVGPatternElement FINAL : public SVGElement, |
| 42 public SVGURIReference, | 40 public SVGURIReference, |
| 43 public SVGTests, | 41 public SVGTests, |
| 44 public SVGFitToViewBox { | 42 public SVGFitToViewBox { |
| 45 public: | 43 public: |
| 46 static PassRefPtr<SVGPatternElement> create(Document&); | 44 static PassRefPtr<SVGPatternElement> create(Document&); |
| 47 | 45 |
| 48 void collectPatternAttributes(PatternAttributes&) const; | 46 void collectPatternAttributes(PatternAttributes&) const; |
| 49 | 47 |
| 50 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const OVERRIDE; | 48 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const OVERRIDE; |
| 51 | 49 |
| 52 SVGAnimatedLength* x() const { return m_x.get(); } | 50 SVGAnimatedLength* x() const { return m_x.get(); } |
| 53 SVGAnimatedLength* y() const { return m_y.get(); } | 51 SVGAnimatedLength* y() const { return m_y.get(); } |
| 54 SVGAnimatedLength* width() const { return m_width.get(); } | 52 SVGAnimatedLength* width() const { return m_width.get(); } |
| 55 SVGAnimatedLength* height() const { return m_height.get(); } | 53 SVGAnimatedLength* height() const { return m_height.get(); } |
| 56 SVGAnimatedRect* viewBox() const { return m_viewBox.get(); } | |
| 57 SVGAnimatedPreserveAspectRatio* preserveAspectRatio() const { return m_prese
rveAspectRatio.get(); } | |
| 58 SVGAnimatedString* href() { return m_href.get(); } | 54 SVGAnimatedString* href() { return m_href.get(); } |
| 59 | 55 |
| 60 private: | 56 private: |
| 61 explicit SVGPatternElement(Document&); | 57 explicit SVGPatternElement(Document&); |
| 62 | 58 |
| 63 virtual bool isValid() const OVERRIDE { return SVGTests::isValid(); } | 59 virtual bool isValid() const OVERRIDE { return SVGTests::isValid(); } |
| 64 virtual bool needsPendingResourceHandling() const OVERRIDE { return false; } | 60 virtual bool needsPendingResourceHandling() const OVERRIDE { return false; } |
| 65 | 61 |
| 66 bool isSupportedAttribute(const QualifiedName&); | 62 bool isSupportedAttribute(const QualifiedName&); |
| 67 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 63 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 68 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; | 64 virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE; |
| 69 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; | 65 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
| 70 | 66 |
| 71 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; | 67 virtual RenderObject* createRenderer(RenderStyle*) OVERRIDE; |
| 72 | 68 |
| 73 virtual bool selfHasRelativeLengths() const OVERRIDE; | 69 virtual bool selfHasRelativeLengths() const OVERRIDE; |
| 74 | 70 |
| 75 RefPtr<SVGAnimatedLength> m_x; | 71 RefPtr<SVGAnimatedLength> m_x; |
| 76 RefPtr<SVGAnimatedLength> m_y; | 72 RefPtr<SVGAnimatedLength> m_y; |
| 77 RefPtr<SVGAnimatedLength> m_width; | 73 RefPtr<SVGAnimatedLength> m_width; |
| 78 RefPtr<SVGAnimatedLength> m_height; | 74 RefPtr<SVGAnimatedLength> m_height; |
| 79 RefPtr<SVGAnimatedRect> m_viewBox; | |
| 80 RefPtr<SVGAnimatedPreserveAspectRatio> m_preserveAspectRatio; | |
| 81 RefPtr<SVGAnimatedString> m_href; | 75 RefPtr<SVGAnimatedString> m_href; |
| 82 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPatternElement) | 76 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPatternElement) |
| 83 DECLARE_ANIMATED_ENUMERATION(PatternUnits, patternUnits, SVGUnitTypes::S
VGUnitType) | 77 DECLARE_ANIMATED_ENUMERATION(PatternUnits, patternUnits, SVGUnitTypes::S
VGUnitType) |
| 84 DECLARE_ANIMATED_ENUMERATION(PatternContentUnits, patternContentUnits, S
VGUnitTypes::SVGUnitType) | 78 DECLARE_ANIMATED_ENUMERATION(PatternContentUnits, patternContentUnits, S
VGUnitTypes::SVGUnitType) |
| 85 DECLARE_ANIMATED_TRANSFORM_LIST(PatternTransform, patternTransform) | 79 DECLARE_ANIMATED_TRANSFORM_LIST(PatternTransform, patternTransform) |
| 86 END_DECLARE_ANIMATED_PROPERTIES | 80 END_DECLARE_ANIMATED_PROPERTIES |
| 87 }; | 81 }; |
| 88 | 82 |
| 89 DEFINE_NODE_TYPE_CASTS(SVGPatternElement, hasTagName(SVGNames::patternTag)); | 83 DEFINE_NODE_TYPE_CASTS(SVGPatternElement, hasTagName(SVGNames::patternTag)); |
| 90 | 84 |
| 91 } // namespace WebCore | 85 } // namespace WebCore |
| 92 | 86 |
| 93 #endif | 87 #endif |
| OLD | NEW |