| 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/css/CSSCustomPropertyDeclaration.h" | 7 #include "core/css/CSSCustomPropertyDeclaration.h" |
| 8 #include "core/css/CSSURIValue.h" | 8 #include "core/css/CSSURIValue.h" |
| 9 #include "core/css/CSSValueList.h" | 9 #include "core/css/CSSValueList.h" |
| 10 #include "core/css/CSSVariableReferenceValue.h" | 10 #include "core/css/CSSVariableReferenceValue.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 case CSSSyntaxType::Number: | 146 case CSSSyntaxType::Number: |
| 147 return consumeNumber(range, ValueRange::ValueRangeAll); | 147 return consumeNumber(range, ValueRange::ValueRangeAll); |
| 148 case CSSSyntaxType::Percentage: | 148 case CSSSyntaxType::Percentage: |
| 149 return consumePercent(range, ValueRange::ValueRangeAll); | 149 return consumePercent(range, ValueRange::ValueRangeAll); |
| 150 case CSSSyntaxType::LengthPercentage: | 150 case CSSSyntaxType::LengthPercentage: |
| 151 return consumeLengthOrPercent(range, HTMLStandardMode, | 151 return consumeLengthOrPercent(range, HTMLStandardMode, |
| 152 ValueRange::ValueRangeAll); | 152 ValueRange::ValueRangeAll); |
| 153 case CSSSyntaxType::Color: | 153 case CSSSyntaxType::Color: |
| 154 return consumeColor(range, HTMLStandardMode); | 154 return consumeColor(range, HTMLStandardMode); |
| 155 case CSSSyntaxType::Image: | 155 case CSSSyntaxType::Image: |
| 156 // TODO(timloh): This probably needs a proper parser context for relative
URL resolution. | 156 // TODO(timloh): This probably needs a proper parser context for relative |
| 157 // URL resolution. |
| 157 return consumeImage(range, strictCSSParserContext()); | 158 return consumeImage(range, strictCSSParserContext()); |
| 158 case CSSSyntaxType::Url: | 159 case CSSSyntaxType::Url: |
| 159 return consumeUrl(range); | 160 return consumeUrl(range); |
| 160 case CSSSyntaxType::Integer: | 161 case CSSSyntaxType::Integer: |
| 161 return consumeInteger(range); | 162 return consumeInteger(range); |
| 162 case CSSSyntaxType::Angle: | 163 case CSSSyntaxType::Angle: |
| 163 return consumeAngle(range); | 164 return consumeAngle(range); |
| 164 case CSSSyntaxType::Time: | 165 case CSSSyntaxType::Time: |
| 165 return consumeTime(range, ValueRange::ValueRangeAll); | 166 return consumeTime(range, ValueRange::ValueRangeAll); |
| 166 case CSSSyntaxType::Resolution: | 167 case CSSSyntaxType::Resolution: |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 return CSSVariableParser::parseRegisteredPropertyValue(range, false); | 200 return CSSVariableParser::parseRegisteredPropertyValue(range, false); |
| 200 range.consumeWhitespace(); | 201 range.consumeWhitespace(); |
| 201 for (const CSSSyntaxComponent& component : m_syntaxComponents) { | 202 for (const CSSSyntaxComponent& component : m_syntaxComponents) { |
| 202 if (const CSSValue* result = consumeSyntaxComponent(component, range)) | 203 if (const CSSValue* result = consumeSyntaxComponent(component, range)) |
| 203 return result; | 204 return result; |
| 204 } | 205 } |
| 205 return CSSVariableParser::parseRegisteredPropertyValue(range, true); | 206 return CSSVariableParser::parseRegisteredPropertyValue(range, true); |
| 206 } | 207 } |
| 207 | 208 |
| 208 } // namespace blink | 209 } // namespace blink |
| OLD | NEW |