| OLD | NEW |
| 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 #include "core/css/CSSFontVariationValue.h" | 5 #include "core/css/CSSFontVariationValue.h" |
| 6 | 6 |
| 7 #include "wtf/text/StringBuilder.h" | 7 #include "platform/wtf/text/StringBuilder.h" |
| 8 | 8 |
| 9 namespace blink { | 9 namespace blink { |
| 10 | 10 |
| 11 CSSFontVariationValue::CSSFontVariationValue(const AtomicString& tag, | 11 CSSFontVariationValue::CSSFontVariationValue(const AtomicString& tag, |
| 12 float value) | 12 float value) |
| 13 : CSSValue(kFontVariationClass), tag_(tag), value_(value) {} | 13 : CSSValue(kFontVariationClass), tag_(tag), value_(value) {} |
| 14 | 14 |
| 15 String CSSFontVariationValue::CustomCSSText() const { | 15 String CSSFontVariationValue::CustomCSSText() const { |
| 16 StringBuilder builder; | 16 StringBuilder builder; |
| 17 builder.Append('\''); | 17 builder.Append('\''); |
| 18 builder.Append(tag_); | 18 builder.Append(tag_); |
| 19 builder.Append("' "); | 19 builder.Append("' "); |
| 20 builder.AppendNumber(value_); | 20 builder.AppendNumber(value_); |
| 21 return builder.ToString(); | 21 return builder.ToString(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 bool CSSFontVariationValue::Equals(const CSSFontVariationValue& other) const { | 24 bool CSSFontVariationValue::Equals(const CSSFontVariationValue& other) const { |
| 25 return tag_ == other.tag_ && value_ == other.value_; | 25 return tag_ == other.tag_ && value_ == other.value_; |
| 26 } | 26 } |
| 27 | 27 |
| 28 } // namespace blink | 28 } // namespace blink |
| OLD | NEW |