| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 return CSSSelectorList(); // Parse error; extra tokens in @page selector | 275 return CSSSelectorList(); // Parse error; extra tokens in @page selector |
| 276 | 276 |
| 277 std::unique_ptr<CSSParserSelector> selector; | 277 std::unique_ptr<CSSParserSelector> selector; |
| 278 if (!type_selector.IsNull() && pseudo.IsNull()) { | 278 if (!type_selector.IsNull() && pseudo.IsNull()) { |
| 279 selector = CSSParserSelector::Create(QualifiedName( | 279 selector = CSSParserSelector::Create(QualifiedName( |
| 280 g_null_atom, type_selector, style_sheet->DefaultNamespace())); | 280 g_null_atom, type_selector, style_sheet->DefaultNamespace())); |
| 281 } else { | 281 } else { |
| 282 selector = CSSParserSelector::Create(); | 282 selector = CSSParserSelector::Create(); |
| 283 if (!pseudo.IsNull()) { | 283 if (!pseudo.IsNull()) { |
| 284 selector->SetMatch(CSSSelector::kPagePseudoClass); | 284 selector->SetMatch(CSSSelector::kPagePseudoClass); |
| 285 selector->UpdatePseudoType(pseudo.Lower()); | 285 selector->UpdatePseudoType(pseudo.DeprecatedLower()); |
| 286 if (selector->GetPseudoType() == CSSSelector::kPseudoUnknown) | 286 if (selector->GetPseudoType() == CSSSelector::kPseudoUnknown) |
| 287 return CSSSelectorList(); | 287 return CSSSelectorList(); |
| 288 } | 288 } |
| 289 if (!type_selector.IsNull()) { | 289 if (!type_selector.IsNull()) { |
| 290 selector->PrependTagSelector(QualifiedName( | 290 selector->PrependTagSelector(QualifiedName( |
| 291 g_null_atom, type_selector, style_sheet->DefaultNamespace())); | 291 g_null_atom, type_selector, style_sheet->DefaultNamespace())); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 selector->SetForPage(); | 295 selector->SetForPage(); |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 else | 984 else |
| 985 return nullptr; // Parser error, invalid value in keyframe selector | 985 return nullptr; // Parser error, invalid value in keyframe selector |
| 986 if (range.AtEnd()) | 986 if (range.AtEnd()) |
| 987 return result; | 987 return result; |
| 988 if (range.Consume().GetType() != kCommaToken) | 988 if (range.Consume().GetType() != kCommaToken) |
| 989 return nullptr; // Parser error | 989 return nullptr; // Parser error |
| 990 } | 990 } |
| 991 } | 991 } |
| 992 | 992 |
| 993 } // namespace blink | 993 } // namespace blink |
| OLD | NEW |