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

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

Issue 1602843003: Update StyleValue.cssString() to use existing methods instead of rolling our own. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert TransformValue.html Created 4 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 StyleCalcLength_h 5 #ifndef StyleCalcLength_h
6 #define StyleCalcLength_h 6 #define StyleCalcLength_h
7 7
8 #include "core/css/cssom/LengthValue.h" 8 #include "core/css/cssom/LengthValue.h"
9 #include "wtf/BitVector.h" 9 #include "wtf/BitVector.h"
10 10
(...skipping 26 matching lines...) Expand all
37 GETTER_MACRO(vmin, LengthUnit::Vmin) 37 GETTER_MACRO(vmin, LengthUnit::Vmin)
38 GETTER_MACRO(vmax, LengthUnit::Vmax) 38 GETTER_MACRO(vmax, LengthUnit::Vmax)
39 GETTER_MACRO(cm, LengthUnit::Cm) 39 GETTER_MACRO(cm, LengthUnit::Cm)
40 GETTER_MACRO(mm, LengthUnit::Mm) 40 GETTER_MACRO(mm, LengthUnit::Mm)
41 GETTER_MACRO(in, LengthUnit::In) 41 GETTER_MACRO(in, LengthUnit::In)
42 GETTER_MACRO(pc, LengthUnit::Pc) 42 GETTER_MACRO(pc, LengthUnit::Pc)
43 GETTER_MACRO(pt, LengthUnit::Pt) 43 GETTER_MACRO(pt, LengthUnit::Pt)
44 44
45 #undef GETTER_MACRO 45 #undef GETTER_MACRO
46 46
47 String cssString() const override;
48 PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const override; 47 PassRefPtrWillBeRawPtr<CSSValue> toCSSValue() const override;
49 48
50 StyleValueType type() const override { return CalcLengthType; } 49 StyleValueType type() const override { return CalcLengthType; }
51 protected: 50 protected:
52 LengthValue* addInternal(const LengthValue* other, ExceptionState&) override ; 51 LengthValue* addInternal(const LengthValue* other, ExceptionState&) override ;
53 LengthValue* subtractInternal(const LengthValue* other, ExceptionState&) ove rride; 52 LengthValue* subtractInternal(const LengthValue* other, ExceptionState&) ove rride;
54 LengthValue* multiplyInternal(double, ExceptionState&) override; 53 LengthValue* multiplyInternal(double, ExceptionState&) override;
55 LengthValue* divideInternal(double, ExceptionState&) override; 54 LengthValue* divideInternal(double, ExceptionState&) override;
56 55
57 private: 56 private:
(...skipping 25 matching lines...) Expand all
83 #define DEFINE_CALC_LENGTH_TYPE_CASTS(argumentType) \ 82 #define DEFINE_CALC_LENGTH_TYPE_CASTS(argumentType) \
84 DEFINE_TYPE_CASTS(StyleCalcLength, argumentType, value, \ 83 DEFINE_TYPE_CASTS(StyleCalcLength, argumentType, value, \
85 value->type() == LengthValue::StyleValueType::CalcLengthType, \ 84 value->type() == LengthValue::StyleValueType::CalcLengthType, \
86 value.type() == LengthValue::StyleValueType::CalcLengthType) 85 value.type() == LengthValue::StyleValueType::CalcLengthType)
87 86
88 DEFINE_CALC_LENGTH_TYPE_CASTS(StyleValue); 87 DEFINE_CALC_LENGTH_TYPE_CASTS(StyleValue);
89 88
90 } // namespace blink 89 } // namespace blink
91 90
92 #endif 91 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698