| 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/CSSSyntaxDescriptor.h" | 5 #include "core/css/CSSSyntaxDescriptor.h" |
| 6 | 6 |
| 7 #include "core/animation/CSSColorInterpolationType.h" | 7 #include "core/animation/CSSColorInterpolationType.h" |
| 8 #include "core/animation/CSSValueInterpolationType.h" | 8 #include "core/animation/CSSValueInterpolationType.h" |
| 9 #include "core/css/CSSCustomPropertyDeclaration.h" | 9 #include "core/css/CSSCustomPropertyDeclaration.h" |
| 10 #include "core/css/CSSURIValue.h" | 10 #include "core/css/CSSURIValue.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 CSSSyntaxDescriptor::CSSSyntaxDescriptor(String input) { | 94 CSSSyntaxDescriptor::CSSSyntaxDescriptor(String input) { |
| 95 size_t offset = 0; | 95 size_t offset = 0; |
| 96 consumeWhitespace(input, offset); | 96 consumeWhitespace(input, offset); |
| 97 | 97 |
| 98 if (consumeCharacterAndWhitespace(input, '*', offset)) { | 98 if (consumeCharacterAndWhitespace(input, '*', offset)) { |
| 99 if (offset != input.length()) | 99 if (offset != input.length()) |
| 100 return; | 100 return; |
| 101 m_syntaxComponents.push_back( | 101 m_syntaxComponents.push_back( |
| 102 CSSSyntaxComponent(CSSSyntaxType::TokenStream, emptyString(), false)); | 102 CSSSyntaxComponent(CSSSyntaxType::TokenStream, emptyString, false)); |
| 103 return; | 103 return; |
| 104 } | 104 } |
| 105 | 105 |
| 106 do { | 106 do { |
| 107 CSSSyntaxType type; | 107 CSSSyntaxType type; |
| 108 String ident; | 108 String ident; |
| 109 bool success; | 109 bool success; |
| 110 | 110 |
| 111 if (input[offset] == '<') { | 111 if (input[offset] == '<') { |
| 112 success = consumeSyntaxType(input, offset, type); | 112 success = consumeSyntaxType(input, offset, type); |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 NOTREACHED(); | 250 NOTREACHED(); |
| 251 break; | 251 break; |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 interpolationTypes.push_back( | 254 interpolationTypes.push_back( |
| 255 WTF::makeUnique<CSSValueInterpolationType>(property)); | 255 WTF::makeUnique<CSSValueInterpolationType>(property)); |
| 256 return interpolationTypes; | 256 return interpolationTypes; |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace blink | 259 } // namespace blink |
| OLD | NEW |