| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 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 * Copyright (C) 2014 Google, Inc. | 4 * Copyright (C) 2014 Google, Inc. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 class AffineTransform; | 34 class AffineTransform; |
| 35 class Path; | 35 class Path; |
| 36 class SVGMatrixTearOff; | 36 class SVGMatrixTearOff; |
| 37 | 37 |
| 38 class CORE_EXPORT SVGGraphicsElement : public SVGElement, public SVGTests { | 38 class CORE_EXPORT SVGGraphicsElement : public SVGElement, public SVGTests { |
| 39 DEFINE_WRAPPERTYPEINFO(); | 39 DEFINE_WRAPPERTYPEINFO(); |
| 40 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGGraphicsElement); | 40 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGGraphicsElement); |
| 41 public: | 41 public: |
| 42 virtual ~SVGGraphicsElement(); | 42 ~SVGGraphicsElement() override; |
| 43 | 43 |
| 44 enum StyleUpdateStrategy { AllowStyleUpdate, DisallowStyleUpdate }; | 44 enum StyleUpdateStrategy { AllowStyleUpdate, DisallowStyleUpdate }; |
| 45 | 45 |
| 46 AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate); | 46 AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate); |
| 47 AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate); | 47 AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate); |
| 48 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getCTMFromJavascript(); | 48 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getCTMFromJavascript(); |
| 49 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getScreenCTMFromJavascript(); | 49 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getScreenCTMFromJavascript(); |
| 50 | 50 |
| 51 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getTransformToElement(SVGElement*,
ExceptionState&); | 51 PassRefPtrWillBeRawPtr<SVGMatrixTearOff> getTransformToElement(SVGElement*,
ExceptionState&); |
| 52 | 52 |
| 53 SVGElement* nearestViewportElement() const; | 53 SVGElement* nearestViewportElement() const; |
| 54 SVGElement* farthestViewportElement() const; | 54 SVGElement* farthestViewportElement() const; |
| 55 | 55 |
| 56 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const override { return calculateAnimatedLocalTransform(); } | 56 AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const ov
erride { return calculateAnimatedLocalTransform(); } |
| 57 bool hasAnimatedLocalTransform() const; | 57 bool hasAnimatedLocalTransform() const; |
| 58 AffineTransform calculateAnimatedLocalTransform() const; | 58 AffineTransform calculateAnimatedLocalTransform() const; |
| 59 virtual AffineTransform* animateMotionTransform() override; | 59 AffineTransform* animateMotionTransform() override; |
| 60 | 60 |
| 61 virtual FloatRect getBBox(); | 61 virtual FloatRect getBBox(); |
| 62 PassRefPtrWillBeRawPtr<SVGRectTearOff> getBBoxFromJavascript(); | 62 PassRefPtrWillBeRawPtr<SVGRectTearOff> getBBoxFromJavascript(); |
| 63 | 63 |
| 64 virtual bool isValid() const override final { return SVGTests::isValid(docum
ent()); } | 64 bool isValid() const final { return SVGTests::isValid(document()); } |
| 65 | 65 |
| 66 SVGAnimatedTransformList* transform() { return m_transform.get(); } | 66 SVGAnimatedTransformList* transform() { return m_transform.get(); } |
| 67 const SVGAnimatedTransformList* transform() const { return m_transform.get()
; } | 67 const SVGAnimatedTransformList* transform() const { return m_transform.get()
; } |
| 68 | 68 |
| 69 AffineTransform computeCTM(SVGElement::CTMScope mode, SVGGraphicsElement::St
yleUpdateStrategy, | 69 AffineTransform computeCTM(SVGElement::CTMScope mode, SVGGraphicsElement::St
yleUpdateStrategy, |
| 70 const SVGGraphicsElement* ancestor = 0) const; | 70 const SVGGraphicsElement* ancestor = 0) const; |
| 71 | 71 |
| 72 DECLARE_VIRTUAL_TRACE(); | 72 DECLARE_VIRTUAL_TRACE(); |
| 73 | 73 |
| 74 protected: | 74 protected: |
| 75 SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = Creat
eSVGElement); | 75 SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = Creat
eSVGElement); |
| 76 | 76 |
| 77 virtual bool supportsFocus() const override { return Element::supportsFocus(
) || hasFocusEventListeners(); } | 77 bool supportsFocus() const override { return Element::supportsFocus() || has
FocusEventListeners(); } |
| 78 | 78 |
| 79 virtual void svgAttributeChanged(const QualifiedName&) override; | 79 void svgAttributeChanged(const QualifiedName&) override; |
| 80 | 80 |
| 81 RefPtrWillBeMember<SVGAnimatedTransformList> m_transform; | 81 RefPtrWillBeMember<SVGAnimatedTransformList> m_transform; |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 virtual bool isSVGGraphicsElement() const override final { return true; } | 84 bool isSVGGraphicsElement() const final { return true; } |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 inline bool isSVGGraphicsElement(const SVGElement& element) | 87 inline bool isSVGGraphicsElement(const SVGElement& element) |
| 88 { | 88 { |
| 89 return element.isSVGGraphicsElement(); | 89 return element.isSVGGraphicsElement(); |
| 90 } | 90 } |
| 91 | 91 |
| 92 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement); | 92 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement); |
| 93 | 93 |
| 94 } // namespace blink | 94 } // namespace blink |
| 95 | 95 |
| 96 #endif // SVGGraphicsElement_h | 96 #endif // SVGGraphicsElement_h |
| OLD | NEW |