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

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

Issue 2024373002: Replace CSSParserString with StringView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Match arguments to equalStringView. Created 4 years, 7 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..3b49726fe47460d5e108b45aed93879fb8e2ec48 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp
@@ -4,7 +4,6 @@
#include "core/css/parser/CSSTokenizerInputStream.h"
-#include "core/css/parser/CSSParserString.h"
#include "core/html/parser/InputStreamPreprocessor.h"
namespace blink {
@@ -45,15 +44,10 @@ double CSSTokenizerInputStream::getDouble(unsigned start, unsigned end)
return isResultOK ? result : 0.0;
}
-CSSParserString CSSTokenizerInputStream::rangeAsCSSParserString(unsigned start, unsigned length) const
+StringView CSSTokenizerInputStream::rangeAt(unsigned start, unsigned length) const
{
ASSERT(start + length <= m_stringLength);
- CSSParserString result;
- if (m_string->is8Bit())
- result.init(m_string->characters8() + start, length);
- else
- result.init(m_string->characters16() + start, length);
- return result;
+ return StringView(m_string.get(), start, length);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698