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

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

Issue 2121913002: [Typed OM] Add CSSValue -> CSSNumberValue conversion (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync Created 4 years 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
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.in ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CSSNumberValue_h 5 #ifndef CSSNumberValue_h
6 #define CSSNumberValue_h 6 #define CSSNumberValue_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 19 matching lines...) Expand all
30 } 30 }
31 31
32 StyleValueType type() const override { return StyleValueType::NumberType; } 32 StyleValueType type() const override { return StyleValueType::NumberType; }
33 33
34 private: 34 private:
35 CSSNumberValue(double value) : m_value(value) {} 35 CSSNumberValue(double value) : m_value(value) {}
36 36
37 double m_value; 37 double m_value;
38 }; 38 };
39 39
40 DEFINE_TYPE_CASTS(CSSNumberValue,
41 CSSStyleValue,
42 value,
43 value->type() == CSSStyleValue::NumberType,
44 value.type() == CSSStyleValue::NumberType);
45
40 } // namespace blink 46 } // namespace blink
41 47
42 #endif 48 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698