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

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

Issue 2107503002: Add missing const on CSSTokenizerInputStream methods. (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/CSSTokenizerInputStream.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/CSSTokenizerInputStream.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp
index e95cbd74aff3ea6b0cc7942ba724bf5c3450f017..b01628426d8fad8656057df485c1120b1d203cd5 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp
@@ -17,7 +17,7 @@ CSSTokenizerInputStream::CSSTokenizerInputStream(String input)
{
}
-UChar CSSTokenizerInputStream::peek(unsigned lookaheadOffset)
+UChar CSSTokenizerInputStream::peek(unsigned lookaheadOffset) const
{
if ((m_offset + lookaheadOffset) >= m_stringLength)
return kEndOfFileMarker;
@@ -25,12 +25,6 @@ UChar CSSTokenizerInputStream::peek(unsigned lookaheadOffset)
return result ? result : 0xFFFD;
}
-void CSSTokenizerInputStream::pushBack(UChar cc)
-{
- --m_offset;
- ASSERT(nextInputChar() == cc);
-}
-
void CSSTokenizerInputStream::advanceUntilNonWhitespace()
{
// Using HTML space here rather than CSS space since we don't do preprocessing
@@ -45,9 +39,9 @@ void CSSTokenizerInputStream::advanceUntilNonWhitespace()
}
}
-double CSSTokenizerInputStream::getDouble(unsigned start, unsigned end)
+double CSSTokenizerInputStream::getDouble(unsigned start, unsigned end) const
{
- ASSERT(start <= end && ((m_offset + end) <= m_stringLength));
+ DCHECK(start <= end && ((m_offset + end) <= m_stringLength));
bool isResultOK = false;
double result = 0.0;
if (start < end) {
@@ -62,7 +56,7 @@ double CSSTokenizerInputStream::getDouble(unsigned start, unsigned end)
StringView CSSTokenizerInputStream::rangeAt(unsigned start, unsigned length) const
{
- ASSERT(start + length <= m_stringLength);
+ DCHECK(start + length <= m_stringLength);
return StringView(m_string.get(), start, length);
}
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698