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

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

Issue 2113943003: SVGLength.value setter should set the value to <number> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Align with review comments Created 4 years, 5 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
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&);
59 void setValueAsNumber(float);
59 60
60 float valueInSpecifiedUnits() const { return m_value->getFloatValue(); } 61 float valueInSpecifiedUnits() const { return m_value->getFloatValue(); }
61 void setValueInSpecifiedUnits(float value) 62 void setValueInSpecifiedUnits(float value)
62 { 63 {
63 m_value = CSSPrimitiveValue::create(value, m_value->typeWithCalcResolved ()); 64 m_value = CSSPrimitiveValue::create(value, m_value->typeWithCalcResolved ());
64 } 65 }
65 66
66 CSSPrimitiveValue* asCSSPrimitiveValue() const { return m_value.get(); } 67 CSSPrimitiveValue* asCSSPrimitiveValue() const { return m_value.get(); }
67 68
68 // Resolves LengthTypePercentage into a normalized floating point number (fu ll value is 1.0). 69 // Resolves LengthTypePercentage into a normalized floating point number (fu ll value is 1.0).
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 105
105 Member<CSSPrimitiveValue> m_value; 106 Member<CSSPrimitiveValue> m_value;
106 unsigned m_unitMode : 2; 107 unsigned m_unitMode : 2;
107 }; 108 };
108 109
109 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGLength); 110 DEFINE_SVG_PROPERTY_TYPE_CASTS(SVGLength);
110 111
111 } // namespace blink 112 } // namespace blink
112 113
113 #endif // SVGLength_h 114 #endif // SVGLength_h
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/svg/dom/SVGLength-value-setter.html ('k') | third_party/WebKit/Source/core/svg/SVGLength.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698