| 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, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 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" | 28 #include "core/svg/SVGAnimatedPreserveAspectRatio.h" |
| 29 #include "core/svg/SVGAnimatedRect.h" | 29 #include "core/svg/SVGAnimatedRect.h" |
| 30 #include "core/svg/SVGAnimatedTransformList.h" | 30 #include "core/svg/SVGAnimatedTransformList.h" |
| 31 #include "core/svg/SVGElement.h" |
| 31 #include "core/svg/SVGExternalResourcesRequired.h" | 32 #include "core/svg/SVGExternalResourcesRequired.h" |
| 32 #include "core/svg/SVGFitToViewBox.h" | 33 #include "core/svg/SVGFitToViewBox.h" |
| 33 #include "core/svg/SVGStyledElement.h" | |
| 34 #include "core/svg/SVGTests.h" | 34 #include "core/svg/SVGTests.h" |
| 35 #include "core/svg/SVGURIReference.h" | 35 #include "core/svg/SVGURIReference.h" |
| 36 #include "core/svg/SVGUnitTypes.h" | 36 #include "core/svg/SVGUnitTypes.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 struct PatternAttributes; | 40 struct PatternAttributes; |
| 41 | 41 |
| 42 class SVGPatternElement FINAL : public SVGStyledElement, | 42 class SVGPatternElement FINAL : public SVGElement, |
| 43 public SVGURIReference, | 43 public SVGURIReference, |
| 44 public SVGTests, | 44 public SVGTests, |
| 45 public SVGExternalResourcesRequired, | 45 public SVGExternalResourcesRequired, |
| 46 public SVGFitToViewBox { | 46 public SVGFitToViewBox { |
| 47 public: | 47 public: |
| 48 static PassRefPtr<SVGPatternElement> create(const QualifiedName&, Document*)
; | 48 static PassRefPtr<SVGPatternElement> create(const QualifiedName&, Document*)
; |
| 49 | 49 |
| 50 void collectPatternAttributes(PatternAttributes&) const; | 50 void collectPatternAttributes(PatternAttributes&) const; |
| 51 | 51 |
| 52 virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope
) const; | 52 virtual AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope
) const; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 SVGPatternElement(const QualifiedName&, Document*); | 55 SVGPatternElement(const QualifiedName&, Document*); |
| 56 | 56 |
| 57 virtual bool isValid() const { return SVGTests::isValid(); } | 57 virtual bool isValid() const { return SVGTests::isValid(); } |
| 58 virtual bool needsPendingResourceHandling() const { return false; } | 58 virtual bool needsPendingResourceHandling() const { return false; } |
| 59 | 59 |
| 60 bool isSupportedAttribute(const QualifiedName&); | 60 bool isSupportedAttribute(const QualifiedName&); |
| 61 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; | 61 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR
IDE; |
| 62 virtual void svgAttributeChanged(const QualifiedName&); | 62 virtual void svgAttributeChanged(const QualifiedName&); |
| 63 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); | 63 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0); |
| 64 | 64 |
| 65 virtual bool rendererIsNeeded(const NodeRenderingContext& context) OVERRIDE
{ return rendererIsNeededInternal(context); } |
| 65 virtual RenderObject* createRenderer(RenderStyle*); | 66 virtual RenderObject* createRenderer(RenderStyle*); |
| 66 | 67 |
| 67 virtual bool selfHasRelativeLengths() const; | 68 virtual bool selfHasRelativeLengths() const; |
| 68 | 69 |
| 69 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPatternElement) | 70 BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGPatternElement) |
| 70 DECLARE_ANIMATED_LENGTH(X, x) | 71 DECLARE_ANIMATED_LENGTH(X, x) |
| 71 DECLARE_ANIMATED_LENGTH(Y, y) | 72 DECLARE_ANIMATED_LENGTH(Y, y) |
| 72 DECLARE_ANIMATED_LENGTH(Width, width) | 73 DECLARE_ANIMATED_LENGTH(Width, width) |
| 73 DECLARE_ANIMATED_LENGTH(Height, height) | 74 DECLARE_ANIMATED_LENGTH(Height, height) |
| 74 DECLARE_ANIMATED_ENUMERATION(PatternUnits, patternUnits, SVGUnitTypes::S
VGUnitType) | 75 DECLARE_ANIMATED_ENUMERATION(PatternUnits, patternUnits, SVGUnitTypes::S
VGUnitType) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 88 | 89 |
| 89 inline SVGPatternElement* toSVGPatternElement(Node* node) | 90 inline SVGPatternElement* toSVGPatternElement(Node* node) |
| 90 { | 91 { |
| 91 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::pattern
Tag)); | 92 ASSERT_WITH_SECURITY_IMPLICATION(!node || node->hasTagName(SVGNames::pattern
Tag)); |
| 92 return static_cast<SVGPatternElement*>(node); | 93 return static_cast<SVGPatternElement*>(node); |
| 93 } | 94 } |
| 94 | 95 |
| 95 } // namespace WebCore | 96 } // namespace WebCore |
| 96 | 97 |
| 97 #endif | 98 #endif |
| OLD | NEW |