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/parser/CSSPropertyParser.h" | 5 #include "core/css/parser/CSSPropertyParser.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include "core/StylePropertyShorthand.h" | 8 #include "core/StylePropertyShorthand.h" |
9 #include "core/css/CSSBasicShapeValues.h" | 9 #include "core/css/CSSBasicShapeValues.h" |
10 #include "core/css/CSSBorderImage.h" | 10 #include "core/css/CSSBorderImage.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 if (range_.AtEnd()) { | 165 if (range_.AtEnd()) { |
166 AddProperty(property_id, CSSPropertyInvalid, *parsed_value, important); | 166 AddProperty(property_id, CSSPropertyInvalid, *parsed_value, important); |
167 return true; | 167 return true; |
168 } | 168 } |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 if (CSSVariableParser::ContainsValidVariableReferences(original_range)) { | 172 if (CSSVariableParser::ContainsValidVariableReferences(original_range)) { |
173 bool is_animation_tainted = false; | 173 bool is_animation_tainted = false; |
174 CSSVariableReferenceValue* variable = CSSVariableReferenceValue::Create( | 174 CSSVariableReferenceValue* variable = CSSVariableReferenceValue::Create( |
175 CSSVariableData::Create(original_range, is_animation_tainted, true)); | 175 CSSVariableData::Create(original_range, is_animation_tainted, true), |
| 176 *context_); |
176 | 177 |
177 if (is_shorthand) { | 178 if (is_shorthand) { |
178 const CSSPendingSubstitutionValue& pending_value = | 179 const CSSPendingSubstitutionValue& pending_value = |
179 *CSSPendingSubstitutionValue::Create(property_id, variable); | 180 *CSSPendingSubstitutionValue::Create(property_id, variable); |
180 AddExpandedPropertyForValue(property_id, pending_value, important); | 181 AddExpandedPropertyForValue(property_id, pending_value, important); |
181 } else { | 182 } else { |
182 AddProperty(property_id, CSSPropertyInvalid, *variable, important); | 183 AddProperty(property_id, CSSPropertyInvalid, *variable, important); |
183 } | 184 } |
184 return true; | 185 return true; |
185 } | 186 } |
(...skipping 3232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3418 case CSSPropertyPlaceItems: | 3419 case CSSPropertyPlaceItems: |
3419 return ConsumePlaceItemsShorthand(important); | 3420 return ConsumePlaceItemsShorthand(important); |
3420 case CSSPropertyPlaceSelf: | 3421 case CSSPropertyPlaceSelf: |
3421 return ConsumePlaceSelfShorthand(important); | 3422 return ConsumePlaceSelfShorthand(important); |
3422 default: | 3423 default: |
3423 return false; | 3424 return false; |
3424 } | 3425 } |
3425 } | 3426 } |
3426 | 3427 |
3427 } // namespace blink | 3428 } // namespace blink |
OLD | NEW |