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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGLength.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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 Rob Buis <buis@kde.org> 3 * Copyright (C) 2004, 2005, 2006 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 19 matching lines...) Expand all
30 namespace blink { 30 namespace blink {
31 31
32 class QualifiedName; 32 class QualifiedName;
33 33
34 class SVGLengthTearOff; 34 class SVGLengthTearOff;
35 35
36 class SVGLength final : public SVGPropertyBase { 36 class SVGLength final : public SVGPropertyBase {
37 public: 37 public:
38 typedef SVGLengthTearOff TearOffType; 38 typedef SVGLengthTearOff TearOffType;
39 39
40 static PassRefPtrWillBeRawPtr<SVGLength> create(SVGLengthMode mode = SVGLeng thMode::Other) 40 static RawPtr<SVGLength> create(SVGLengthMode mode = SVGLengthMode::Other)
41 { 41 {
42 return adoptRefWillBeNoop(new SVGLength(mode)); 42 return new SVGLength(mode);
43 } 43 }
44 44
45 DECLARE_VIRTUAL_TRACE(); 45 DECLARE_VIRTUAL_TRACE();
46 46
47 PassRefPtrWillBeRawPtr<SVGLength> clone() const; 47 RawPtr<SVGLength> clone() const;
48 PassRefPtrWillBeRawPtr<SVGPropertyBase> cloneForAnimation(const String&) con st override; 48 RawPtr<SVGPropertyBase> cloneForAnimation(const String&) const override;
49 49
50 CSSPrimitiveValue::UnitType typeWithCalcResolved() const { return m_value->t ypeWithCalcResolved(); } 50 CSSPrimitiveValue::UnitType typeWithCalcResolved() const { return m_value->t ypeWithCalcResolved(); }
51 void setUnitType(CSSPrimitiveValue::UnitType); 51 void setUnitType(CSSPrimitiveValue::UnitType);
52 SVGLengthMode unitMode() const { return static_cast<SVGLengthMode>(m_unitMod e); } 52 SVGLengthMode unitMode() const { return static_cast<SVGLengthMode>(m_unitMod e); }
53 53
54 bool operator==(const SVGLength&) const; 54 bool operator==(const SVGLength&) const;
55 bool operator!=(const SVGLength& other) const { return !operator==(other); } 55 bool operator!=(const SVGLength& other) const { return !operator==(other); }
56 56
57 float value(const SVGLengthContext&) const; 57 float value(const SVGLengthContext&) const;
58 void setValue(float, const SVGLengthContext&); 58 void setValue(float, const SVGLengthContext&);
(...skipping 25 matching lines...) Expand all
84 inline bool isRelative() const { return CSSPrimitiveValue::isRelativeUnit(m_ value->typeWithCalcResolved()); } 84 inline bool isRelative() const { return CSSPrimitiveValue::isRelativeUnit(m_ value->typeWithCalcResolved()); }
85 85
86 bool isZero() const 86 bool isZero() const
87 { 87 {
88 return m_value->getFloatValue() == 0; 88 return m_value->getFloatValue() == 0;
89 } 89 }
90 90
91 static SVGLengthMode lengthModeForAnimatedLengthAttribute(const QualifiedNam e&); 91 static SVGLengthMode lengthModeForAnimatedLengthAttribute(const QualifiedNam e&);
92 static bool negativeValuesForbiddenForAnimatedLengthAttribute(const Qualifie dName&); 92 static bool negativeValuesForbiddenForAnimatedLengthAttribute(const Qualifie dName&);
93 93
94 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; 94 void add(RawPtr<SVGPropertyBase>, SVGElement*) override;
95 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio nValue, SVGElement* contextElement) override; 95 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, RawPtr<SVGPropertyBase> from, RawPtr<SVGPropertyBase> to, RawPtr<S VGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement) override;
96 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme nt* contextElement) override; 96 float calculateDistance(RawPtr<SVGPropertyBase> to, SVGElement* contextEleme nt) override;
97 97
98 static AnimatedPropertyType classType() { return AnimatedLength; } 98 static AnimatedPropertyType classType() { return AnimatedLength; }
99 99
100 private: 100 private:
101 SVGLength(SVGLengthMode); 101 SVGLength(SVGLengthMode);
102 SVGLength(const SVGLength&); 102 SVGLength(const SVGLength&);
103 103
104 RefPtrWillBeMember<CSSPrimitiveValue> m_value; 104 Member<CSSPrimitiveValue> m_value;
105 unsigned m_unitMode : 2; 105 unsigned m_unitMode : 2;
106 }; 106 };
107 107
108 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGLength); 108 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGLength);
109 109
110 } // namespace blink 110 } // namespace blink
111 111
112 #endif // SVGLength_h 112 #endif // SVGLength_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGIntegerOptionalInteger.cpp ('k') | third_party/WebKit/Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698