/*
* Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
* Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
+ * Copyright (C) 2014 Google, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
class AffineTransform;
class Path;
+class SVGMatrixTearOff;
class SVGGraphicsElement : public SVGElement, public SVGTests {
public:
AffineTransform getCTM(StyleUpdateStrategy = AllowStyleUpdate);
AffineTransform getScreenCTM(StyleUpdateStrategy = AllowStyleUpdate);
- AffineTransform getTransformToElement(SVGElement*, ExceptionState&);
+ PassRefPtr<SVGMatrixTearOff> getCTMFromJavascript();
+ PassRefPtr<SVGMatrixTearOff> getScreenCTMFromJavascript();
+
+ PassRefPtr<SVGMatrixTearOff> getTransformToElement(SVGElement*, ExceptionState&);
+
SVGElement* nearestViewportElement() const;
SVGElement* farthestViewportElement() const;
virtual AffineTransform* supplementalTransform() OVERRIDE;
virtual FloatRect getBBox();
- FloatRect getStrokeBBox();
-
PassRefPtr<SVGRectTearOff> getBBoxFromJavascript();
- PassRefPtr<SVGRectTearOff> getStrokeBBoxFromJavascript();
// "base class" methods for all the elements which render as paths
virtual void toClipPath(Path&);
virtual bool isValid() const OVERRIDE FINAL { return SVGTests::isValid(); }
+ SVGAnimatedTransformList* transform() { return m_transform.get(); }
+ const SVGAnimatedTransformList* transform() const { return m_transform.get(); }
+
+ AffineTransform computeCTM(SVGElement::CTMScope mode, SVGGraphicsElement::StyleUpdateStrategy,
+ const SVGGraphicsElement* ancestor = 0) const;
+
protected:
SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = CreateSVGElement);
+ virtual bool supportsFocus() const OVERRIDE { return Element::supportsFocus() || hasFocusEventListeners(); }
+
bool isSupportedAttribute(const QualifiedName&);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual void svgAttributeChanged(const QualifiedName&) OVERRIDE;
- BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGGraphicsElement)
- DECLARE_ANIMATED_TRANSFORM_LIST(Transform, transform)
- END_DECLARE_ANIMATED_PROPERTIES
+ RefPtr<SVGAnimatedTransformList> m_transform;
private:
virtual bool isSVGGraphicsElement() const OVERRIDE FINAL { return true; }
- // SVGTests
- virtual void synchronizeRequiredFeatures() OVERRIDE FINAL { SVGTests::synchronizeRequiredFeatures(this); }
- virtual void synchronizeRequiredExtensions() OVERRIDE FINAL { SVGTests::synchronizeRequiredExtensions(this); }
- virtual void synchronizeSystemLanguage() OVERRIDE FINAL { SVGTests::synchronizeSystemLanguage(this); }
-
// Used by <animateMotion>
OwnPtr<AffineTransform> m_supplementalTransform;
};
return node.isSVGElement() && toSVGElement(node).isSVGGraphicsElement();
}
-DEFINE_NODE_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement);
+DEFINE_ELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement);
} // namespace WebCore