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

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

Issue 2140353002: Move StringView constructors into WTFString.h/AtomicString.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused constructor. 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/wtf/text/AtomicString.h » ('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/CSSParserToken.h
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserToken.h b/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
index 6158842ce9c04970f1eea60e5944d89f64447a6d..fa882366884c93d2a788ee3134532755dc12f8e4 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
@@ -94,7 +94,9 @@ public:
CSSParserTokenType type() const { return static_cast<CSSParserTokenType>(m_type); }
StringView value() const
{
- return StringView(m_valueDataCharRaw, m_valueLength, m_valueIs8Bit);
+ if (m_valueIs8Bit)
+ return StringView(reinterpret_cast<const LChar*>(m_valueDataCharRaw), m_valueLength);
+ return StringView(reinterpret_cast<const UChar*>(m_valueDataCharRaw), m_valueLength);
}
UChar delimiter() const;
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/AtomicString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698