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

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

Issue 2162863002: Add StringView constructor that takes a ref to save a branch in CSSTokenizerInputStream::rangeAt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo. Created 4 years, 5 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 | « no previous file | third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp » ('j') | 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.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
index df45945aca42eba2ae54db02658e914c19c90b22..2676e8c65a7435a3cac623daf0f21d838ed3e2ba 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.h
@@ -49,7 +49,12 @@ public:
unsigned length() const { return m_stringLength; }
unsigned offset() const { return std::min(m_offset, m_stringLength); }
- StringView rangeAt(unsigned start, unsigned length) const;
+
+ StringView rangeAt(unsigned start, unsigned length) const
+ {
+ DCHECK(start + length <= m_stringLength);
+ return StringView(*m_string, start, length);
+ }
private:
size_t m_offset;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/parser/CSSTokenizerInputStream.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698