| OLD | NEW |
| 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 #include "core/css/cssom/CSSLengthValue.h" | 5 #include "core/css/cssom/CSSLengthValue.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/css/CSSPrimitiveValue.h" | 8 #include "core/css/CSSPrimitiveValue.h" |
| 9 #include "core/css/cssom/CSSCalcDictionary.h" | 9 #include "core/css/cssom/CSSCalcDictionary.h" |
| 10 #include "core/css/cssom/CSSCalcLength.h" | 10 #include "core/css/cssom/CSSCalcLength.h" |
| 11 #include "core/css/cssom/CSSSimpleLength.h" | 11 #include "core/css/cssom/CSSSimpleLength.h" |
| 12 #include "wtf/HashMap.h" | 12 #include "wtf/HashMap.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 namespace cssom { |
| 15 | 16 |
| 16 CSSPrimitiveValue::UnitType CSSLengthValue::unitFromName(const String& name) | 17 CSSPrimitiveValue::UnitType CSSLengthValue::unitFromName(const String& name) |
| 17 { | 18 { |
| 18 if (equalIgnoringASCIICase(name, "percent") || name == "%") | 19 if (equalIgnoringASCIICase(name, "percent") || name == "%") |
| 19 return CSSPrimitiveValue::UnitType::Percentage; | 20 return CSSPrimitiveValue::UnitType::Percentage; |
| 20 return CSSPrimitiveValue::stringToUnitType(name); | 21 return CSSPrimitiveValue::stringToUnitType(name); |
| 21 } | 22 } |
| 22 | 23 |
| 23 CSSLengthValue* CSSLengthValue::from(const String& cssText, ExceptionState& exce
ptionState) | 24 CSSLengthValue* CSSLengthValue::from(const String& cssText, ExceptionState& exce
ptionState) |
| 24 { | 25 { |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 NOTREACHED(); | 82 NOTREACHED(); |
| 82 return nullptr; | 83 return nullptr; |
| 83 } | 84 } |
| 84 | 85 |
| 85 CSSLengthValue* CSSLengthValue::divideInternal(double, ExceptionState&) | 86 CSSLengthValue* CSSLengthValue::divideInternal(double, ExceptionState&) |
| 86 { | 87 { |
| 87 NOTREACHED(); | 88 NOTREACHED(); |
| 88 return nullptr; | 89 return nullptr; |
| 89 } | 90 } |
| 90 | 91 |
| 92 } // namespace cssom |
| 91 } // namespace blink | 93 } // namespace blink |
| 94 |
| OLD | NEW |