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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/NumberValue.h

Issue 1642473002: Revert "Update StyleValue.cssString() to use existing methods instead of rolling our… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make sure it compiles Created 4 years, 10 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NumberValue_h 5 #ifndef NumberValue_h
6 #define NumberValue_h 6 #define NumberValue_h
7 7
8 #include "bindings/core/v8/ScriptWrappable.h" 8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/CoreExport.h" 9 #include "core/CoreExport.h"
10 #include "core/css/CSSPrimitiveValue.h" 10 #include "core/css/CSSPrimitiveValue.h"
(...skipping 10 matching lines...) Expand all
21 { 21 {
22 return new NumberValue(value); 22 return new NumberValue(value);
23 } 23 }
24 24
25 double value() const { return m_value; } 25 double value() const { return m_value; }
26 void setValue(double value) 26 void setValue(double value)
27 { 27 {
28 m_value = value; 28 m_value = value;
29 } 29 }
30 30
31 String cssString() const override { return String::number(m_value); }
32
31 PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const override 33 PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const override
32 { 34 {
33 return cssValuePool().createValue(m_value, CSSPrimitiveValue::UnitType:: 35 return cssValuePool().createValue(m_value, CSSPrimitiveValue::UnitType::
34 Number); 36 Number);
35 } 37 }
36 38
37 StyleValueType type() const override { return StyleValueType::NumberType; } 39 StyleValueType type() const override { return StyleValueType::NumberType; }
38 private: 40 private:
39 NumberValue(double value) : m_value(value) {} 41 NumberValue(double value) : m_value(value) {}
40 42
41 double m_value; 43 double m_value;
42 }; 44 };
43 45
44 } // namespace blink 46 } // namespace blink
45 47
46 #endif 48 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/LengthValue.cpp ('k') | third_party/WebKit/Source/core/css/cssom/SimpleLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698