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

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

Issue 2036893003: [CSS Typed OM] Rename StyleValue -> CSSStyleValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update more union types Created 4 years, 6 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 CSSLengthValue_h 5 #ifndef CSSLengthValue_h
6 #define CSSLengthValue_h 6 #define CSSLengthValue_h
7 7
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 #include "core/css/cssom/StyleValue.h" 9 #include "core/css/cssom/CSSStyleValue.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class CalcDictionary; 13 class CalcDictionary;
14 class ExceptionState; 14 class ExceptionState;
15 15
16 class CORE_EXPORT CSSLengthValue : public StyleValue { 16 class CORE_EXPORT CSSLengthValue : public CSSStyleValue {
17 WTF_MAKE_NONCOPYABLE(CSSLengthValue); 17 WTF_MAKE_NONCOPYABLE(CSSLengthValue);
18 DEFINE_WRAPPERTYPEINFO(); 18 DEFINE_WRAPPERTYPEINFO();
19 public: 19 public:
20 static CSSPrimitiveValue::UnitType unitFromName(const String& name); 20 static CSSPrimitiveValue::UnitType unitFromName(const String& name);
21 21
22 CSSLengthValue* add(const CSSLengthValue* other, ExceptionState&); 22 CSSLengthValue* add(const CSSLengthValue* other, ExceptionState&);
23 CSSLengthValue* subtract(const CSSLengthValue* other, ExceptionState&); 23 CSSLengthValue* subtract(const CSSLengthValue* other, ExceptionState&);
24 CSSLengthValue* multiply(double, ExceptionState&); 24 CSSLengthValue* multiply(double, ExceptionState&);
25 CSSLengthValue* divide(double, ExceptionState&); 25 CSSLengthValue* divide(double, ExceptionState&);
26 26
(...skipping 14 matching lines...) Expand all
41 static bool isSupportedLengthUnit(CSSPrimitiveValue::UnitType unit) 41 static bool isSupportedLengthUnit(CSSPrimitiveValue::UnitType unit)
42 { 42 {
43 return (CSSPrimitiveValue::isLength(unit) || unit == CSSPrimitiveValue:: UnitType::Percentage) 43 return (CSSPrimitiveValue::isLength(unit) || unit == CSSPrimitiveValue:: UnitType::Percentage)
44 && unit != CSSPrimitiveValue::UnitType::QuirkyEms 44 && unit != CSSPrimitiveValue::UnitType::QuirkyEms
45 && unit != CSSPrimitiveValue::UnitType::UserUnits; 45 && unit != CSSPrimitiveValue::UnitType::UserUnits;
46 } 46 }
47 47
48 static const int kNumSupportedUnits = 15; 48 static const int kNumSupportedUnits = 15;
49 }; 49 };
50 50
51 DEFINE_TYPE_CASTS(CSSLengthValue, StyleValue, value, 51 DEFINE_TYPE_CASTS(CSSLengthValue, CSSStyleValue, value,
52 (value->type() == StyleValue::SimpleLengthType 52 (value->type() == CSSStyleValue::SimpleLengthType
53 || value->type() == StyleValue::CalcLengthType), 53 || value->type() == CSSStyleValue::CalcLengthType),
54 (value.type() == StyleValue::SimpleLengthType 54 (value.type() == CSSStyleValue::SimpleLengthType
55 || value.type() == StyleValue::CalcLengthType)); 55 || value.type() == CSSStyleValue::CalcLengthType));
56 56
57 } // namespace blink 57 } // namespace blink
58 58
59 #endif 59 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698