| 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 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 --last; | 759 --last; |
| 760 while (last->type() == WhitespaceToken) | 760 while (last->type() == WhitespaceToken) |
| 761 --last; | 761 --last; |
| 762 if (last->type() == DelimiterToken && last->delimiter() == '!') { | 762 if (last->type() == DelimiterToken && last->delimiter() == '!') { |
| 763 important = true; | 763 important = true; |
| 764 declarationValueEnd = last; | 764 declarationValueEnd = last; |
| 765 } | 765 } |
| 766 } | 766 } |
| 767 | 767 |
| 768 size_t propertiesCount = m_parsedProperties.size(); | 768 size_t propertiesCount = m_parsedProperties.size(); |
| 769 if (RuntimeEnabledFeatures::cssVariablesEnabled() && unresolvedProperty == C
SSPropertyInvalid && CSSVariableParser::isValidVariableName(token)) { | 769 if (unresolvedProperty == CSSPropertyInvalid && CSSVariableParser::isValidVa
riableName(token)) { |
| 770 AtomicString variableName = token.value().toAtomicString(); | 770 AtomicString variableName = token.value().toAtomicString(); |
| 771 consumeVariableValue(range.makeSubRange(&range.peek(), declarationValueE
nd), variableName, important); | 771 consumeVariableValue(range.makeSubRange(&range.peek(), declarationValueE
nd), variableName, important); |
| 772 } | 772 } |
| 773 | 773 |
| 774 if (important && (ruleType == StyleRule::FontFace || ruleType == StyleRule::
Keyframe)) | 774 if (important && (ruleType == StyleRule::FontFace || ruleType == StyleRule::
Keyframe)) |
| 775 return; | 775 return; |
| 776 | 776 |
| 777 if (unresolvedProperty != CSSPropertyInvalid) { | 777 if (unresolvedProperty != CSSPropertyInvalid) { |
| 778 if (m_styleSheet && m_styleSheet->singleOwnerDocument()) | 778 if (m_styleSheet && m_styleSheet->singleOwnerDocument()) |
| 779 Deprecation::warnOnDeprecatedProperties(m_styleSheet->singleOwnerDoc
ument()->frame(), unresolvedProperty); | 779 Deprecation::warnOnDeprecatedProperties(m_styleSheet->singleOwnerDoc
ument()->frame(), unresolvedProperty); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 else | 813 else |
| 814 return nullptr; // Parser error, invalid value in keyframe selector | 814 return nullptr; // Parser error, invalid value in keyframe selector |
| 815 if (range.atEnd()) | 815 if (range.atEnd()) |
| 816 return result; | 816 return result; |
| 817 if (range.consume().type() != CommaToken) | 817 if (range.consume().type() != CommaToken) |
| 818 return nullptr; // Parser error | 818 return nullptr; // Parser error |
| 819 } | 819 } |
| 820 } | 820 } |
| 821 | 821 |
| 822 } // namespace blink | 822 } // namespace blink |
| OLD | NEW |