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

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

Issue 1957213002: Typed CSSOM: Rename NumberValue to CSSNumberValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix inline style tests Created 4 years, 7 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NumberValue_h
6 #define NumberValue_h
7
8 #include "bindings/core/v8/ScriptWrappable.h"
9 #include "core/CoreExport.h"
10 #include "core/css/CSSPrimitiveValue.h"
11 #include "core/css/cssom/StyleValue.h"
12 #include "wtf/text/WTFString.h"
13
14 namespace blink {
15
16 class CORE_EXPORT NumberValue final : public StyleValue {
17 WTF_MAKE_NONCOPYABLE(NumberValue);
18 DEFINE_WRAPPERTYPEINFO();
19 public:
20 static NumberValue* create(double value)
21 {
22 return new NumberValue(value);
23 }
24
25 double value() const { return m_value; }
26
27 CSSValue* toCSSValue() const override
28 {
29 return cssValuePool().createValue(m_value, CSSPrimitiveValue::UnitType::
30 Number);
31 }
32
33 StyleValueType type() const override { return StyleValueType::NumberType; }
34 private:
35 NumberValue(double value) : m_value(value) {}
36
37 double m_value;
38 };
39
40 } // namespace blink
41
42 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/CSSNumberValue.idl ('k') | third_party/WebKit/Source/core/css/cssom/NumberValue.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698