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" | 9 #include "core/css/cssom/CSSSimpleLength.h" |
10 #include "core/css/cssom/CSSStyleValue.h" | 10 #include "core/css/cssom/CSSStyleValue.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 { | 121 { |
122 StyleValueVector styleValueVector; | 122 StyleValueVector styleValueVector; |
123 | 123 |
124 if (!cssValue.isValueList()) { | 124 if (!cssValue.isValueList()) { |
125 CSSStyleValue* styleValue = StyleValueFactory::create(propertyID, cssVal
ue); | 125 CSSStyleValue* styleValue = StyleValueFactory::create(propertyID, cssVal
ue); |
126 if (styleValue) | 126 if (styleValue) |
127 styleValueVector.append(styleValue); | 127 styleValueVector.append(styleValue); |
128 return styleValueVector; | 128 return styleValueVector; |
129 } | 129 } |
130 | 130 |
131 for (CSSValue* value : *toCSSValueList(&cssValue)) { | 131 for (const CSSValue* value : toCSSValueList(cssValue)) { |
132 CSSStyleValue* styleValue = StyleValueFactory::create(propertyID, *value
); | 132 CSSStyleValue* styleValue = StyleValueFactory::create(propertyID, *value
); |
133 if (!styleValue) | 133 if (!styleValue) |
134 return StyleValueVector(); | 134 return StyleValueVector(); |
135 styleValueVector.append(styleValue); | 135 styleValueVector.append(styleValue); |
136 } | 136 } |
137 return styleValueVector; | 137 return styleValueVector; |
138 } | 138 } |
139 | 139 |
140 StylePropertyMap::IterationSource* StylePropertyMap::startIteration(ScriptState*
, ExceptionState&) | 140 StylePropertyMap::IterationSource* StylePropertyMap::startIteration(ScriptState*
, ExceptionState&) |
141 { | 141 { |
142 return new StylePropertyMapIterationSource(getIterationEntries()); | 142 return new StylePropertyMapIterationSource(getIterationEntries()); |
143 } | 143 } |
144 | 144 |
145 } // namespace blink | 145 } // namespace blink |
OLD | NEW |