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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp

Issue 2099413002: Don't use consume() in CSSTokenizer when ignoring the return value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSTokenizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
index 9a8075e707f9a94ee415539a3cade2ec853efe23..6956a115eeca0c4ee5135ae39be6b34a4f9c1304 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
@@ -114,11 +114,6 @@ UChar CSSTokenizer::consume()
return current;
}
-void CSSTokenizer::consume(unsigned offset)
esprehn 2016/06/27 21:46:29 This is confusing, but there was actually two meth
-{
- m_input.advance(offset);
-}
-
CSSParserToken CSSTokenizer::whiteSpace(UChar cc)
{
m_input.advanceUntilNonWhitespace();
@@ -204,7 +199,7 @@ CSSParserToken CSSTokenizer::lessThan(UChar cc)
{
ASSERT(cc == '<');
if (m_input.peek(0) == '!' && m_input.peek(1) == '-' && m_input.peek(2) == '-') {
- consume(3);
+ m_input.advance(3);
return CSSParserToken(CDOToken);
}
return CSSParserToken(DelimiterToken, '<');
@@ -222,7 +217,7 @@ CSSParserToken CSSTokenizer::hyphenMinus(UChar cc)
return consumeNumericToken();
}
if (m_input.peek(0) == '-' && m_input.peek(1) == '>') {
- consume(2);
+ m_input.advance(2);
return CSSParserToken(CDCToken);
}
if (nextCharsAreIdentifier(cc)) {
@@ -325,7 +320,7 @@ CSSParserToken CSSTokenizer::letterU(UChar cc)
{
if (m_input.nextInputChar() == '+'
&& (isASCIIHexDigit(m_input.peek(1)) || m_input.peek(1) == '?')) {
- consume();
+ m_input.advance();
return consumeUnicodeRange();
}
reconsume(cc);
@@ -541,7 +536,7 @@ CSSParserToken CSSTokenizer::consumeUnicodeRange()
--lengthRemaining;
} while (lengthRemaining && consumeIfNext('?'));
} else if (m_input.nextInputChar() == '-' && isASCIIHexDigit(m_input.peek(1))) {
- consume();
+ m_input.advance();
lengthRemaining = 6;
end = 0;
do {
@@ -624,9 +619,9 @@ void CSSTokenizer::consumeSingleWhitespaceIfNext()
// We check for \r\n and HTML spaces since we don't do preprocessing
UChar c = m_input.nextInputChar();
if (c == '\r' && m_input.peek(1) == '\n')
- consume(2);
+ m_input.advance(2);
else if (isHTMLSpace(c))
- consume();
+ m_input.advance();
}
void CSSTokenizer::consumeUntilCommentEndFound()
@@ -648,7 +643,7 @@ void CSSTokenizer::consumeUntilCommentEndFound()
bool CSSTokenizer::consumeIfNext(UChar character)
{
if (m_input.nextInputChar() == character) {
- consume();
+ m_input.advance();
return true;
}
return false;
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSTokenizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698