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

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGRect.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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 15 matching lines...) Expand all
26 #include "wtf/Allocator.h" 26 #include "wtf/Allocator.h"
27 27
28 namespace blink { 28 namespace blink {
29 29
30 class SVGRectTearOff; 30 class SVGRectTearOff;
31 31
32 class SVGRect : public SVGPropertyHelper<SVGRect> { 32 class SVGRect : public SVGPropertyHelper<SVGRect> {
33 public: 33 public:
34 typedef SVGRectTearOff TearOffType; 34 typedef SVGRectTearOff TearOffType;
35 35
36 static PassRefPtrWillBeRawPtr<SVGRect> create() 36 static RawPtr<SVGRect> create()
37 { 37 {
38 return adoptRefWillBeNoop(new SVGRect()); 38 return new SVGRect();
39 } 39 }
40 40
41 static PassRefPtrWillBeRawPtr<SVGRect> createInvalid() 41 static RawPtr<SVGRect> createInvalid()
42 { 42 {
43 RefPtrWillBeRawPtr<SVGRect> rect = adoptRefWillBeNoop(new SVGRect()); 43 RawPtr<SVGRect> rect = new SVGRect();
44 rect->setInvalid(); 44 rect->setInvalid();
45 return rect.release(); 45 return rect.release();
46 } 46 }
47 47
48 static PassRefPtrWillBeRawPtr<SVGRect> create(const FloatRect& rect) 48 static RawPtr<SVGRect> create(const FloatRect& rect)
49 { 49 {
50 return adoptRefWillBeNoop(new SVGRect(rect)); 50 return new SVGRect(rect);
51 } 51 }
52 52
53 PassRefPtrWillBeRawPtr<SVGRect> clone() const; 53 RawPtr<SVGRect> clone() const;
54 54
55 const FloatRect& value() const { return m_value; } 55 const FloatRect& value() const { return m_value; }
56 void setValue(const FloatRect& v) { m_value = v; } 56 void setValue(const FloatRect& v) { m_value = v; }
57 57
58 float x() const { return m_value.x(); } 58 float x() const { return m_value.x(); }
59 float y() const { return m_value.y(); } 59 float y() const { return m_value.y(); }
60 float width() const { return m_value.width(); } 60 float width() const { return m_value.width(); }
61 float height() const { return m_value.height(); } 61 float height() const { return m_value.height(); }
62 void setX(float f) { m_value.setX(f); } 62 void setX(float f) { m_value.setX(f); }
63 void setY(float f) { m_value.setY(f); } 63 void setY(float f) { m_value.setY(f); }
64 void setWidth(float f) { m_value.setWidth(f); } 64 void setWidth(float f) { m_value.setWidth(f); }
65 void setHeight(float f) { m_value.setHeight(f); } 65 void setHeight(float f) { m_value.setHeight(f); }
66 66
67 String valueAsString() const override; 67 String valueAsString() const override;
68 SVGParsingError setValueAsString(const String&); 68 SVGParsingError setValueAsString(const String&);
69 69
70 void add(PassRefPtrWillBeRawPtr<SVGPropertyBase>, SVGElement*) override; 70 void add(RawPtr<SVGPropertyBase>, SVGElement*) override;
71 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, PassRefPtrWillBeRawPtr<SVGPropertyBase> from, PassRefPtrWillBeRawP tr<SVGPropertyBase> to, PassRefPtrWillBeRawPtr<SVGPropertyBase> toAtEndOfDuratio nValue, SVGElement* contextElement) override; 71 void calculateAnimatedValue(SVGAnimationElement*, float percentage, unsigned repeatCount, RawPtr<SVGPropertyBase> from, RawPtr<SVGPropertyBase> to, RawPtr<S VGPropertyBase> toAtEndOfDurationValue, SVGElement* contextElement) override;
72 float calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVGEleme nt* contextElement) override; 72 float calculateDistance(RawPtr<SVGPropertyBase> to, SVGElement* contextEleme nt) override;
73 73
74 bool isValid() const { return m_isValid; } 74 bool isValid() const { return m_isValid; }
75 void setInvalid(); 75 void setInvalid();
76 76
77 static AnimatedPropertyType classType() { return AnimatedRect; } 77 static AnimatedPropertyType classType() { return AnimatedRect; }
78 78
79 private: 79 private:
80 SVGRect(); 80 SVGRect();
81 SVGRect(const FloatRect&); 81 SVGRect(const FloatRect&);
82 82
83 template<typename CharType> 83 template<typename CharType>
84 SVGParsingError parse(const CharType*& ptr, const CharType* end); 84 SVGParsingError parse(const CharType*& ptr, const CharType* end);
85 85
86 bool m_isValid; 86 bool m_isValid;
87 FloatRect m_value; 87 FloatRect m_value;
88 }; 88 };
89 89
90 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGRect); 90 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGRect);
91 91
92 } // namespace blink 92 } // namespace blink
93 93
94 #endif // SVGRect_h 94 #endif // SVGRect_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGRadialGradientElement.cpp ('k') | third_party/WebKit/Source/core/svg/SVGRect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698