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

Unified Diff: Source/core/html/parser/CSSPreloadScanner.cpp

Issue 110843004: Replaced HTMLIdentifier with an atomized string factory function (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review fixes Created 7 years 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 | « Source/core/html/parser/CSSPreloadScanner.h ('k') | Source/core/html/parser/CompactHTMLToken.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/CSSPreloadScanner.cpp
diff --git a/Source/core/html/parser/CSSPreloadScanner.cpp b/Source/core/html/parser/CSSPreloadScanner.cpp
index b3f14547f2a30b6c4d69b5b0bffcb4b235e31b15..b1eea275aaa17a4aa9ff77070e93519115967481 100644
--- a/Source/core/html/parser/CSSPreloadScanner.cpp
+++ b/Source/core/html/parser/CSSPreloadScanner.cpp
@@ -29,7 +29,6 @@
#include "core/html/parser/CSSPreloadScanner.h"
#include "FetchInitiatorTypeNames.h"
-#include "core/html/parser/HTMLIdentifier.h"
#include "core/html/parser/HTMLParserIdioms.h"
#include "platform/text/SegmentedString.h"
@@ -66,16 +65,15 @@ void CSSPreloadScanner::scan(const HTMLToken::DataVector& data, const SegmentedS
scanCommon(data.data(), data.data() + data.size(), source, requests);
}
-void CSSPreloadScanner::scan(const HTMLIdentifier& identifier, const SegmentedString& source, PreloadRequestStream& requests)
+void CSSPreloadScanner::scan(const String& tagName, const SegmentedString& source, PreloadRequestStream& requests)
{
- const StringImpl* data = identifier.asStringImpl();
- if (data->is8Bit()) {
- const LChar* begin = data->characters8();
- scanCommon(begin, begin + data->length(), source, requests);
+ if (tagName.is8Bit()) {
+ const LChar* begin = tagName.characters8();
+ scanCommon(begin, begin + tagName.length(), source, requests);
return;
}
- const UChar* begin = data->characters16();
- scanCommon(begin, begin + data->length(), source, requests);
+ const UChar* begin = tagName.characters16();
+ scanCommon(begin, begin + tagName.length(), source, requests);
}
inline void CSSPreloadScanner::tokenize(UChar c, const SegmentedString& source)
« no previous file with comments | « Source/core/html/parser/CSSPreloadScanner.h ('k') | Source/core/html/parser/CompactHTMLToken.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698