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

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

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. Created 3 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/CSSSupportsParser.h" 5 #include "core/css/parser/CSSSupportsParser.h"
6 6
7 #include "core/css/parser/CSSParserImpl.h" 7 #include "core/css/parser/CSSParserImpl.h"
8 8
9 namespace blink { 9 namespace blink {
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return Invalid; 58 return Invalid;
59 59
60 if (range.consumeIncludingWhitespace().type() != WhitespaceToken) 60 if (range.consumeIncludingWhitespace().type() != WhitespaceToken)
61 return Invalid; 61 return Invalid;
62 } 62 }
63 return result ? Supported : Unsupported; 63 return result ? Supported : Unsupported;
64 } 64 }
65 65
66 CSSSupportsParser::SupportsResult CSSSupportsParser::consumeNegation( 66 CSSSupportsParser::SupportsResult CSSSupportsParser::consumeNegation(
67 CSSParserTokenRange range) { 67 CSSParserTokenRange range) {
68 ASSERT(range.peek().type() == IdentToken); 68 DCHECK_EQ(range.peek().type(), IdentToken);
69 if (!equalIgnoringASCIICase(range.consume().value(), "not")) 69 if (!equalIgnoringASCIICase(range.consume().value(), "not"))
70 return Invalid; 70 return Invalid;
71 if (range.consumeIncludingWhitespace().type() != WhitespaceToken) 71 if (range.consumeIncludingWhitespace().type() != WhitespaceToken)
72 return Invalid; 72 return Invalid;
73 SupportsResult result = consumeConditionInParenthesis(range); 73 SupportsResult result = consumeConditionInParenthesis(range);
74 range.consumeWhitespace(); 74 range.consumeWhitespace();
75 if (!range.atEnd() || result == Invalid) 75 if (!range.atEnd() || result == Invalid)
76 return Invalid; 76 return Invalid;
77 return result ? Unsupported : Supported; 77 return result ? Unsupported : Supported;
78 } 78 }
(...skipping 11 matching lines...) Expand all
90 SupportsResult result = consumeCondition(innerRange); 90 SupportsResult result = consumeCondition(innerRange);
91 if (result != Invalid) 91 if (result != Invalid)
92 return result; 92 return result;
93 return innerRange.peek().type() == IdentToken && 93 return innerRange.peek().type() == IdentToken &&
94 m_parser.supportsDeclaration(innerRange) 94 m_parser.supportsDeclaration(innerRange)
95 ? Supported 95 ? Supported
96 : Unsupported; 96 : Unsupported;
97 } 97 }
98 98
99 } // namespace blink 99 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698