| 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/cssom/StylePropertyMap.h" | 5 #include "core/css/cssom/StylePropertyMap.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "core/css/CSSValueList.h" | 8 #include "core/css/CSSValueList.h" |
| 9 #include "core/css/cssom/CSSSimpleLength.h" | |
| 10 #include "core/css/cssom/CSSStyleValue.h" | 9 #include "core/css/cssom/CSSStyleValue.h" |
| 11 #include "core/css/cssom/StyleValueFactory.h" | 10 #include "core/css/cssom/StyleValueFactory.h" |
| 12 | 11 |
| 13 namespace blink { | 12 namespace blink { |
| 14 | 13 |
| 15 void StylePropertyMap::set(const String& property_name, | 14 void StylePropertyMap::set(const String& property_name, |
| 16 CSSStyleValueOrCSSStyleValueSequenceOrString& item, | 15 CSSStyleValueOrCSSStyleValueSequenceOrString& item, |
| 17 ExceptionState& exception_state) { | 16 ExceptionState& exception_state) { |
| 18 CSSPropertyID property_id = cssPropertyID(property_name); | 17 CSSPropertyID property_id = cssPropertyID(property_name); |
| 19 if (property_id != CSSPropertyInvalid && property_id != CSSPropertyVariable) { | 18 if (property_id != CSSPropertyInvalid && property_id != CSSPropertyVariable) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 42 CSSPropertyID property_id = cssPropertyID(property_name); | 41 CSSPropertyID property_id = cssPropertyID(property_name); |
| 43 if (property_id != CSSPropertyInvalid && property_id != CSSPropertyVariable) { | 42 if (property_id != CSSPropertyInvalid && property_id != CSSPropertyVariable) { |
| 44 remove(property_id, exception_state); | 43 remove(property_id, exception_state); |
| 45 return; | 44 return; |
| 46 } | 45 } |
| 47 // TODO(meade): Handle custom properties here. | 46 // TODO(meade): Handle custom properties here. |
| 48 exception_state.ThrowTypeError("Invalid propertyName: " + property_name); | 47 exception_state.ThrowTypeError("Invalid propertyName: " + property_name); |
| 49 } | 48 } |
| 50 | 49 |
| 51 } // namespace blink | 50 } // namespace blink |
| OLD | NEW |