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

Unified Diff: Source/core/html/HTMLViewSourceDocument.cpp

Issue 108313015: Make calls to AtomicString(const String&) explicit in html/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Take feedback into consideration Created 6 years, 12 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: Source/core/html/HTMLViewSourceDocument.cpp
diff --git a/Source/core/html/HTMLViewSourceDocument.cpp b/Source/core/html/HTMLViewSourceDocument.cpp
index 4a55226d0b4487a1c303cd08fa9b023b8df80a78..b47a8b89b7974f646cf4dfbb40be1249cb888f0f 100644
--- a/Source/core/html/HTMLViewSourceDocument.cpp
+++ b/Source/core/html/HTMLViewSourceDocument.cpp
@@ -139,21 +139,21 @@ void HTMLViewSourceDocument::processTagToken(const String& source, HTMLToken& to
while (index < source.length()) {
if (iter == token.attributes().end()) {
// We want to show the remaining characters in the token.
- index = addRange(source, index, source.length(), "");
+ index = addRange(source, index, source.length(), emptyAtom);
ASSERT(index == source.length());
break;
}
AtomicString name(iter->name);
- String value = StringImpl::create8BitIfPossible(iter->value);
+ AtomicString value(StringImpl::create8BitIfPossible(iter->value));
- index = addRange(source, index, iter->nameRange.start - token.startIndex(), "");
+ index = addRange(source, index, iter->nameRange.start - token.startIndex(), emptyAtom);
index = addRange(source, index, iter->nameRange.end - token.startIndex(), "webkit-html-attribute-name");
if (tagName == baseTag && name == hrefAttr)
addBase(value);
- index = addRange(source, index, iter->valueRange.start - token.startIndex(), "");
+ index = addRange(source, index, iter->valueRange.start - token.startIndex(), emptyAtom);
bool isLink = name == srcAttr || name == hrefAttr;
index = addRange(source, index, iter->valueRange.end - token.startIndex(), "webkit-html-attribute-value", isLink, tagName == aTag, value);
@@ -249,7 +249,7 @@ void HTMLViewSourceDocument::addText(const String& text, const AtomicString& cla
}
}
-int HTMLViewSourceDocument::addRange(const String& source, int start, int end, const String& className, bool isLink, bool isAnchor, const String& link)
+int HTMLViewSourceDocument::addRange(const String& source, int start, int end, const AtomicString& className, bool isLink, bool isAnchor, const AtomicString& link)
{
ASSERT(start <= end);
if (start == end)

Powered by Google App Engine
This is Rietveld 408576698