| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/CSSParserImpl.h" | 5 #include "core/css/parser/CSSParserImpl.h" |
| 6 | 6 |
| 7 #include "core/css/CSSCustomIdentValue.h" | 7 #include "core/css/CSSCustomIdentValue.h" |
| 8 #include "core/css/CSSCustomPropertyDeclaration.h" | 8 #include "core/css/CSSCustomPropertyDeclaration.h" |
| 9 #include "core/css/CSSKeyframesRule.h" | 9 #include "core/css/CSSKeyframesRule.h" |
| 10 #include "core/css/CSSStyleSheet.h" | 10 #include "core/css/CSSStyleSheet.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 bool didChange = false; | 82 bool didChange = false; |
| 83 if (!parser.m_parsedProperties.isEmpty()) { | 83 if (!parser.m_parsedProperties.isEmpty()) { |
| 84 const CSSCustomPropertyDeclaration* parsedDeclaration = | 84 const CSSCustomPropertyDeclaration* parsedDeclaration = |
| 85 toCSSCustomPropertyDeclaration(parser.m_parsedProperties[0].value()); | 85 toCSSCustomPropertyDeclaration(parser.m_parsedProperties[0].value()); |
| 86 if (parsedDeclaration->value() && registry) { | 86 if (parsedDeclaration->value() && registry) { |
| 87 const PropertyRegistry::Registration* registration = | 87 const PropertyRegistry::Registration* registration = |
| 88 registry->registration(propertyName); | 88 registry->registration(propertyName); |
| 89 // TODO(timloh): This is a bit wasteful, we parse the registered property | 89 // TODO(timloh): This is a bit wasteful, we parse the registered property |
| 90 // to validate but throw away the result. | 90 // to validate but throw away the result. |
| 91 if (registration && | 91 if (registration && |
| 92 !registration->syntax().parse(tokenizer.tokenRange(), | 92 !registration->syntax().parse(tokenizer.tokenRange(), context, |
| 93 isAnimationTainted)) { | 93 isAnimationTainted)) { |
| 94 return MutableStylePropertySet::SetResult{didParse, didChange}; | 94 return MutableStylePropertySet::SetResult{didParse, didChange}; |
| 95 } | 95 } |
| 96 } | 96 } |
| 97 didParse = true; | 97 didParse = true; |
| 98 didChange = declaration->addParsedProperties(parser.m_parsedProperties); | 98 didChange = declaration->addParsedProperties(parser.m_parsedProperties); |
| 99 } | 99 } |
| 100 return MutableStylePropertySet::SetResult{didParse, didChange}; | 100 return MutableStylePropertySet::SetResult{didParse, didChange}; |
| 101 } | 101 } |
| 102 | 102 |
| (...skipping 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 else | 979 else |
| 980 return nullptr; // Parser error, invalid value in keyframe selector | 980 return nullptr; // Parser error, invalid value in keyframe selector |
| 981 if (range.atEnd()) | 981 if (range.atEnd()) |
| 982 return result; | 982 return result; |
| 983 if (range.consume().type() != CommaToken) | 983 if (range.consume().type() != CommaToken) |
| 984 return nullptr; // Parser error | 984 return nullptr; // Parser error |
| 985 } | 985 } |
| 986 } | 986 } |
| 987 | 987 |
| 988 } // namespace blink | 988 } // namespace blink |
| OLD | NEW |