Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Side by Side Diff: Source/core/svg/SVGGraphicsElement.h

Issue 660653004: Move supplemental transform to rare data (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGElementRareData.cpp ('k') | Source/core/svg/SVGGraphicsElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 PassRefPtr<SVGMatrixTearOff> getCTMFromJavascript(); 45 PassRefPtr<SVGMatrixTearOff> getCTMFromJavascript();
46 PassRefPtr<SVGMatrixTearOff> getScreenCTMFromJavascript(); 46 PassRefPtr<SVGMatrixTearOff> getScreenCTMFromJavascript();
47 47
48 PassRefPtr<SVGMatrixTearOff> getTransformToElement(SVGElement*, ExceptionSta te&); 48 PassRefPtr<SVGMatrixTearOff> getTransformToElement(SVGElement*, ExceptionSta te&);
49 49
50 SVGElement* nearestViewportElement() const; 50 SVGElement* nearestViewportElement() const;
51 SVGElement* farthestViewportElement() const; 51 SVGElement* farthestViewportElement() const;
52 52
53 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const override { return animatedLocalTransform(); } 53 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope) const override { return animatedLocalTransform(); }
54 virtual AffineTransform animatedLocalTransform() const; 54 virtual AffineTransform animatedLocalTransform() const;
55 virtual AffineTransform* supplementalTransform() override; 55 virtual AffineTransform* animateMotionTransform() override;
56 56
57 virtual FloatRect getBBox(); 57 virtual FloatRect getBBox();
58 PassRefPtr<SVGRectTearOff> getBBoxFromJavascript(); 58 PassRefPtr<SVGRectTearOff> getBBoxFromJavascript();
59 59
60 // "base class" methods for all the elements which render as paths 60 // "base class" methods for all the elements which render as paths
61 virtual void toClipPath(Path&); 61 virtual void toClipPath(Path&);
62 virtual RenderObject* createRenderer(RenderStyle*) override; 62 virtual RenderObject* createRenderer(RenderStyle*) override;
63 63
64 virtual bool isValid() const override final { return SVGTests::isValid(); } 64 virtual bool isValid() const override final { return SVGTests::isValid(); }
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 protected: 72 protected:
73 SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = Creat eSVGElement); 73 SVGGraphicsElement(const QualifiedName&, Document&, ConstructionType = Creat eSVGElement);
74 74
75 virtual bool supportsFocus() const override { return Element::supportsFocus( ) || hasFocusEventListeners(); } 75 virtual bool supportsFocus() const override { return Element::supportsFocus( ) || hasFocusEventListeners(); }
76 76
77 bool isSupportedAttribute(const QualifiedName&); 77 bool isSupportedAttribute(const QualifiedName&);
78 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; 78 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide;
79 virtual void svgAttributeChanged(const QualifiedName&) override; 79 virtual void svgAttributeChanged(const QualifiedName&) override;
80 80
81 RefPtr<SVGAnimatedTransformList> m_transform; 81 RefPtr<SVGAnimatedTransformList> m_transform;
82 82
83 private: 83 private:
84 virtual bool isSVGGraphicsElement() const override final { return true; } 84 virtual bool isSVGGraphicsElement() const override final { return true; }
85
86 // Used by <animateMotion>
87 OwnPtr<AffineTransform> m_supplementalTransform;
88 }; 85 };
89 86
90 inline bool isSVGGraphicsElement(const SVGElement& element) 87 inline bool isSVGGraphicsElement(const SVGElement& element)
91 { 88 {
92 return element.isSVGGraphicsElement(); 89 return element.isSVGGraphicsElement();
93 } 90 }
94 91
95 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement); 92 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGGraphicsElement);
96 93
97 } // namespace blink 94 } // namespace blink
98 95
99 #endif // SVGGraphicsElement_h 96 #endif // SVGGraphicsElement_h
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElementRareData.cpp ('k') | Source/core/svg/SVGGraphicsElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698