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

Unified Diff: Source/core/testing/Internals.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/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index 7adaee26e2c4440694fcf566189701fdefac53da..fa8b65291f14fd7f3879cd3bad9078d789e3a8f7 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -196,7 +196,7 @@ void Internals::resetToConsistentState(Page* page)
page->setPageScaleFactor(1, IntPoint(0, 0));
page->setPagination(Pagination());
TextRun::setAllowsRoundingHacks(false);
- WebCore::overrideUserPreferredLanguages(Vector<String>());
+ WebCore::overrideUserPreferredLanguages(Vector<AtomicString>());
delete s_pagePopupDriver;
s_pagePopupDriver = 0;
page->chrome().client().resetPagePopupDriver();
@@ -1259,14 +1259,19 @@ int Internals::lastSpellCheckProcessedSequence(Document* document, ExceptionStat
return requester->lastProcessedSequence();
}
-Vector<String> Internals::userPreferredLanguages() const
+Vector<AtomicString> Internals::userPreferredLanguages() const
{
return WebCore::userPreferredLanguages();
}
+// Optimally, the bindings generator would pass a Vector<AtomicString> here but
+// this is not supported yet.
void Internals::setUserPreferredLanguages(const Vector<String>& languages)
{
- WebCore::overrideUserPreferredLanguages(languages);
+ Vector<AtomicString> atomicLanguages;
+ for (size_t i = 0; i < languages.size(); ++i)
+ atomicLanguages.append(AtomicString(languages[i]));
+ WebCore::overrideUserPreferredLanguages(atomicLanguages);
}
unsigned Internals::wheelEventHandlerCount(Document* document, ExceptionState& exceptionState)

Powered by Google App Engine
This is Rietveld 408576698