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

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

Issue 1920583002: NOT FOR LANDING: Hack up CSSParser for speed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing consts. Created 4 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 side-by-side diff with in-line comments
Download patch
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 e0768dfc026ed543f6046d4da5487a2a260a3c23..808d45f53fe6c9f2c25b169700b77fb630729e3e 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp
@@ -9,30 +9,9 @@
namespace blink {
-CSSTokenizerInputStream::CSSTokenizerInputStream(String input)
- : m_offset(0)
- , m_stringLength(input.length())
- , m_string(input.impl())
+double CSSTokenizerInputStream::getDouble(unsigned start, unsigned end) const
{
-}
-
-UChar CSSTokenizerInputStream::peek(unsigned lookaheadOffset)
-{
- if ((m_offset + lookaheadOffset) >= m_stringLength)
- return kEndOfFileMarker;
- UChar result = (*m_string)[m_offset + lookaheadOffset];
- return result ? result : 0xFFFD;
-}
-
-void CSSTokenizerInputStream::pushBack(UChar cc)
-{
- --m_offset;
- ASSERT(nextInputChar() == cc);
-}
-
-double CSSTokenizerInputStream::getDouble(unsigned start, unsigned end)
-{
- ASSERT(start <= end && ((m_offset + end) <= m_stringLength));
+ ASSERT(start <= end && ((m_offset + end) <= length()));
bool isResultOK = false;
double result = 0.0;
if (start < end) {
@@ -47,7 +26,7 @@ double CSSTokenizerInputStream::getDouble(unsigned start, unsigned end)
CSSParserString CSSTokenizerInputStream::rangeAsCSSParserString(unsigned start, unsigned length) const
{
- ASSERT(start + length <= m_stringLength);
+ ASSERT(start + length <= length());
CSSParserString result;
if (m_string->is8Bit())
result.init(m_string->characters8() + start, length);

Powered by Google App Engine
This is Rietveld 408576698