Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1315)

Side by Side Diff: third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <bitset> 7 #include <bitset>
8 #include <memory> 8 #include <memory>
9 #include "core/css/CSSCustomIdentValue.h" 9 #include "core/css/CSSCustomIdentValue.h"
10 #include "core/css/CSSCustomPropertyDeclaration.h" 10 #include "core/css/CSSCustomPropertyDeclaration.h"
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 823
824 return StyleRule::create( 824 return StyleRule::create(
825 std::move(selectorList), 825 std::move(selectorList),
826 createStylePropertySet(m_parsedProperties, m_context->mode())); 826 createStylePropertySet(m_parsedProperties, m_context->mode()));
827 } 827 }
828 828
829 void CSSParserImpl::consumeDeclarationList(CSSParserTokenRange range, 829 void CSSParserImpl::consumeDeclarationList(CSSParserTokenRange range,
830 StyleRule::RuleType ruleType) { 830 StyleRule::RuleType ruleType) {
831 ASSERT(m_parsedProperties.isEmpty()); 831 ASSERT(m_parsedProperties.isEmpty());
832 832
833 bool useObserver = m_observerWrapper && (ruleType == StyleRule::Style || 833 bool useObserver =
834 ruleType == StyleRule::Keyframe); 834 m_observerWrapper &&
835 (ruleType == StyleRule::Style || ruleType == StyleRule::Keyframe);
835 if (useObserver) { 836 if (useObserver) {
836 m_observerWrapper->observer().startRuleBody( 837 m_observerWrapper->observer().startRuleBody(
837 m_observerWrapper->previousTokenStartOffset(range)); 838 m_observerWrapper->previousTokenStartOffset(range));
838 m_observerWrapper->skipCommentsBefore(range, true); 839 m_observerWrapper->skipCommentsBefore(range, true);
839 } 840 }
840 841
841 while (!range.atEnd()) { 842 while (!range.atEnd()) {
842 switch (range.peek().type()) { 843 switch (range.peek().type()) {
843 case WhitespaceToken: 844 case WhitespaceToken:
844 case SemicolonToken: 845 case SemicolonToken:
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 else 980 else
980 return nullptr; // Parser error, invalid value in keyframe selector 981 return nullptr; // Parser error, invalid value in keyframe selector
981 if (range.atEnd()) 982 if (range.atEnd())
982 return result; 983 return result;
983 if (range.consume().type() != CommaToken) 984 if (range.consume().type() != CommaToken)
984 return nullptr; // Parser error 985 return nullptr; // Parser error
985 } 986 }
986 } 987 }
987 988
988 } // namespace blink 989 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698