<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196223] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196223">196223</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2016-02-06 15:18:47 -0800 (Sat, 06 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions
https://bugs.webkit.org/show_bug.cgi?id=153905

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* runtime/IntlObject.cpp:
(JSC::canonicalLangTag): Use converToASCIIUppercase on the language tag.

* runtime/StringPrototype.cpp:
(JSC::stringProtoFuncToLowerCase): Tweak style and update for name change.
(JSC::stringProtoFuncToUpperCase): Ditto.

Source/WebCore:

* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::isTypeSupported): Use convertToASCIILowercase on MIME type.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::selectText): Use new names for lower and upper. Also
tweaked style a tiny bit and used u_toupper rather than converting an entire
string to uppercase.

* dom/Document.cpp:
(WebCore::Document::addImageElementByCaseFoldedUsemap): Renamed to reflect the use
of case folding rather than lowercasing.
(WebCore::Document::removeImageElementByCaseFoldedUsemap): Ditto.
(WebCore::Document::imageElementByCaseFoldedUsemap): Ditto.
* dom/Document.h: Ditto.
* dom/DocumentOrderedMap.cpp:
(WebCore::DocumentOrderedMap::getElementByCaseFoldedMapName): Ditto.
(WebCore::DocumentOrderedMap::getElementByCaseFoldedUsemap): Ditto.
* dom/DocumentOrderedMap.h: Ditto.

* dom/TreeScope.cpp:
(WebCore::TreeScope::getImageMap): Removed unneeded special case for null string.
Simplified logic for cases where the URL does not have a &quot;#&quot; character in it.
Use case folding instead of lowercase.

* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processText): Removed unneded special case for the empty string.
Use makCapitalized instead of Cocoa function for &quot;capitalize&quot;. Use upper and lower
functions by their new names.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseAttribute): Use case folding instead of
lowerasing for the usemap attribute.
(WebCore::HTMLImageElement::insertedInto): Ditto.
(WebCore::HTMLImageElement::removedFrom): Ditto.
(WebCore::HTMLImageElement::matchesCaseFoldedUsemap): Ditto.
* html/HTMLImageElement.h: Rename since usemap is case folded now, not lowercased.

* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::imageElement): Use case folding instead of lowercasing
for usemap.
(WebCore::HTMLMapElement::parseAttribute): Ditto.

* platform/Language.cpp:
(WebCore::canonicalLanguageIdentifier): Use convertToASCIILowercase for language code.
(WebCore::indexOfBestMatchingLanguageInList): Ditto.

* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use new name for the upper function.

* platform/network/HTTPParsers.cpp:
(WebCore::parseContentTypeOptionsHeader): Use equalLettersIgnoringASCIICase instead
of lowercasing to check for a specific header value.

* platform/network/MIMEHeader.cpp:
(WebCore::retrieveKeyValuePairs): Use convertToASCIILowercase for MIME header name.
(WebCore::MIMEHeader::parseContentTransferEncoding): Use equalLettersIgnoringASCIICase
instead of lowercasing.

* platform/network/cf/ResourceHandleCFNet.cpp:
(WebCore::allowsAnyHTTPSCertificateHosts): Make this hash ASCII case-insensitive.
(WebCore::clientCertificates): Ditto.
(WebCore::ResourceHandle::createCFURLConnection): Remove call to lower since the
set is now ASCII case-insensitive.
(WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate): Ditto.
(WebCore::ResourceHandle::setClientCertificate): Ditto.

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::getNetscapeCookieFormat): Use equalLettersIgnoringASCIICase instead of
lowercasing.

* platform/network/curl/MultipartHandle.cpp:
(WebCore::MultipartHandle::didReceiveResponse): Use convertToASCIILowercase to
make a MIME type lowercase.

* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate): Removed unneeded
conversion to lowercase now that the set is ASCII case-insensitive.
(WebCore::ResourceHandle::setClientCertificate): Removed code that populates a map
that is then never used for anything.

* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::headerCallback): Use convertToASCIILowercase for MIME type.

* platform/network/curl/SSLHandle.cpp: Made hash maps keyed by host names
ASCII case-insensitive.
(WebCore::addAllowedClientCertificate): Removed lowercasing since the map itself
is now ASCII case insensitve.
(WebCore::setSSLClientCertificate): Ditto. Also use auto for iterator type so we
don't have to write out the map type.
(WebCore::sslIgnoreHTTPSCertificate): Ditto.
(WebCore::certVerifyCallback): Ditto.

* platform/network/soup/ResourceHandleSoup.cpp: Made hash maps keyed by host names
ASCII case-insensitive.
(WebCore::allowsAnyHTTPSCertificateHosts): Ditto.
(WebCore::handleUnignoredTLSErrors): Ditto.
(WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate): Ditto.
(WebCore::ResourceHandle::setClientCertificate): Ditto.

* platform/text/LocaleToScriptMappingDefault.cpp: Made hash maps keyed by script
names ASCII case-insensitive. USE WTF_ARRAY_LENGTH as appropriate.
(WebCore::scriptNameToCode): Use modern style to initialize the map. Removed
unnecessary lowercasing of the script name before looking at the map.
(WebCore::localeToScriptCodeForFontSelection): Ditto.

* platform/text/win/LocaleWin.cpp:
(WebCore::convertLocaleNameToLCID): Made map ASCII case-insensitive and removed
unneeded lowercasing.

* platform/win/PasteboardWin.cpp:
(WebCore::clipboardTypeFromMIMEType): Use equalLettersIgnoringASCIICase instead
of lowercasing.

* rendering/RenderText.cpp:
(WebCore::applyTextTransform): Use new names for the upper and lower functions.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseIsXML): Remove unneeded lowercasing, since
DOMImplementation now has ASCII case-insensitive handling of MIME types.

Source/WebKit/mac:

* Plugins/WebBasePluginPackage.mm:
(-[WebBasePluginPackage getPluginInfoFromPLists]): Use modern for loops.
(-[WebBasePluginPackage supportsExtension:]): Use convertToASCIILowercase for extension assert.
Also use modern for loop.
(-[WebBasePluginPackage supportsMIMEType:]): Ditto.
(-[WebBasePluginPackage MIMETypeForExtension:]): Ditto.

Source/WebKit/win:

* Plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::pluginForMIMEType): Use ASCII case-insensitive map rather
than lowercasing the MIME type.
(WebCore::PluginDatabase::setPreferredPluginForMIMEType): Ditto.

* Plugins/PluginDatabase.h: Make m_preferredPlugins use an ASCII case-insensitive hash.

* Plugins/PluginPackage.h: Use ASCII case-insensitive hash for maps keyed by MIME type.

* Plugins/PluginPackageWin.cpp:
(WebCore::PluginPackage::fetchInfo): Use convertToASCIILowercase to lowercase a MIME type.

Source/WebKit2:

* NetworkProcess/CustomProtocols/CustomProtocolManager.h: Use ASCII case-insensitive hash
for set of registered schemes.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::getPluginInfoFromPropertyLists): Use convertToASCIILowercase for MIME type and
for file extensions.

* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::parseMIMEDescription): Use convertToASCIILowercase for
MIME description.

* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_preferred_languages_set): Use convertToASCIILowercase for language.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_preferred_languages): Use convertToASCIILowercase for language.

* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::findPluginForExtension): Use Vector::contains instead of
writing it out using std::find.
(WebKit::pathExtension): Lowercase the result with convertToASCIILowercase instead of
leaving that to the caller.
(WebKit::PluginInfoStore::findPlugin): Removed call to lower since pathExtension
handles that now.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin): Use convertToASCIILowercase for MIME type.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::globalURLSchemesWithCustomProtocolHandlers): Use
an ASCII case-insensitive hash.
(WebKit::WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers):
Remove lowercasing, since the hash is now ASCII case-insensitive.
(WebKit::WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
Ditto.

* UIProcess/WebProcessPool.h: Use an ASCII case-insensitive hash.

* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::initialize): Use convertToASCIILowercase on parameter names
and values.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::pluginSupportsExtension): Use convertToASCIILowercase for extension assertion.
Also use a modern for loop.
(WebKit::WebFrameLoaderClient::objectContentType): Make the checks for empty MIME types
a little less redundant. Reordered logic to avoid checking the list of supported MIME
types extra times, and to eliminate the need for a boolean. Use convertToASCIILowercase
on the extension.

Source/WTF:

* wtf/text/AtomicString.cpp:
(WTF::AtomicString::lower): Deleted.
* wtf/text/AtomicString.h: Deleted the lower function.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::convertToLowercaseWithoutLocale): Renamed from lower.
(WTF::StringImpl::convertToUppercaseWithoutLocale): Renamed from upper.
(WTF::StringImpl::convertToLowercaseWithLocale): Renamed from lower.
(WTF::StringImpl::convertToUppercaseWithLocale): Renamed from upper.
(WTF::StringImpl::foldCase): Added fast cases for ASCII since this is
now used in some more-performance-critical code.
* wtf/text/StringImpl.h: Renamed lower and upper.

* wtf/text/WTFString.cpp:
(WTF::String::convertToLowercaseWithoutLocale): Renamed from lower.
(WTF::String::convertToUppercaseWithoutLocale): Renamed from upper.
(WTF::String::convertToLowercaseWithLocale): Renamed from lower.
(WTF::String::convertToUppercaseWithLocale): Renamed from upper.
* wtf/text/WTFString.h: Renamed lower and upper. Removed unneeded comment.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeIntlObjectcpp">trunk/Source/JavaScriptCore/runtime/IntlObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStringPrototypecpp">trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtftextAtomicStringcpp">trunk/Source/WTF/wtf/text/AtomicString.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextAtomicStringh">trunk/Source/WTF/wtf/text/AtomicString.h</a></li>
<li><a href="#trunkSourceWTFwtftextStringImplcpp">trunk/Source/WTF/wtf/text/StringImpl.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextStringImplh">trunk/Source/WTF/wtf/text/StringImpl.h</a></li>
<li><a href="#trunkSourceWTFwtftextWTFStringcpp">trunk/Source/WTF/wtf/text/WTFString.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextWTFStringh">trunk/Source/WTF/wtf/text/WTFString.h</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceMediaSourcecpp">trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentOrderedMapcpp">trunk/Source/WebCore/dom/DocumentOrderedMap.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentOrderedMaph">trunk/Source/WebCore/dom/DocumentOrderedMap.h</a></li>
<li><a href="#trunkSourceWebCoredomTreeScopecpp">trunk/Source/WebCore/dom/TreeScope.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaHTMLConvertermm">trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLImageElementcpp">trunk/Source/WebCore/html/HTMLImageElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLImageElementh">trunk/Source/WebCore/html/HTMLImageElement.h</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLMapElementcpp">trunk/Source/WebCore/html/HTMLMapElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformLanguagecpp">trunk/Source/WebCore/platform/Language.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp">trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkHTTPParserscpp">trunk/Source/WebCore/platform/network/HTTPParsers.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkMIMEHeadercpp">trunk/Source/WebCore/platform/network/MIMEHeader.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp">trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlCookieJarCurlcpp">trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlMultipartHandlecpp">trunk/Source/WebCore/platform/network/curl/MultipartHandle.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlResourceHandleCurlcpp">trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlResourceHandleManagercpp">trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlSSLHandlecpp">trunk/Source/WebCore/platform/network/curl/SSLHandle.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupResourceHandleSoupcpp">trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformtextLocaleToScriptMappingDefaultcpp">trunk/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformtextwinLocaleWincpp">trunk/Source/WebCore/platform/text/win/LocaleWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformwinPasteboardWincpp">trunk/Source/WebCore/platform/win/PasteboardWin.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTextcpp">trunk/Source/WebCore/rendering/RenderText.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXMLHttpRequestcpp">trunk/Source/WebCore/xml/XMLHttpRequest.cpp</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacPluginsWebBasePluginPackagemm">trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinPluginsPluginDatabasecpp">trunk/Source/WebKit/win/Plugins/PluginDatabase.cpp</a></li>
<li><a href="#trunkSourceWebKitwinPluginsPluginDatabaseh">trunk/Source/WebKit/win/Plugins/PluginDatabase.h</a></li>
<li><a href="#trunkSourceWebKitwinPluginsPluginPackageh">trunk/Source/WebKit/win/Plugins/PluginPackage.h</a></li>
<li><a href="#trunkSourceWebKitwinPluginsPluginPackageWincpp">trunk/Source/WebKit/win/Plugins/PluginPackageWin.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagerh">trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h</a></li>
<li><a href="#trunkSourceWebKit2SharedPluginsNetscapemacNetscapePluginModuleMacmm">trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedPluginsNetscapex11NetscapePluginModuleX11cpp">trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflewk_contextcpp">trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsPluginInfoStorecpp">trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolcpp">trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolh">trunk/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessPluginsNetscapeNetscapePlugincpp">trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-02-06  Darin Adler  &lt;darin@apple.com&gt;
+
+        Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions
+        https://bugs.webkit.org/show_bug.cgi?id=153905
+
+        Reviewed by Sam Weinig.
+
+        * runtime/IntlObject.cpp:
+        (JSC::canonicalLangTag): Use converToASCIIUppercase on the language tag.
+
+        * runtime/StringPrototype.cpp:
+        (JSC::stringProtoFuncToLowerCase): Tweak style and update for name change.
+        (JSC::stringProtoFuncToUpperCase): Ditto.
+
</ins><span class="cx"> 2016-02-06  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Object.getOwnPropertyDescriptor() does not work on sub-frame's window
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeIntlObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/IntlObject.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/IntlObject.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/JavaScriptCore/runtime/IntlObject.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -322,7 +322,7 @@
</span><span class="cx">         if (isValidRegion) {
</span><span class="cx">             ++currentIndex;
</span><span class="cx">             canonical.append('-');
</span><del>-            canonical.append(region.upper());
</del><ins>+            canonical.append(region.convertToASCIIUppercase());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStringPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1406,17 +1406,10 @@
</span><span class="cx">         return throwVMTypeError(exec);
</span><span class="cx">     JSString* sVal = thisValue.toString(exec);
</span><span class="cx">     const String&amp; s = sVal-&gt;value(exec);
</span><del>-
-    int sSize = s.length();
-    if (!sSize)
</del><ins>+    String lowercasedString = s.convertToLowercaseWithoutLocale();
+    if (lowercasedString.impl() == s.impl())
</ins><span class="cx">         return JSValue::encode(sVal);
</span><del>-    RELEASE_ASSERT(sSize &gt;= 0);
-
-    StringImpl* ourImpl = s.impl();
-    RefPtr&lt;StringImpl&gt; lower = ourImpl-&gt;lower();
-    if (ourImpl == lower)
-        return JSValue::encode(sVal);
-    return JSValue::encode(jsString(exec, String(lower.release())));
</del><ins>+    return JSValue::encode(jsString(exec, lowercasedString));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL stringProtoFuncToUpperCase(ExecState* exec)
</span><span class="lines">@@ -1426,16 +1419,10 @@
</span><span class="cx">         return throwVMTypeError(exec);
</span><span class="cx">     JSString* sVal = thisValue.toString(exec);
</span><span class="cx">     const String&amp; s = sVal-&gt;value(exec);
</span><del>-
-    int sSize = s.length();
-    if (!sSize)
</del><ins>+    String uppercasedString = s.convertToUppercaseWithoutLocale();
+    if (uppercasedString.impl() == s.impl())
</ins><span class="cx">         return JSValue::encode(sVal);
</span><del>-
-    StringImpl* sImpl = s.impl();
-    RefPtr&lt;StringImpl&gt; upper = sImpl-&gt;upper();
-    if (sImpl == upper)
-        return JSValue::encode(sVal);
-    return JSValue::encode(jsString(exec, String(upper.release())));
</del><ins>+    return JSValue::encode(jsString(exec, uppercasedString));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL stringProtoFuncLocaleCompare(ExecState* exec)
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WTF/ChangeLog        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-02-06  Darin Adler  &lt;darin@apple.com&gt;
+
+        Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions
+        https://bugs.webkit.org/show_bug.cgi?id=153905
+
+        Reviewed by Sam Weinig.
+
+        * wtf/text/AtomicString.cpp:
+        (WTF::AtomicString::lower): Deleted.
+        * wtf/text/AtomicString.h: Deleted the lower function.
+
+        * wtf/text/StringImpl.cpp:
+        (WTF::StringImpl::convertToLowercaseWithoutLocale): Renamed from lower.
+        (WTF::StringImpl::convertToUppercaseWithoutLocale): Renamed from upper.
+        (WTF::StringImpl::convertToLowercaseWithLocale): Renamed from lower.
+        (WTF::StringImpl::convertToUppercaseWithLocale): Renamed from upper.
+        (WTF::StringImpl::foldCase): Added fast cases for ASCII since this is
+        now used in some more-performance-critical code.
+        * wtf/text/StringImpl.h: Renamed lower and upper.
+
+        * wtf/text/WTFString.cpp:
+        (WTF::String::convertToLowercaseWithoutLocale): Renamed from lower.
+        (WTF::String::convertToUppercaseWithoutLocale): Renamed from upper.
+        (WTF::String::convertToLowercaseWithLocale): Renamed from lower.
+        (WTF::String::convertToUppercaseWithLocale): Renamed from upper.
+        * wtf/text/WTFString.h: Renamed lower and upper. Removed unneeded comment.
+
</ins><span class="cx"> 2016-02-03  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Convert another batch of String::lower callsites to something better, typically convertToASCIILowercase
</span></span></pre></div>
<a id="trunkSourceWTFwtftextAtomicStringcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/AtomicString.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/AtomicString.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WTF/wtf/text/AtomicString.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -32,22 +32,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WTF {
</span><span class="cx"> 
</span><del>-AtomicString AtomicString::lower() const
-{
-    // Note: This is a hot function in the Dromaeo benchmark.
-    StringImpl* impl = this-&gt;impl();
-    if (UNLIKELY(!impl))
-        return AtomicString();
-
-    RefPtr&lt;StringImpl&gt; lowercasedString = impl-&gt;lower();
-    if (LIKELY(lowercasedString == impl))
-        return *this;
-
-    AtomicString result;
-    result.m_string = AtomicStringImpl::add(lowercasedString.get());
-    return result;
-}
-
</del><span class="cx"> template&lt;AtomicString::CaseConvertType type&gt;
</span><span class="cx"> ALWAYS_INLINE AtomicString AtomicString::convertASCIICase() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWTFwtftextAtomicStringh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/AtomicString.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/AtomicString.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WTF/wtf/text/AtomicString.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -155,7 +155,6 @@
</span><span class="cx"> 
</span><span class="cx">     WTF_EXPORT_STRING_API AtomicString convertToASCIILowercase() const;
</span><span class="cx">     WTF_EXPORT_STRING_API AtomicString convertToASCIIUppercase() const;
</span><del>-    WTF_EXPORT_STRING_API AtomicString lower() const;
</del><span class="cx"> 
</span><span class="cx">     int toInt(bool* ok = 0) const { return m_string.toInt(ok); }
</span><span class="cx">     double toDouble(bool* ok = 0) const { return m_string.toDouble(ok); }
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringImpl.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringImpl.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WTF/wtf/text/StringImpl.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -361,9 +361,9 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;StringImpl&gt; StringImpl::lower()
</del><ins>+Ref&lt;StringImpl&gt; StringImpl::convertToLowercaseWithoutLocale()
</ins><span class="cx"> {
</span><del>-    // Note: This is a hot function in the Dromaeo benchmark, specifically the
</del><ins>+    // Note: At one time this was a hot function in the Dromaeo benchmark, specifically the
</ins><span class="cx">     // no-op code path up through the first 'return' statement.
</span><span class="cx"> 
</span><span class="cx">     // First scan the string for uppercase and non-ASCII characters:
</span><span class="lines">@@ -442,11 +442,12 @@
</span><span class="cx">     return newImpl.releaseNonNull();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;StringImpl&gt; StringImpl::upper()
</del><ins>+Ref&lt;StringImpl&gt; StringImpl::convertToUppercaseWithoutLocale()
</ins><span class="cx"> {
</span><del>-    // This function could be optimized for no-op cases the way lower() is,
-    // but in empirical testing, few actual calls to upper() are no-ops, so
-    // it wouldn't be worth the extra time for pre-scanning.
</del><ins>+    // This function could be optimized for no-op cases the way
+    // convertToLowercaseWithoutLocale() is, but in empirical testing,
+    // few actual calls to upper() are no-ops, so it wouldn't be worth
+    // the extra time for pre-scanning.
</ins><span class="cx"> 
</span><span class="cx">     if (m_length &gt; static_cast&lt;unsigned&gt;(std::numeric_limits&lt;int32_t&gt;::max()))
</span><span class="cx">         CRASH();
</span><span class="lines">@@ -477,7 +478,7 @@
</span><span class="cx">         int numberSharpSCharacters = 0;
</span><span class="cx"> 
</span><span class="cx">         // There are two special cases.
</span><del>-        //  1. latin-1 characters when converted to upper case are 16 bit characters.
</del><ins>+        //  1. Some Latin-1 characters when converted to upper case are 16 bit characters.
</ins><span class="cx">         //  2. Lower case sharp-S converts to &quot;SS&quot; (two characters)
</span><span class="cx">         for (int32_t i = 0; i &lt; length; ++i) {
</span><span class="cx">             LChar c = m_data8[i];
</span><span class="lines">@@ -485,7 +486,7 @@
</span><span class="cx">                 ++numberSharpSCharacters;
</span><span class="cx">             ASSERT(u_toupper(c) &lt;= 0xFFFF);
</span><span class="cx">             UChar upper = u_toupper(c);
</span><del>-            if (UNLIKELY(upper &gt; 0xff)) {
</del><ins>+            if (UNLIKELY(upper &gt; 0xFF)) {
</ins><span class="cx">                 // Since this upper-cased character does not fit in an 8-bit string, we need to take the 16-bit path.
</span><span class="cx">                 goto upconvert;
</span><span class="cx">             }
</span><span class="lines">@@ -554,14 +555,14 @@
</span><span class="cx">         &amp;&amp; (localeIdentifier.length() == 2 || localeIdentifier[2] == '-');
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;StringImpl&gt; StringImpl::lower(const AtomicString&amp; localeIdentifier)
</del><ins>+Ref&lt;StringImpl&gt; StringImpl::convertToLowercaseWithLocale(const AtomicString&amp; localeIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     // Use the more-optimized code path most of the time.
</span><span class="cx">     // Assuming here that the only locale-specific lowercasing is the Turkish casing rules.
</span><span class="cx">     // FIXME: Could possibly optimize further by looking for the specific sequences
</span><span class="cx">     // that have locale-specific lowercasing. There are only three of them.
</span><span class="cx">     if (!needsTurkishCasingRules(localeIdentifier))
</span><del>-        return lower();
</del><ins>+        return convertToLowercaseWithoutLocale();
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Could share more code with the main StringImpl::lower by factoring out
</span><span class="cx">     // this last part into a shared function that takes a locale string, since this is
</span><span class="lines">@@ -590,13 +591,13 @@
</span><span class="cx">     return newString.releaseNonNull();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;StringImpl&gt; StringImpl::upper(const AtomicString&amp; localeIdentifier)
</del><ins>+Ref&lt;StringImpl&gt; StringImpl::convertToUppercaseWithLocale(const AtomicString&amp; localeIdentifier)
</ins><span class="cx"> {
</span><span class="cx">     // Use the more-optimized code path most of the time.
</span><span class="cx">     // Assuming here that the only locale-specific lowercasing is the Turkish casing rules,
</span><span class="cx">     // and that the only affected character is lowercase &quot;i&quot;.
</span><span class="cx">     if (!needsTurkishCasingRules(localeIdentifier) || find('i') == notFound)
</span><del>-        return upper();
</del><ins>+        return convertToUppercaseWithoutLocale();
</ins><span class="cx"> 
</span><span class="cx">     if (m_length &gt; static_cast&lt;unsigned&gt;(std::numeric_limits&lt;int32_t&gt;::max()))
</span><span class="cx">         CRASH();
</span><span class="lines">@@ -623,60 +624,86 @@
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;StringImpl&gt; StringImpl::foldCase()
</span><span class="cx"> {
</span><del>-    // FIXME: Why doesn't this function have a preflight like the one in StringImpl::lower?
-
-    if (m_length &gt; static_cast&lt;unsigned&gt;(std::numeric_limits&lt;int32_t&gt;::max()))
-        CRASH();
-    int32_t length = m_length;
-
</del><span class="cx">     if (is8Bit()) {
</span><del>-        // Do a faster loop for the case where all the characters are ASCII.
-        LChar* data;
-        auto newImpl = createUninitialized(m_length, data);
-        LChar ored = 0;
</del><ins>+        unsigned failingIndex;
+        for (unsigned i = 0; i &lt; m_length; ++i) {
+            auto character = m_data8[i];
+            if (UNLIKELY(!isASCII(character) || isASCIIUpper(character))) {
+                failingIndex = i;
+                goto SlowPath;
+            }
+        }
+        // String was all ASCII and no uppercase, so just return as-is.
+        return *this;
</ins><span class="cx"> 
</span><del>-        for (int32_t i = 0; i &lt; length; ++i) {
-            LChar c = m_data8[i];
-            data[i] = toASCIILower(c);
-            ored |= c;
</del><ins>+SlowPath:
+        bool need16BitCharacters = false;
+        for (unsigned i = failingIndex; i &lt; m_length; ++i) {
+            auto character = m_data8[i];
+            if (character == 0xB5 || character == 0xDF) {
+                need16BitCharacters = true;
+                break;
+            }
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (!(ored &amp; ~0x7F))
-            return newImpl;
-
-        // Do a slower implementation for cases that include non-ASCII Latin-1 characters.
-        // FIXME: Shouldn't this use u_foldCase instead of u_tolower?
-        for (int32_t i = 0; i &lt; length; ++i) {
-            ASSERT(u_tolower(m_data8[i]) &lt;= 0xFF);
-            data[i] = static_cast&lt;LChar&gt;(u_tolower(m_data8[i]));
</del><ins>+        if (!need16BitCharacters) {
+            LChar* data8;
+            auto folded = createUninitializedInternalNonEmpty(m_length, data8);
+            for (unsigned i = 0; i &lt; failingIndex; ++i)
+                data8[i] = m_data8[i];
+            for (unsigned i = failingIndex; i &lt; m_length; ++i) {
+                auto character = m_data8[i];
+                if (isASCII(character))
+                    data8[i] = toASCIILower(character);
+                else {
+                    ASSERT(u_foldCase(character, U_FOLD_CASE_DEFAULT) &lt;= 0xFF);
+                    data8[i] = static_cast&lt;LChar&gt;(u_foldCase(character, U_FOLD_CASE_DEFAULT));
+                }
+            }
+            return folded;
</ins><span class="cx">         }
</span><del>-
-        return newImpl;
</del><ins>+    } else {
+        // FIXME: Unclear why we use goto in the 8-bit case, and a different approach in the 16-bit case.
+        bool noUpper = true;
+        unsigned ored = 0;
+        for (unsigned i = 0; i &lt; m_length; ++i) {
+            UChar character = m_data16[i];
+            if (UNLIKELY(isASCIIUpper(character)))
+                noUpper = false;
+            ored |= character;
+        }
+        if (!(ored &amp; ~0x7F)) {
+            if (noUpper) {
+                // String was all ASCII and no uppercase, so just return as-is.
+                return *this;
+            }
+            UChar* data16;
+            auto folded = createUninitializedInternalNonEmpty(m_length, data16);
+            for (unsigned i = 0; i &lt; m_length; ++i)
+                data16[i] = toASCIILower(m_data16[i]);
+            return folded;
+        }
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Do a faster loop for the case where all the characters are ASCII.
</del><ins>+    if (m_length &gt; static_cast&lt;unsigned&gt;(std::numeric_limits&lt;int32_t&gt;::max()))
+        CRASH();
+
+    auto upconvertedCharacters = StringView(*this).upconvertedCharacters();
+
</ins><span class="cx">     UChar* data;
</span><del>-    RefPtr&lt;StringImpl&gt; newImpl = createUninitialized(m_length, data);
-    UChar ored = 0;
-    for (int32_t i = 0; i &lt; length; ++i) {
-        UChar c = m_data16[i];
-        ored |= c;
-        data[i] = toASCIILower(c);
-    }
-    if (!(ored &amp; ~0x7F))
-        return newImpl.releaseNonNull();
-
-    // Do a slower implementation for cases that include non-ASCII characters.
</del><ins>+    auto folded = createUninitializedInternalNonEmpty(m_length, data);
+    int32_t length = m_length;
</ins><span class="cx">     UErrorCode status = U_ZERO_ERROR;
</span><del>-    int32_t realLength = u_strFoldCase(data, length, m_data16, m_length, U_FOLD_CASE_DEFAULT, &amp;status);
</del><ins>+    int32_t realLength = u_strFoldCase(data, length, upconvertedCharacters, length, U_FOLD_CASE_DEFAULT, &amp;status);
</ins><span class="cx">     if (U_SUCCESS(status) &amp;&amp; realLength == length)
</span><del>-        return newImpl.releaseNonNull();
-    newImpl = createUninitialized(realLength, data);
</del><ins>+        return folded;
+    ASSERT(realLength &gt; length);
+    folded = createUninitializedInternalNonEmpty(realLength, data);
</ins><span class="cx">     status = U_ZERO_ERROR;
</span><del>-    u_strFoldCase(data, realLength, m_data16, m_length, U_FOLD_CASE_DEFAULT, &amp;status);
</del><ins>+    u_strFoldCase(data, realLength, upconvertedCharacters, length, U_FOLD_CASE_DEFAULT, &amp;status);
</ins><span class="cx">     if (U_FAILURE(status))
</span><span class="cx">         return *this;
</span><del>-    return newImpl.releaseNonNull();
</del><ins>+    return folded;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> template&lt;StringImpl::CaseConvertType type, typename CharacterType&gt;
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringImpl.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringImpl.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WTF/wtf/text/StringImpl.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -681,10 +681,10 @@
</span><span class="cx"> 
</span><span class="cx">     WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; convertToASCIILowercase();
</span><span class="cx">     WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; convertToASCIIUppercase();
</span><del>-    WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; lower();
-    WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; upper();
-    WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; lower(const AtomicString&amp; localeIdentifier);
-    WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; upper(const AtomicString&amp; localeIdentifier);
</del><ins>+    WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; convertToLowercaseWithoutLocale();
+    WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; convertToUppercaseWithoutLocale();
+    WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; convertToLowercaseWithLocale(const AtomicString&amp; localeIdentifier);
+    WTF_EXPORT_STRING_API Ref&lt;StringImpl&gt; convertToUppercaseWithLocale(const AtomicString&amp; localeIdentifier);
</ins><span class="cx"> 
</span><span class="cx">     Ref&lt;StringImpl&gt; foldCase();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWTFwtftextWTFStringcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/WTFString.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/WTFString.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WTF/wtf/text/WTFString.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -351,32 +351,32 @@
</span><span class="cx">     return m_impl-&gt;convertToASCIIUppercase();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-String String::lower() const
</del><ins>+String String::convertToLowercaseWithoutLocale() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_impl)
</span><span class="cx">         return String();
</span><del>-    return m_impl-&gt;lower();
</del><ins>+    return m_impl-&gt;convertToLowercaseWithoutLocale();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String String::upper() const
</del><ins>+String String::convertToUppercaseWithoutLocale() const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_impl)
</span><span class="cx">         return String();
</span><del>-    return m_impl-&gt;upper();
</del><ins>+    return m_impl-&gt;convertToUppercaseWithoutLocale();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String String::lower(const AtomicString&amp; localeIdentifier) const
</del><ins>+String String::convertToLowercaseWithLocale(const AtomicString&amp; localeIdentifier) const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_impl)
</span><span class="cx">         return String();
</span><del>-    return m_impl-&gt;lower(localeIdentifier);
</del><ins>+    return m_impl-&gt;convertToLowercaseWithLocale(localeIdentifier);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-String String::upper(const AtomicString&amp; localeIdentifier) const
</del><ins>+String String::convertToUppercaseWithLocale(const AtomicString&amp; localeIdentifier) const
</ins><span class="cx"> {
</span><span class="cx">     if (!m_impl)
</span><span class="cx">         return String();
</span><del>-    return m_impl-&gt;upper(localeIdentifier);
</del><ins>+    return m_impl-&gt;convertToUppercaseWithLocale(localeIdentifier);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String String::stripWhiteSpace() const
</span></span></pre></div>
<a id="trunkSourceWTFwtftextWTFStringh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/WTFString.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/WTFString.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WTF/wtf/text/WTFString.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -331,17 +331,13 @@
</span><span class="cx">     String left(unsigned len) const { return substring(0, len); }
</span><span class="cx">     String right(unsigned len) const { return substring(length() - len, len); }
</span><span class="cx"> 
</span><del>-    // Returns a lowercase/uppercase version of the string.
-    // The convertToASCIILowercase is useful in many contexts such as HTML where we don't
-    // want to do any conversion for non-ASCII letters.
</del><span class="cx">     WTF_EXPORT_STRING_API String convertToASCIILowercase() const;
</span><del>-    WTF_EXPORT_STRING_API String lower() const;
</del><span class="cx">     WTF_EXPORT_STRING_API String convertToASCIIUppercase() const;
</span><del>-    WTF_EXPORT_STRING_API String upper() const;
</del><ins>+    WTF_EXPORT_STRING_API String convertToLowercaseWithoutLocale() const;
+    WTF_EXPORT_STRING_API String convertToUppercaseWithoutLocale() const;
+    WTF_EXPORT_STRING_API String convertToLowercaseWithLocale(const AtomicString&amp; localeIdentifier) const;
+    WTF_EXPORT_STRING_API String convertToUppercaseWithLocale(const AtomicString&amp; localeIdentifier) const;
</ins><span class="cx"> 
</span><del>-    WTF_EXPORT_STRING_API String lower(const AtomicString&amp; localeIdentifier) const;
-    WTF_EXPORT_STRING_API String upper(const AtomicString&amp; localeIdentifier) const;
-
</del><span class="cx">     WTF_EXPORT_STRING_API String stripWhiteSpace() const;
</span><span class="cx">     WTF_EXPORT_STRING_API String stripWhiteSpace(IsWhiteSpaceFunctionPtr) const;
</span><span class="cx">     WTF_EXPORT_STRING_API String simplifyWhiteSpace() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/ChangeLog        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1,3 +1,130 @@
</span><ins>+2016-02-06  Darin Adler  &lt;darin@apple.com&gt;
+
+        Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions
+        https://bugs.webkit.org/show_bug.cgi?id=153905
+
+        Reviewed by Sam Weinig.
+
+        * Modules/mediasource/MediaSource.cpp:
+        (WebCore::MediaSource::isTypeSupported): Use convertToASCIILowercase on MIME type.
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::AccessibilityObject::selectText): Use new names for lower and upper. Also
+        tweaked style a tiny bit and used u_toupper rather than converting an entire
+        string to uppercase.
+
+        * dom/Document.cpp:
+        (WebCore::Document::addImageElementByCaseFoldedUsemap): Renamed to reflect the use
+        of case folding rather than lowercasing.
+        (WebCore::Document::removeImageElementByCaseFoldedUsemap): Ditto.
+        (WebCore::Document::imageElementByCaseFoldedUsemap): Ditto.
+        * dom/Document.h: Ditto.
+        * dom/DocumentOrderedMap.cpp:
+        (WebCore::DocumentOrderedMap::getElementByCaseFoldedMapName): Ditto.
+        (WebCore::DocumentOrderedMap::getElementByCaseFoldedUsemap): Ditto.
+        * dom/DocumentOrderedMap.h: Ditto.
+
+        * dom/TreeScope.cpp:
+        (WebCore::TreeScope::getImageMap): Removed unneeded special case for null string.
+        Simplified logic for cases where the URL does not have a &quot;#&quot; character in it.
+        Use case folding instead of lowercase.
+
+        * editing/cocoa/HTMLConverter.mm:
+        (HTMLConverter::_processText): Removed unneded special case for the empty string.
+        Use makCapitalized instead of Cocoa function for &quot;capitalize&quot;. Use upper and lower
+        functions by their new names.
+
+        * html/HTMLImageElement.cpp:
+        (WebCore::HTMLImageElement::parseAttribute): Use case folding instead of
+        lowerasing for the usemap attribute.
+        (WebCore::HTMLImageElement::insertedInto): Ditto.
+        (WebCore::HTMLImageElement::removedFrom): Ditto.
+        (WebCore::HTMLImageElement::matchesCaseFoldedUsemap): Ditto.
+        * html/HTMLImageElement.h: Rename since usemap is case folded now, not lowercased.
+
+        * html/HTMLMapElement.cpp:
+        (WebCore::HTMLMapElement::imageElement): Use case folding instead of lowercasing
+        for usemap.
+        (WebCore::HTMLMapElement::parseAttribute): Ditto.
+
+        * platform/Language.cpp:
+        (WebCore::canonicalLanguageIdentifier): Use convertToASCIILowercase for language code.
+        (WebCore::indexOfBestMatchingLanguageInList): Ditto.
+
+        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
+        (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use new name for the upper function.
+
+        * platform/network/HTTPParsers.cpp:
+        (WebCore::parseContentTypeOptionsHeader): Use equalLettersIgnoringASCIICase instead
+        of lowercasing to check for a specific header value.
+
+        * platform/network/MIMEHeader.cpp:
+        (WebCore::retrieveKeyValuePairs): Use convertToASCIILowercase for MIME header name.
+        (WebCore::MIMEHeader::parseContentTransferEncoding): Use equalLettersIgnoringASCIICase
+        instead of lowercasing.
+
+        * platform/network/cf/ResourceHandleCFNet.cpp:
+        (WebCore::allowsAnyHTTPSCertificateHosts): Make this hash ASCII case-insensitive.
+        (WebCore::clientCertificates): Ditto.
+        (WebCore::ResourceHandle::createCFURLConnection): Remove call to lower since the
+        set is now ASCII case-insensitive.
+        (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate): Ditto.
+        (WebCore::ResourceHandle::setClientCertificate): Ditto.
+
+        * platform/network/curl/CookieJarCurl.cpp:
+        (WebCore::getNetscapeCookieFormat): Use equalLettersIgnoringASCIICase instead of
+        lowercasing.
+
+        * platform/network/curl/MultipartHandle.cpp:
+        (WebCore::MultipartHandle::didReceiveResponse): Use convertToASCIILowercase to
+        make a MIME type lowercase.
+
+        * platform/network/curl/ResourceHandleCurl.cpp:
+        (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate): Removed unneeded
+        conversion to lowercase now that the set is ASCII case-insensitive.
+        (WebCore::ResourceHandle::setClientCertificate): Removed code that populates a map
+        that is then never used for anything.
+
+        * platform/network/curl/ResourceHandleManager.cpp:
+        (WebCore::headerCallback): Use convertToASCIILowercase for MIME type.
+
+        * platform/network/curl/SSLHandle.cpp: Made hash maps keyed by host names
+        ASCII case-insensitive.
+        (WebCore::addAllowedClientCertificate): Removed lowercasing since the map itself
+        is now ASCII case insensitve.
+        (WebCore::setSSLClientCertificate): Ditto. Also use auto for iterator type so we
+        don't have to write out the map type.
+        (WebCore::sslIgnoreHTTPSCertificate): Ditto.
+        (WebCore::certVerifyCallback): Ditto.
+
+        * platform/network/soup/ResourceHandleSoup.cpp: Made hash maps keyed by host names
+        ASCII case-insensitive.
+        (WebCore::allowsAnyHTTPSCertificateHosts): Ditto.
+        (WebCore::handleUnignoredTLSErrors): Ditto.
+        (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate): Ditto.
+        (WebCore::ResourceHandle::setClientCertificate): Ditto.
+
+        * platform/text/LocaleToScriptMappingDefault.cpp: Made hash maps keyed by script
+        names ASCII case-insensitive. USE WTF_ARRAY_LENGTH as appropriate.
+        (WebCore::scriptNameToCode): Use modern style to initialize the map. Removed
+        unnecessary lowercasing of the script name before looking at the map.
+        (WebCore::localeToScriptCodeForFontSelection): Ditto.
+
+        * platform/text/win/LocaleWin.cpp:
+        (WebCore::convertLocaleNameToLCID): Made map ASCII case-insensitive and removed
+        unneeded lowercasing.
+
+        * platform/win/PasteboardWin.cpp:
+        (WebCore::clipboardTypeFromMIMEType): Use equalLettersIgnoringASCIICase instead
+        of lowercasing.
+
+        * rendering/RenderText.cpp:
+        (WebCore::applyTextTransform): Use new names for the upper and lower functions.
+
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::responseIsXML): Remove unneeded lowercasing, since
+        DOMImplementation now has ASCII case-insensitive handling of MIME types.
+
</ins><span class="cx"> 2016-02-06  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Outline should contribute to visual overflow.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceMediaSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/Modules/mediasource/MediaSource.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -733,7 +733,7 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // FIXME: Why do we convert to lowercase here, but not in MediaSource::addSourceBuffer?
</span><del>-    ContentType contentType(type.lower());
</del><ins>+    ContentType contentType(type.convertToASCIILowercase());
</ins><span class="cx">     String codecs = contentType.parameter(&quot;codecs&quot;);
</span><span class="cx"> 
</span><span class="cx">     // 2. If type does not contain a valid MIME type string, then return false.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -761,31 +761,28 @@
</span><span class="cx">         bool replaceSelection = false;
</span><span class="cx">         if (frame-&gt;selection().setSelectedRange(closestStringRange.get(), DOWNSTREAM, true)) {
</span><span class="cx">             switch (activity) {
</span><del>-            case FindAndCapitalize: {
</del><ins>+            case FindAndCapitalize:
</ins><span class="cx">                 replacementString = closestString;
</span><span class="cx">                 makeCapitalized(&amp;replacementString, 0);
</span><span class="cx">                 replaceSelection = true;
</span><span class="cx">                 break;
</span><del>-            }
</del><span class="cx">             case FindAndUppercase:
</span><del>-                replacementString = closestString.upper();
</del><ins>+                replacementString = closestString.convertToUppercaseWithoutLocale(); // FIXME: Needs locale to work correctly.
</ins><span class="cx">                 replaceSelection = true;
</span><span class="cx">                 break;
</span><span class="cx">             case FindAndLowercase:
</span><del>-                replacementString = closestString.lower();
</del><ins>+                replacementString = closestString.convertToLowercaseWithoutLocale(); // FIXME: Needs locale to work correctly.
</ins><span class="cx">                 replaceSelection = true;
</span><span class="cx">                 break;
</span><span class="cx">             case FindAndReplaceActivity: {
</span><span class="cx">                 replaceSelection = true;
</span><del>-                
</del><span class="cx">                 // When applying find and replace activities, we want to match the capitalization of the replaced text,
</span><span class="cx">                 // (unless we're replacing with an abbreviation.)
</span><del>-                String uppercaseReplacementString = replacementString.upper();
-                if (closestString.length() &gt; 0 &amp;&amp; replacementString.length() &gt; 2 &amp;&amp; replacementString != uppercaseReplacementString) {
-                    if (closestString[0] == closestString.upper()[0])
</del><ins>+                if (closestString.length() &gt; 0 &amp;&amp; replacementString.length() &gt; 2 &amp;&amp; replacementString != replacementString.convertToUppercaseWithoutLocale()) {
+                    if (closestString[0] == u_toupper(closestString[0]))
</ins><span class="cx">                         makeCapitalized(&amp;replacementString, 0);
</span><span class="cx">                     else
</span><del>-                        replacementString = replacementString.lower();
</del><ins>+                        replacementString = replacementString.convertToLowercaseWithoutLocale(); // FIXME: Needs locale to work correctly.
</ins><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">             }
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -766,19 +766,19 @@
</span><span class="cx">     m_elementsByAccessKey.clear();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Document::addImageElementByLowercasedUsemap(const AtomicStringImpl&amp; name, HTMLImageElement&amp; element)
</del><ins>+void Document::addImageElementByCaseFoldedUsemap(const AtomicStringImpl&amp; name, HTMLImageElement&amp; element)
</ins><span class="cx"> {
</span><span class="cx">     return m_imagesByUsemap.add(name, element, *this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Document::removeImageElementByLowercasedUsemap(const AtomicStringImpl&amp; name, HTMLImageElement&amp; element)
</del><ins>+void Document::removeImageElementByCaseFoldedUsemap(const AtomicStringImpl&amp; name, HTMLImageElement&amp; element)
</ins><span class="cx"> {
</span><span class="cx">     return m_imagesByUsemap.remove(name, element);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-HTMLImageElement* Document::imageElementByLowercasedUsemap(const AtomicStringImpl&amp; name) const
</del><ins>+HTMLImageElement* Document::imageElementByCaseFoldedUsemap(const AtomicStringImpl&amp; name) const
</ins><span class="cx"> {
</span><del>-    return m_imagesByUsemap.getElementByLowercasedUsemap(name, *this);
</del><ins>+    return m_imagesByUsemap.getElementByCaseFoldedUsemap(name, *this);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SelectorQuery* Document::selectorQueryForString(const String&amp; selectorString, ExceptionCode&amp; ec)
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/dom/Document.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -350,9 +350,9 @@
</span><span class="cx">     Element* getElementByAccessKey(const String&amp; key);
</span><span class="cx">     void invalidateAccessKeyMap();
</span><span class="cx"> 
</span><del>-    void addImageElementByLowercasedUsemap(const AtomicStringImpl&amp;, HTMLImageElement&amp;);
-    void removeImageElementByLowercasedUsemap(const AtomicStringImpl&amp;, HTMLImageElement&amp;);
-    HTMLImageElement* imageElementByLowercasedUsemap(const AtomicStringImpl&amp;) const;
</del><ins>+    void addImageElementByCaseFoldedUsemap(const AtomicStringImpl&amp;, HTMLImageElement&amp;);
+    void removeImageElementByCaseFoldedUsemap(const AtomicStringImpl&amp;, HTMLImageElement&amp;);
+    HTMLImageElement* imageElementByCaseFoldedUsemap(const AtomicStringImpl&amp;) const;
</ins><span class="cx"> 
</span><span class="cx">     SelectorQuery* selectorQueryForString(const String&amp;, ExceptionCode&amp;);
</span><span class="cx">     void clearSelectorQueryCache();
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentOrderedMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentOrderedMap.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentOrderedMap.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/dom/DocumentOrderedMap.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -147,18 +147,18 @@
</span><span class="cx">     }));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-HTMLMapElement* DocumentOrderedMap::getElementByLowercasedMapName(const AtomicStringImpl&amp; key, const TreeScope&amp; scope) const
</del><ins>+HTMLMapElement* DocumentOrderedMap::getElementByCaseFoldedMapName(const AtomicStringImpl&amp; key, const TreeScope&amp; scope) const
</ins><span class="cx"> {
</span><span class="cx">     return downcast&lt;HTMLMapElement&gt;(get(key, scope, [] (const AtomicStringImpl&amp; key, const Element&amp; element) {
</span><del>-        return is&lt;HTMLMapElement&gt;(element) &amp;&amp; downcast&lt;HTMLMapElement&gt;(element).getName().lower().impl() == &amp;key;
</del><ins>+        return is&lt;HTMLMapElement&gt;(element) &amp;&amp; equal(downcast&lt;HTMLMapElement&gt;(element).getName().string().foldCase().impl(), &amp;key);
</ins><span class="cx">     }));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-HTMLImageElement* DocumentOrderedMap::getElementByLowercasedUsemap(const AtomicStringImpl&amp; key, const TreeScope&amp; scope) const
</del><ins>+HTMLImageElement* DocumentOrderedMap::getElementByCaseFoldedUsemap(const AtomicStringImpl&amp; key, const TreeScope&amp; scope) const
</ins><span class="cx"> {
</span><span class="cx">     return downcast&lt;HTMLImageElement&gt;(get(key, scope, [] (const AtomicStringImpl&amp; key, const Element&amp; element) {
</span><span class="cx">         // FIXME: HTML5 specification says we should match both image and object elements.
</span><del>-        return is&lt;HTMLImageElement&gt;(element) &amp;&amp; downcast&lt;HTMLImageElement&gt;(element).matchesLowercasedUsemap(key);
</del><ins>+        return is&lt;HTMLImageElement&gt;(element) &amp;&amp; downcast&lt;HTMLImageElement&gt;(element).matchesCaseFoldedUsemap(key);
</ins><span class="cx">     }));
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentOrderedMaph"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DocumentOrderedMap.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DocumentOrderedMap.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/dom/DocumentOrderedMap.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -60,8 +60,8 @@
</span><span class="cx">     Element* getElementById(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
</span><span class="cx">     Element* getElementByName(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
</span><span class="cx">     HTMLMapElement* getElementByMapName(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
</span><del>-    HTMLMapElement* getElementByLowercasedMapName(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
-    HTMLImageElement* getElementByLowercasedUsemap(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
</del><ins>+    HTMLMapElement* getElementByCaseFoldedMapName(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
+    HTMLImageElement* getElementByCaseFoldedUsemap(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
</ins><span class="cx">     HTMLLabelElement* getElementByLabelForAttribute(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
</span><span class="cx">     Element* getElementByWindowNamedItem(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
</span><span class="cx">     Element* getElementByDocumentNamedItem(const AtomicStringImpl&amp;, const TreeScope&amp;) const;
</span></span></pre></div>
<a id="trunkSourceWebCoredomTreeScopecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/TreeScope.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/TreeScope.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/dom/TreeScope.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -201,18 +201,16 @@
</span><span class="cx"> 
</span><span class="cx"> HTMLMapElement* TreeScope::getImageMap(const String&amp; url) const
</span><span class="cx"> {
</span><del>-    if (url.isNull())
-        return nullptr;
</del><span class="cx">     if (!m_imageMapsByName)
</span><span class="cx">         return nullptr;
</span><del>-    size_t hashPos = url.find('#');
-    String name = (hashPos == notFound ? String() : url.substring(hashPos + 1)).impl();
</del><ins>+    auto hashPosition = url.find('#');
+    if (hashPosition == notFound)
+        return nullptr;
+    String name = url.substring(hashPosition + 1);
</ins><span class="cx">     if (name.isEmpty())
</span><span class="cx">         return nullptr;
</span><del>-    if (m_rootNode.document().isHTMLDocument()) {
-        AtomicString lowercasedName = name.lower();
-        return m_imageMapsByName-&gt;getElementByLowercasedMapName(*lowercasedName.impl(), *this);
-    }
</del><ins>+    if (m_rootNode.document().isHTMLDocument())
+        return m_imageMapsByName-&gt;getElementByCaseFoldedMapName(*AtomicString(name.foldCase()).impl(), *this);
</ins><span class="cx">     return m_imageMapsByName-&gt;getElementByMapName(*AtomicString(name).impl(), *this);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaHTMLConvertermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/editing/cocoa/HTMLConverter.mm        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -56,6 +56,7 @@
</span><span class="cx"> #import &quot;NSAttributedStringSPI.h&quot;
</span><span class="cx"> #import &quot;RGBColor.h&quot;
</span><span class="cx"> #import &quot;RenderImage.h&quot;
</span><ins>+#import &quot;RenderText.h&quot;
</ins><span class="cx"> #import &quot;SoftLinking.h&quot;
</span><span class="cx"> #import &quot;StyleProperties.h&quot;
</span><span class="cx"> #import &quot;StyledElement.h&quot;
</span><span class="lines">@@ -2278,15 +2279,12 @@
</span><span class="cx"> 
</span><span class="cx">     if (outputString.length()) {
</span><span class="cx">         String textTransform = _caches-&gt;propertyValueForNode(characterData, CSSPropertyTextTransform);
</span><del>-        if (textTransform.length()) {
-            if (textTransform == &quot;capitalize&quot;) {// FIXME: This is extremely inefficient.
-                NSString *temporaryString = outputString;
-                outputString = [temporaryString capitalizedString];
-            } else if (textTransform == &quot;uppercase&quot;)
-                outputString = outputString.upper();
-            else if (textTransform == &quot;lowercase&quot;)
-                outputString = outputString.lower();
-        }
</del><ins>+        if (textTransform == &quot;capitalize&quot;)
+            makeCapitalized(&amp;outputString, 0); // FIXME: Needs to take locale into account to work correctly.
+        else if (textTransform == &quot;uppercase&quot;)
+            outputString = outputString.convertToUppercaseWithoutLocale(); // FIXME: Needs locale to work correctly.
+        else if (textTransform == &quot;lowercase&quot;)
+            outputString = outputString.convertToLowercaseWithoutLocale(); // FIXME: Needs locale to work correctly.
</ins><span class="cx"> 
</span><span class="cx">         [_attrStr replaceCharactersInRange:rangeToReplace withString:outputString];
</span><span class="cx">         rangeToReplace.length = outputString.length();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLImageElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLImageElement.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -201,20 +201,20 @@
</span><span class="cx">     } else if (name == srcAttr || name == srcsetAttr || name == sizesAttr)
</span><span class="cx">         selectImageSource();
</span><span class="cx">     else if (name == usemapAttr) {
</span><del>-        if (inDocument() &amp;&amp; !m_lowercasedUsemap.isNull())
-            document().removeImageElementByLowercasedUsemap(*m_lowercasedUsemap.impl(), *this);
</del><ins>+        if (inDocument() &amp;&amp; !m_caseFoldedUsemap.isNull())
+            document().removeImageElementByCaseFoldedUsemap(*m_caseFoldedUsemap.impl(), *this);
</ins><span class="cx"> 
</span><span class="cx">         // The HTMLImageElement's useMap() value includes the '#' symbol at the beginning, which has to be stripped off.
</span><span class="cx">         // FIXME: We should check that the first character is '#'.
</span><del>-        // FIXME: HTML5 specification says we should strip any leading string before '#'.
-        // FIXME: HTML5 specification says we should ignore usemap attributes without #.
</del><ins>+        // FIXME: HTML specification says we should strip any leading string before '#'.
+        // FIXME: HTML specification says we should ignore usemap attributes without '#'.
</ins><span class="cx">         if (value.length() &gt; 1)
</span><del>-            m_lowercasedUsemap = value.string().substring(1).lower();
</del><ins>+            m_caseFoldedUsemap = value.string().substring(1).foldCase();
</ins><span class="cx">         else
</span><del>-            m_lowercasedUsemap = nullAtom;
</del><ins>+            m_caseFoldedUsemap = nullAtom;
</ins><span class="cx"> 
</span><del>-        if (inDocument() &amp;&amp; !m_lowercasedUsemap.isNull())
-            document().addImageElementByLowercasedUsemap(*m_lowercasedUsemap.impl(), *this);
</del><ins>+        if (inDocument() &amp;&amp; !m_caseFoldedUsemap.isNull())
+            document().addImageElementByCaseFoldedUsemap(*m_caseFoldedUsemap.impl(), *this);
</ins><span class="cx">     } else if (name == compositeAttr) {
</span><span class="cx">         // FIXME: images don't support blend modes in their compositing attribute.
</span><span class="cx">         BlendMode blendOp = BlendModeNormal;
</span><span class="lines">@@ -312,8 +312,8 @@
</span><span class="cx">     // in callbacks back to this node.
</span><span class="cx">     Node::InsertionNotificationRequest insertNotificationRequest = HTMLElement::insertedInto(insertionPoint);
</span><span class="cx"> 
</span><del>-    if (insertionPoint.inDocument() &amp;&amp; !m_lowercasedUsemap.isNull())
-        document().addImageElementByLowercasedUsemap(*m_lowercasedUsemap.impl(), *this);
</del><ins>+    if (insertionPoint.inDocument() &amp;&amp; !m_caseFoldedUsemap.isNull())
+        document().addImageElementByCaseFoldedUsemap(*m_caseFoldedUsemap.impl(), *this);
</ins><span class="cx"> 
</span><span class="cx">     if (is&lt;HTMLPictureElement&gt;(parentNode())) {
</span><span class="cx">         setPictureElement(&amp;downcast&lt;HTMLPictureElement&gt;(*parentNode()));
</span><span class="lines">@@ -333,8 +333,8 @@
</span><span class="cx">     if (m_form)
</span><span class="cx">         m_form-&gt;removeImgElement(this);
</span><span class="cx"> 
</span><del>-    if (insertionPoint.inDocument() &amp;&amp; !m_lowercasedUsemap.isNull())
-        document().removeImageElementByLowercasedUsemap(*m_lowercasedUsemap.impl(), *this);
</del><ins>+    if (insertionPoint.inDocument() &amp;&amp; !m_caseFoldedUsemap.isNull())
+        document().removeImageElementByCaseFoldedUsemap(*m_caseFoldedUsemap.impl(), *this);
</ins><span class="cx">     
</span><span class="cx">     if (is&lt;HTMLPictureElement&gt;(parentNode()))
</span><span class="cx">         setPictureElement(nullptr);
</span><span class="lines">@@ -474,10 +474,10 @@
</span><span class="cx">     return HTMLElement::completeURLsInAttributeValue(base, attribute);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool HTMLImageElement::matchesLowercasedUsemap(const AtomicStringImpl&amp; name) const
</del><ins>+bool HTMLImageElement::matchesCaseFoldedUsemap(const AtomicStringImpl&amp; name) const
</ins><span class="cx"> {
</span><del>-    ASSERT(String(&amp;const_cast&lt;AtomicStringImpl&amp;&gt;(name)).lower().impl() == &amp;name);
-    return m_lowercasedUsemap.impl() == &amp;name;
</del><ins>+    ASSERT(String(&amp;const_cast&lt;AtomicStringImpl&amp;&gt;(name)).foldCase().impl() == &amp;name);
+    return m_caseFoldedUsemap.impl() == &amp;name;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> const AtomicString&amp; HTMLImageElement::alt() const
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLImageElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLImageElement.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLImageElement.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/html/HTMLImageElement.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> 
</span><span class="cx">     void setLoadManually(bool loadManually) { m_imageLoader.setLoadManually(loadManually); }
</span><span class="cx"> 
</span><del>-    bool matchesLowercasedUsemap(const AtomicStringImpl&amp;) const;
</del><ins>+    bool matchesCaseFoldedUsemap(const AtomicStringImpl&amp;) const;
</ins><span class="cx"> 
</span><span class="cx">     const AtomicString&amp; alt() const;
</span><span class="cx"> 
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx">     CompositeOperator m_compositeOperator;
</span><span class="cx">     AtomicString m_bestFitImageURL;
</span><span class="cx">     AtomicString m_currentSrc;
</span><del>-    AtomicString m_lowercasedUsemap;
</del><ins>+    AtomicString m_caseFoldedUsemap;
</ins><span class="cx">     float m_imageDevicePixelRatio;
</span><span class="cx">     bool m_experimentalImageMenuEnabled;
</span><span class="cx">     bool m_hadNameBeforeAttributeChanged { false }; // FIXME: We only need this because parseAttribute() can't see the old value.
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLMapElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLMapElement.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLMapElement.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/html/HTMLMapElement.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -78,10 +78,8 @@
</span><span class="cx"> HTMLImageElement* HTMLMapElement::imageElement()
</span><span class="cx"> {
</span><span class="cx">     if (m_name.isEmpty())
</span><del>-        return 0;
-    AtomicString lowercasedName = m_name.lower();
-    ASSERT(lowercasedName.impl());
-    return document().imageElementByLowercasedUsemap(*lowercasedName.impl());
</del><ins>+        return nullptr;
+    return document().imageElementByCaseFoldedUsemap(*AtomicString(m_name.string().foldCase()).impl());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLMapElement::parseAttribute(const QualifiedName&amp; name, const AtomicString&amp; value)
</span><span class="lines">@@ -101,7 +99,7 @@
</span><span class="cx">         String mapName = value;
</span><span class="cx">         if (mapName[0] == '#')
</span><span class="cx">             mapName = mapName.substring(1);
</span><del>-        m_name = document().isHTMLDocument() ? mapName.lower() : mapName;
</del><ins>+        m_name = document().isHTMLDocument() ? mapName.foldCase() : mapName;
</ins><span class="cx">         if (inDocument())
</span><span class="cx">             treeScope().addImageMap(*this);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLanguagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Language.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Language.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/Language.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx"> 
</span><span class="cx"> static String canonicalLanguageIdentifier(const String&amp; languageCode)
</span><span class="cx"> {
</span><del>-    String lowercaseLanguageCode = languageCode.lower();
</del><ins>+    String lowercaseLanguageCode = languageCode.convertToASCIILowercase();
</ins><span class="cx">     
</span><span class="cx">     if (lowercaseLanguageCode.length() &gt;= 3 &amp;&amp; lowercaseLanguageCode[2] == '_')
</span><span class="cx">         lowercaseLanguageCode.replace(2, 1, &quot;-&quot;);
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> 
</span><span class="cx"> size_t indexOfBestMatchingLanguageInList(const String&amp; language, const Vector&lt;String&gt;&amp; languageList, bool&amp; exactMatch)
</span><span class="cx"> {
</span><del>-    String lowercaseLanguage = language.lower();
</del><ins>+    String lowercaseLanguage = language.convertToASCIILowercase();
</ins><span class="cx">     String languageWithoutLocaleMatch;
</span><span class="cx">     String languageMatchButNotLocale;
</span><span class="cx">     size_t languageWithoutLocaleMatchIndex = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsharfbuzzHarfBuzzShapercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -482,7 +482,7 @@
</span><span class="cx">         hb_buffer_add_utf16(harfBuzzBuffer.get(), &amp;preContext, 1, 1, 0);
</span><span class="cx"> 
</span><span class="cx">         if (m_font-&gt;isSmallCaps() &amp;&amp; u_islower(m_normalizedBuffer[currentRun-&gt;startIndex()])) {
</span><del>-            String upperText = String(m_normalizedBuffer.get() + currentRun-&gt;startIndex(), currentRun-&gt;numCharacters()).upper();
</del><ins>+            String upperText = String(m_normalizedBuffer.get() + currentRun-&gt;startIndex(), currentRun-&gt;numCharacters()).convertToUppercaseWithoutLocale();
</ins><span class="cx">             currentFontData = m_font-&gt;glyphDataForCharacter(upperText[0], false, SmallCapsVariant).font;
</span><span class="cx">             const UChar* characters = StringView(upperText).upconvertedCharacters();
</span><span class="cx">             hb_buffer_add_utf16(harfBuzzBuffer.get(), reinterpret_cast&lt;const uint16_t*&gt;(characters), currentRun-&gt;numCharacters(), 0, currentRun-&gt;numCharacters());
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkHTTPParserscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/HTTPParsers.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/HTTPParsers.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -456,7 +456,7 @@
</span><span class="cx"> #if ENABLE(NOSNIFF)
</span><span class="cx"> ContentTypeOptionsDisposition parseContentTypeOptionsHeader(const String&amp; header)
</span><span class="cx"> {
</span><del>-    if (header.stripWhiteSpace().lower() == &quot;nosniff&quot;)
</del><ins>+    if (equalLettersIgnoringASCIICase(header.stripWhiteSpace(), &quot;nosniff&quot;))
</ins><span class="cx">         return ContentTypeOptionsNosniff;
</span><span class="cx">     return ContentTypeOptionsNone;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkMIMEHeadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/MIMEHeader.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/MIMEHeader.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/MIMEHeader.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">             // This is not a key value pair, ignore.
</span><span class="cx">             continue;
</span><span class="cx">         }
</span><del>-        key = line.substring(0, semiColonIndex).lower().stripWhiteSpace();
</del><ins>+        key = line.substring(0, semiColonIndex).convertToASCIILowercase().stripWhiteSpace();
</ins><span class="cx">         value.append(line.substring(semiColonIndex + 1));
</span><span class="cx">     }
</span><span class="cx">     // Store the last property if there is one.
</span><span class="lines">@@ -114,14 +114,14 @@
</span><span class="cx"> 
</span><span class="cx"> MIMEHeader::Encoding MIMEHeader::parseContentTransferEncoding(const String&amp; text)
</span><span class="cx"> {
</span><del>-    String encoding = text.stripWhiteSpace().lower();
-    if (encoding == &quot;base64&quot;)
</del><ins>+    String encoding = text.stripWhiteSpace();
+    if (equalLettersIgnoringASCIICase(encoding, &quot;base64&quot;))
</ins><span class="cx">         return Base64;
</span><del>-    if (encoding == &quot;quoted-printable&quot;)
</del><ins>+    if (equalLettersIgnoringASCIICase(encoding, &quot;quoted-printable&quot;))
</ins><span class="cx">         return QuotedPrintable;
</span><del>-    if (encoding == &quot;7bit&quot;)
</del><ins>+    if (equalLettersIgnoringASCIICase(encoding, &quot;7bit&quot;))
</ins><span class="cx">         return SevenBit;
</span><del>-    if (encoding == &quot;binary&quot;)
</del><ins>+    if (equalLettersIgnoringASCIICase(encoding, &quot;binary&quot;))
</ins><span class="cx">         return Binary;
</span><span class="cx">     LOG_ERROR(&quot;Unknown encoding '%s' found in MIME header.&quot;, text.ascii().data());
</span><span class="cx">     return Unknown;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfResourceHandleCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -82,16 +82,15 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(CFNETWORK)
</span><span class="cx"> 
</span><del>-static HashSet&lt;String&gt;&amp; allowsAnyHTTPSCertificateHosts()
</del><ins>+static HashSet&lt;String, ASCIICaseInsensitiveHash&gt;&amp; allowsAnyHTTPSCertificateHosts()
</ins><span class="cx"> {
</span><del>-    static NeverDestroyed&lt;HashSet&lt;String&gt;&gt; hosts;
</del><ins>+    static NeverDestroyed&lt;HashSet&lt;String, ASCIICaseInsensitiveHash&gt;&gt; hosts;
</ins><span class="cx">     return hosts;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static HashMap&lt;String, RetainPtr&lt;CFDataRef&gt;&gt;&amp; clientCerts()
</del><ins>+static HashMap&lt;String, RetainPtr&lt;CFDataRef&gt;, ASCIICaseInsensitiveHash&gt;&amp; clientCertificates()
</ins><span class="cx"> {
</span><del>-    typedef HashMap&lt;String, RetainPtr&lt;CFDataRef&gt;&gt; CertsMap;
-    static NeverDestroyed&lt;CertsMap&gt; certs;
</del><ins>+    static NeverDestroyed&lt;HashMap&lt;String, RetainPtr&lt;CFDataRef&gt;, ASCIICaseInsensitiveHash&gt;&gt; certs;
</ins><span class="cx">     return certs;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -169,7 +168,7 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     sslProps = adoptCF(ResourceHandle::createSSLPropertiesFromNSURLRequest(firstRequest()));
</span><span class="cx"> #else
</span><del>-    if (allowsAnyHTTPSCertificateHosts().contains(firstRequest().url().host().lower())) {
</del><ins>+    if (allowsAnyHTTPSCertificateHosts().contains(firstRequest().url().host())) {
</ins><span class="cx">         sslProps = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
</span><span class="cx">         CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsAnyRoot, kCFBooleanTrue);
</span><span class="cx">         CFDictionaryAddValue(sslProps.get(), kCFStreamSSLAllowsExpiredRoots, kCFBooleanTrue);
</span><span class="lines">@@ -177,8 +176,8 @@
</span><span class="cx">         CFDictionaryAddValue(sslProps.get(), kCFStreamSSLValidatesCertificateChain, kCFBooleanFalse);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    HashMap&lt;String, RetainPtr&lt;CFDataRef&gt;&gt;::iterator clientCert = clientCerts().find(firstRequest().url().host().lower());
-    if (clientCert != clientCerts().end()) {
</del><ins>+    auto clientCert = clientCertificates().find(firstRequest().url().host());
+    if (clientCert != clientCertificates().end()) {
</ins><span class="cx">         if (!sslProps)
</span><span class="cx">             sslProps = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &amp;kCFTypeDictionaryKeyCallBacks, &amp;kCFTypeDictionaryValueCallBacks));
</span><span class="cx"> #if PLATFORM(WIN)
</span><span class="lines">@@ -603,12 +602,12 @@
</span><span class="cx"> 
</span><span class="cx"> void ResourceHandle::setHostAllowsAnyHTTPSCertificate(const String&amp; host)
</span><span class="cx"> {
</span><del>-    allowsAnyHTTPSCertificateHosts().add(host.lower());
</del><ins>+    allowsAnyHTTPSCertificateHosts().add(host);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void ResourceHandle::setClientCertificate(const String&amp; host, CFDataRef cert)
</del><ins>+void ResourceHandle::setClientCertificate(const String&amp; host, CFDataRef certificate)
</ins><span class="cx"> {
</span><del>-    clientCerts().set(host.lower(), cert);
</del><ins>+    clientCertificates().set(host, certificate);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceHandle::platformSetDefersLoading(bool defers)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlCookieJarCurlcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -195,20 +195,20 @@
</span><span class="cx">         if (attribute-&gt;contains('=')) {
</span><span class="cx">             Vector&lt;String&gt; keyValuePair;
</span><span class="cx">             attribute-&gt;split('=', true, keyValuePair);
</span><del>-            String key = keyValuePair[0].stripWhiteSpace().lower();
</del><ins>+            String key = keyValuePair[0].stripWhiteSpace();
</ins><span class="cx">             String val = keyValuePair[1].stripWhiteSpace();
</span><del>-            if (key == &quot;expires&quot;) {
</del><ins>+            if (equalLettersIgnoringASCIICase(key, &quot;expires&quot;)) {
</ins><span class="cx">                 CString dateStr(reinterpret_cast&lt;const char*&gt;(val.characters8()), val.length());
</span><span class="cx">                 expires = WTF::parseDateFromNullTerminatedCharacters(dateStr.data()) / WTF::msPerSecond;
</span><del>-            } else if (key == &quot;max-age&quot;)
</del><ins>+            } else if (equalLettersIgnoringASCIICase(key, &quot;max-age&quot;))
</ins><span class="cx">                 expires = time(0) + val.toInt();
</span><del>-            else if (key == &quot;domain&quot;) 
</del><ins>+            else if (equalLettersIgnoringASCIICase(key, &quot;domain&quot;))
</ins><span class="cx">                 domain = val;
</span><del>-            else if (key == &quot;path&quot;) 
</del><ins>+            else if (equalLettersIgnoringASCIICase(key, &quot;path&quot;))
</ins><span class="cx">                 path = val;
</span><span class="cx">         } else {
</span><del>-            String key = attribute-&gt;stripWhiteSpace().lower();
-            if (key == &quot;secure&quot;)
</del><ins>+            String key = attribute-&gt;stripWhiteSpace();
+            if (equalLettersIgnoringASCIICase(key, &quot;secure&quot;))
</ins><span class="cx">                 secure = &quot;TRUE&quot;;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlMultipartHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/MultipartHandle.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/MultipartHandle.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/curl/MultipartHandle.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -346,7 +346,7 @@
</span><span class="cx">         String contentType = m_headers.get(HTTPHeaderName::ContentType);
</span><span class="cx">         String mimeType = extractMIMETypeFromMediaType(contentType);
</span><span class="cx"> 
</span><del>-        response-&gt;setMimeType(mimeType.lower());
</del><ins>+        response-&gt;setMimeType(mimeType.convertToASCIILowercase());
</ins><span class="cx">         response-&gt;setTextEncodingName(extractCharsetFromMediaType(contentType));
</span><span class="cx"> 
</span><span class="cx">         d-&gt;client()-&gt;didReceiveResponse(m_resourceHandle, *response);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlResourceHandleCurlcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -122,7 +122,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ResourceHandle::setHostAllowsAnyHTTPSCertificate(const String&amp; host)
</span><span class="cx"> {
</span><del>-    allowsAnyHTTPSCertificateHosts(host.lower());
</del><ins>+    allowsAnyHTTPSCertificateHosts(host);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceHandle::setClientCertificateInfo(const String&amp; host, const String&amp; certificate, const String&amp; key)
</span><span class="lines">@@ -134,18 +134,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN) &amp;&amp; USE(CF)
</span><del>-// FIXME:  The CFDataRef will need to be something else when
-// building without 
-static HashMap&lt;String, RetainPtr&lt;CFDataRef&gt; &gt;&amp; clientCerts()
-{
-    static HashMap&lt;String, RetainPtr&lt;CFDataRef&gt; &gt; certs;
-    return certs;
-}
</del><span class="cx"> 
</span><del>-void ResourceHandle::setClientCertificate(const String&amp; host, CFDataRef cert)
</del><ins>+void ResourceHandle::setClientCertificate(const String&amp;, CFDataRef)
</ins><span class="cx"> {
</span><del>-    clientCerts().set(host.lower(), cert);
</del><span class="cx"> }
</span><ins>+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void ResourceHandle::platformSetDefersLoading(bool defers)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlResourceHandleManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -497,7 +497,7 @@
</span><span class="cx">         d-&gt;m_response.setURL(URL(ParsedURLString, hdr));
</span><span class="cx"> 
</span><span class="cx">         d-&gt;m_response.setHTTPStatusCode(httpCode);
</span><del>-        d-&gt;m_response.setMimeType(extractMIMETypeFromMediaType(d-&gt;m_response.httpHeaderField(HTTPHeaderName::ContentType)).lower());
</del><ins>+        d-&gt;m_response.setMimeType(extractMIMETypeFromMediaType(d-&gt;m_response.httpHeaderField(HTTPHeaderName::ContentType)).convertToASCIILowercase());
</ins><span class="cx">         d-&gt;m_response.setTextEncodingName(extractCharsetFromMediaType(d-&gt;m_response.httpHeaderField(HTTPHeaderName::ContentType)));
</span><span class="cx"> 
</span><span class="cx">         if (d-&gt;m_response.isMultipart()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlSSLHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/SSLHandle.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/SSLHandle.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/curl/SSLHandle.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -39,9 +39,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-typedef std::tuple&lt;WTF::String, WTF::String&gt; clientCertificate;
-static HashMap&lt;String, ListHashSet&lt;String&gt;&gt; allowedHosts;
-static HashMap&lt;String, clientCertificate&gt; allowedClientHosts;
</del><ins>+typedef std::tuple&lt;String, String&gt; clientCertificate;
+static HashMap&lt;String, ListHashSet&lt;String&gt;, ASCIICaseInsensitiveHash&gt; allowedHosts;
+static HashMap&lt;String, clientCertificate, ASCIICaseInsensitiveHash&gt; allowedClientHosts;
</ins><span class="cx"> 
</span><span class="cx"> void allowsAnyHTTPSCertificateHosts(const String&amp; host)
</span><span class="cx"> {
</span><span class="lines">@@ -52,13 +52,13 @@
</span><span class="cx"> void addAllowedClientCertificate(const String&amp; host, const String&amp; certificate, const String&amp; key)
</span><span class="cx"> {
</span><span class="cx">     clientCertificate clientInfo(certificate, key);
</span><del>-    allowedClientHosts.set(host.lower(), clientInfo);
</del><ins>+    allowedClientHosts.set(host, clientInfo);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void setSSLClientCertificate(ResourceHandle* handle)
</span><span class="cx"> {
</span><span class="cx">     String host = handle-&gt;firstRequest().url().host();
</span><del>-    HashMap&lt;String, clientCertificate&gt;::iterator it = allowedClientHosts.find(host.lower());
</del><ins>+    auto it = allowedClientHosts.find(host);
</ins><span class="cx">     if (it == allowedClientHosts.end())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool sslIgnoreHTTPSCertificate(const String&amp; host, const ListHashSet&lt;String&gt;&amp; certificates)
</span><span class="cx"> {
</span><del>-    HashMap&lt;String, ListHashSet&lt;String&gt;&gt;::iterator it = allowedHosts.find(host);
</del><ins>+    auto it = allowedHosts.find(host);
</ins><span class="cx">     if (it != allowedHosts.end()) {
</span><span class="cx">         if ((it-&gt;value).isEmpty()) {
</span><span class="cx">             it-&gt;value = certificates;
</span><span class="lines">@@ -79,8 +79,8 @@
</span><span class="cx">         }
</span><span class="cx">         if (certificates.size() != it-&gt;value.size())
</span><span class="cx">             return false;
</span><del>-        ListHashSet&lt;String&gt;::const_iterator certsIter = certificates.begin();
-        ListHashSet&lt;String&gt;::iterator valueIter = (it-&gt;value).begin();
</del><ins>+        auto certsIter = certificates.begin();
+        auto valueIter = (it-&gt;value).begin();
</ins><span class="cx">         for (; valueIter != (it-&gt;value).end(); ++valueIter, ++certsIter) {
</span><span class="cx">             if (*certsIter != *valueIter)
</span><span class="cx">                 return false;
</span><span class="lines">@@ -198,13 +198,13 @@
</span><span class="cx">     d-&gt;m_sslErrors = sslCertificateFlag(err);
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(WIN)
</span><del>-    HashMap&lt;String, ListHashSet&lt;String&gt;&gt;::iterator it = allowedHosts.find(host);
</del><ins>+    auto it = allowedHosts.find(host);
</ins><span class="cx">     ok = (it != allowedHosts.end());
</span><span class="cx"> #else
</span><span class="cx">     ListHashSet&lt;String&gt; certificates;
</span><span class="cx">     if (!pemData(ctx, certificates))
</span><span class="cx">         return 0;
</span><del>-    ok = sslIgnoreHTTPSCertificate(host.lower(), certificates);
</del><ins>+    ok = sslIgnoreHTTPSCertificate(host, certificates);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     if (ok) {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupResourceHandleSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -244,13 +244,14 @@
</span><span class="cx"> 
</span><span class="cx"> static bool gIgnoreSSLErrors = false;
</span><span class="cx"> 
</span><del>-static HashSet&lt;String&gt;&amp; allowsAnyHTTPSCertificateHosts()
</del><ins>+typedef HashSet&lt;String, ASCIICaseInsensitiveHash&gt; HostsSet;
+static HostsSet&amp; allowsAnyHTTPSCertificateHosts()
</ins><span class="cx"> {
</span><del>-    DEPRECATED_DEFINE_STATIC_LOCAL(HashSet&lt;String&gt;, hosts, ());
</del><ins>+    DEPRECATED_DEFINE_STATIC_LOCAL(HostsSet, hosts, ());
</ins><span class="cx">     return hosts;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-typedef HashMap&lt;String, HostTLSCertificateSet&gt; CertificatesMap;
</del><ins>+typedef HashMap&lt;String, HostTLSCertificateSet, ASCIICaseInsensitiveHash&gt; CertificatesMap;
</ins><span class="cx"> static CertificatesMap&amp; clientCertificates()
</span><span class="cx"> {
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(CertificatesMap, certificates, ());
</span><span class="lines">@@ -322,12 +323,12 @@
</span><span class="cx">     if (!tlsErrors)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    String lowercaseHostURL = handle-&gt;firstRequest().url().host().lower();
-    if (allowsAnyHTTPSCertificateHosts().contains(lowercaseHostURL))
</del><ins>+    String host = handle-&gt;firstRequest().url().host();
+    if (allowsAnyHTTPSCertificateHosts().contains(host))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // We aren't ignoring errors globally, but the user may have already decided to accept this certificate.
</span><del>-    auto it = clientCertificates().find(lowercaseHostURL);
</del><ins>+    auto it = clientCertificates().find(host);
</ins><span class="cx">     if (it != clientCertificates().end() &amp;&amp; it-&gt;value.contains(certificate))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -1087,12 +1088,12 @@
</span><span class="cx"> 
</span><span class="cx"> void ResourceHandle::setHostAllowsAnyHTTPSCertificate(const String&amp; host)
</span><span class="cx"> {
</span><del>-    allowsAnyHTTPSCertificateHosts().add(host.lower());
</del><ins>+    allowsAnyHTTPSCertificateHosts().add(host);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceHandle::setClientCertificate(const String&amp; host, GTlsCertificate* certificate)
</span><span class="cx"> {
</span><del>-    clientCertificates().add(host.lower(), HostTLSCertificateSet()).iterator-&gt;value.add(certificate);
</del><ins>+    clientCertificates().add(host, HostTLSCertificateSet()).iterator-&gt;value.add(certificate);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ResourceHandle::setIgnoreSSLErrors(bool ignoreSSLErrors)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextLocaleToScriptMappingDefaultcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/text/LocaleToScriptMappingDefault.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -157,20 +157,21 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct ScriptNameCodeMapHashTraits : public HashTraits&lt;String&gt; {
</span><del>-    static const int minimumTableSize = WTF::HashTableCapacityForSize&lt;sizeof(scriptNameCodeList) / sizeof(ScriptNameCode)&gt;::value;
</del><ins>+    static const int minimumTableSize = WTF::HashTableCapacityForSize&lt;WTF_ARRAY_LENGTH(scriptNameCodeList)&gt;::value;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-typedef HashMap&lt;String, UScriptCode, DefaultHash&lt;String&gt;::Hash, ScriptNameCodeMapHashTraits&gt; ScriptNameCodeMap;
</del><ins>+typedef HashMap&lt;String, UScriptCode, ASCIICaseInsensitiveHash, ScriptNameCodeMapHashTraits&gt; ScriptNameCodeMap;
</ins><span class="cx"> 
</span><span class="cx"> UScriptCode scriptNameToCode(const String&amp; scriptName)
</span><span class="cx"> {
</span><del>-    static NeverDestroyed&lt;ScriptNameCodeMap&gt; scriptNameCodeMap;
-    if (scriptNameCodeMap.get().isEmpty()) {
-        for (size_t i = 0; i &lt; sizeof(scriptNameCodeList) / sizeof(ScriptNameCode); ++i)
-            scriptNameCodeMap.get().set(ASCIILiteral(scriptNameCodeList[i].name), scriptNameCodeList[i].code);
-    }
</del><ins>+    static NeverDestroyed&lt;ScriptNameCodeMap&gt; scriptNameCodeMap = []() {
+        ScriptNameCodeMap map;
+        for (auto&amp; nameAndCode : scriptNameCodeList)
+            map.add(ASCIILiteral(nameAndCode.name), nameAndCode.code);
+        return map;
+    }();
</ins><span class="cx"> 
</span><del>-    ScriptNameCodeMap::iterator it = scriptNameCodeMap.get().find(scriptName.lower());
</del><ins>+    auto it = scriptNameCodeMap.get().find(scriptName);
</ins><span class="cx">     if (it != scriptNameCodeMap.get().end())
</span><span class="cx">         return it-&gt;value;
</span><span class="cx">     return USCRIPT_INVALID_CODE;
</span><span class="lines">@@ -383,31 +384,33 @@
</span><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> struct LocaleScriptMapHashTraits : public HashTraits&lt;String&gt; {
</span><del>-    static const int minimumTableSize = WTF::HashTableCapacityForSize&lt;sizeof(localeScriptList) / sizeof(LocaleScript)&gt;::value;
</del><ins>+    static const int minimumTableSize = WTF::HashTableCapacityForSize&lt;WTF_ARRAY_LENGTH(localeScriptList)&gt;::value;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-typedef HashMap&lt;String, UScriptCode, DefaultHash&lt;String&gt;::Hash, LocaleScriptMapHashTraits&gt; LocaleScriptMap;
</del><ins>+typedef HashMap&lt;String, UScriptCode, ASCIICaseInsensitiveHash, LocaleScriptMapHashTraits&gt; LocaleScriptMap;
</ins><span class="cx"> 
</span><span class="cx"> UScriptCode localeToScriptCodeForFontSelection(const String&amp; locale)
</span><span class="cx"> {
</span><del>-    static NeverDestroyed&lt;LocaleScriptMap&gt; localeScriptMap;
-    if (localeScriptMap.get().isEmpty()) {
-        for (size_t i = 0; i &lt; sizeof(localeScriptList) / sizeof(LocaleScript); ++i)
-            localeScriptMap.get().set(ASCIILiteral(localeScriptList[i].locale), localeScriptList[i].script);
-    }
</del><ins>+    static NeverDestroyed&lt;LocaleScriptMap&gt; localeScriptMap = []() {
+        LocaleScriptMap map;
+        for (auto&amp; localeAndScript : localeScriptList)
+            map.add(ASCIILiteral(localeAndScript.locale), localeAndScript.script);
+        return map;
+    }();
</ins><span class="cx"> 
</span><del>-    String canonicalLocale = locale.lower().replace('-', '_');
</del><ins>+    String canonicalLocale = locale;
+    canonicalLocale.replace('-', '_');
</ins><span class="cx">     while (!canonicalLocale.isEmpty()) {
</span><del>-        LocaleScriptMap::iterator it = localeScriptMap.get().find(canonicalLocale);
</del><ins>+        auto it = localeScriptMap.get().find(canonicalLocale);
</ins><span class="cx">         if (it != localeScriptMap.get().end())
</span><span class="cx">             return it-&gt;value;
</span><del>-        size_t pos = canonicalLocale.reverseFind('_');
-        if (pos == notFound)
</del><ins>+        auto underscorePosition = canonicalLocale.reverseFind('_');
+        if (underscorePosition == notFound)
</ins><span class="cx">             break;
</span><del>-        UScriptCode code = scriptNameToCode(canonicalLocale.substring(pos + 1));
</del><ins>+        UScriptCode code = scriptNameToCode(canonicalLocale.substring(underscorePosition + 1));
</ins><span class="cx">         if (code != USCRIPT_INVALID_CODE &amp;&amp; code != USCRIPT_UNKNOWN)
</span><span class="cx">             return code;
</span><del>-        canonicalLocale = canonicalLocale.substring(0, pos);
</del><ins>+        canonicalLocale = canonicalLocale.substring(0, underscorePosition);
</ins><span class="cx">     }
</span><span class="cx">     return USCRIPT_COMMON;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformtextwinLocaleWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/text/win/LocaleWin.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/text/win/LocaleWin.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/text/win/LocaleWin.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> typedef LCID (WINAPI* LocaleNameToLCIDPtr)(LPCWSTR, DWORD);
</span><del>-typedef HashMap&lt;String, LCID&gt; NameToLCIDMap;
</del><ins>+typedef HashMap&lt;String, LCID, ASCIICaseInsensitiveHash&gt; NameToLCIDMap;
</ins><span class="cx"> 
</span><span class="cx"> static String extractLanguageCode(const String&amp; locale)
</span><span class="cx"> {
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">         return LOCALE_USER_DEFAULT;
</span><span class="cx">     DEPRECATED_DEFINE_STATIC_LOCAL(NameToLCIDMap, map, ());
</span><span class="cx">     ensureNameToLCIDMap(map);
</span><del>-    String localeName = String(name).replace('_', '-').lower();
</del><ins>+    String localeName = String(name).replace('_', '-');
</ins><span class="cx">     do {
</span><span class="cx">         NameToLCIDMap::const_iterator iterator = map.find(localeName);
</span><span class="cx">         if (iterator != map.end())
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformwinPasteboardWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/win/PasteboardWin.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/win/PasteboardWin.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/platform/win/PasteboardWin.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -182,14 +182,14 @@
</span><span class="cx"> 
</span><span class="cx"> static ClipboardDataType clipboardTypeFromMIMEType(const String&amp; type)
</span><span class="cx"> {
</span><del>-    String qType = type.stripWhiteSpace().lower();
</del><ins>+    String strippedType = type.stripWhiteSpace();
</ins><span class="cx"> 
</span><span class="cx">     // two special cases for IE compatibility
</span><del>-    if (qType == &quot;text&quot; || qType == &quot;text/plain&quot; || qType.startsWith(&quot;text/plain;&quot;))
</del><ins>+    if (equalLettersIgnoringASCIICase(strippedType, &quot;text&quot;) || equalLettersIgnoringASCIICase(strippedType, &quot;text/plain&quot;) || strippedType.startsWith(&quot;text/plain;&quot;, false))
</ins><span class="cx">         return ClipboardDataTypeText;
</span><del>-    if (qType == &quot;url&quot; || qType == &quot;text/uri-list&quot;)
</del><ins>+    if (equalLettersIgnoringASCIICase(strippedType, &quot;url&quot;) || equalLettersIgnoringASCIICase(strippedType, &quot;text/uri-list&quot;))
</ins><span class="cx">         return ClipboardDataTypeURL;
</span><del>-    if (qType == &quot;text/html&quot;)
</del><ins>+    if (equalLettersIgnoringASCIICase(strippedType, &quot;text/html&quot;))
</ins><span class="cx">         return ClipboardDataTypeTextHTML;
</span><span class="cx"> 
</span><span class="cx">     return ClipboardDataTypeNone;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderText.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderText.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/rendering/RenderText.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1035,10 +1035,10 @@
</span><span class="cx">         makeCapitalized(&amp;text, previousCharacter);
</span><span class="cx">         break;
</span><span class="cx">     case UPPERCASE:
</span><del>-        text = text.upper(style.locale());
</del><ins>+        text = text.convertToUppercaseWithLocale(style.locale());
</ins><span class="cx">         break;
</span><span class="cx">     case LOWERCASE:
</span><del>-        text = text.lower(style.locale());
</del><ins>+        text = text.convertToLowercaseWithLocale(style.locale());
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXMLHttpRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1030,9 +1030,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool XMLHttpRequest::responseIsXML() const
</span><span class="cx"> {
</span><del>-    // FIXME: Remove the lower() call when DOMImplementation.isXMLMIMEType() is modified
-    //        to do case insensitive MIME type matching.
-    return DOMImplementation::isXMLMIMEType(responseMIMEType().lower());
</del><ins>+    return DOMImplementation::isXMLMIMEType(responseMIMEType());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int XMLHttpRequest::status() const
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-02-06  Darin Adler  &lt;darin@apple.com&gt;
+
+        Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions
+        https://bugs.webkit.org/show_bug.cgi?id=153905
+
+        Reviewed by Sam Weinig.
+
+        * Plugins/WebBasePluginPackage.mm:
+        (-[WebBasePluginPackage getPluginInfoFromPLists]): Use modern for loops.
+        (-[WebBasePluginPackage supportsExtension:]): Use convertToASCIILowercase for extension assert.
+        Also use modern for loop.
+        (-[WebBasePluginPackage supportsMIMEType:]): Ditto.
+        (-[WebBasePluginPackage MIMETypeForExtension:]): Ditto.
+
</ins><span class="cx"> 2016-02-03  Jessie Berlin  &lt;jberlin@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Build fix.
</span></span></pre></div>
<a id="trunkSourceWebKitmacPluginsWebBasePluginPackagemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit/mac/Plugins/WebBasePluginPackage.mm        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -216,18 +216,15 @@
</span><span class="cx">         MimeClassInfo mimeClassInfo;
</span><span class="cx">         
</span><span class="cx">         NSArray *extensions = [[MIMEDictionary objectForKey:WebPluginExtensionsKey] _web_lowercaseStrings];
</span><del>-        for (NSUInteger i = 0; i &lt; [extensions count]; ++i) {
</del><ins>+        for (NSString *extension in extensions) {
</ins><span class="cx">             // The DivX plug-in lists multiple extensions in a comma separated string instead of using
</span><span class="cx">             // multiple array elements in the property list. Work around this here by splitting the
</span><span class="cx">             // extension string into components.
</span><del>-            NSArray *extensionComponents = [[extensions objectAtIndex:i] componentsSeparatedByString:@&quot;,&quot;];
-
-            for (NSString *extension in extensionComponents)
-                mimeClassInfo.extensions.append(extension);
</del><ins>+            for (NSString *component in [extension componentsSeparatedByString:@&quot;,&quot;])
+                mimeClassInfo.extensions.append(component);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        mimeClassInfo.type = String(MIME).lower();
-
</del><ins>+        mimeClassInfo.type = String(MIME).convertToASCIILowercase();
</ins><span class="cx">         mimeClassInfo.desc = [MIMEDictionary objectForKey:WebPluginTypeDescriptionKey];
</span><span class="cx"> 
</span><span class="cx">         pluginInfo.mimes.append(mimeClassInfo);
</span><span class="lines">@@ -284,12 +281,10 @@
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)supportsExtension:(const String&amp;)extension
</span><span class="cx"> {
</span><del>-    ASSERT(extension.lower() == extension);
</del><ins>+    ASSERT(extension.convertToASCIILowercase() == extension);
</ins><span class="cx">     
</span><del>-    for (size_t i = 0; i &lt; pluginInfo.mimes.size(); ++i) {
-        const Vector&lt;String&gt;&amp; extensions = pluginInfo.mimes[i].extensions;
-
-        if (std::find(extensions.begin(), extensions.end(), extension) != extensions.end())
</del><ins>+    for (auto&amp; entry : pluginInfo.mimes) {
+        if (entry.extensions.contains(extension))
</ins><span class="cx">             return YES;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -298,26 +293,23 @@
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)supportsMIMEType:(const WTF::String&amp;)mimeType
</span><span class="cx"> {
</span><del>-    ASSERT(mimeType.lower() == mimeType);
</del><ins>+    ASSERT(mimeType.convertToASCIILowercase() == mimeType);
</ins><span class="cx">     
</span><del>-    for (size_t i = 0; i &lt; pluginInfo.mimes.size(); ++i) {
-        if (pluginInfo.mimes[i].type == mimeType)
</del><ins>+    for (auto&amp; entry : pluginInfo.mimes) {
+        if (entry.type == mimeType)
</ins><span class="cx">             return YES;
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     return NO;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (NSString *)MIMETypeForExtension:(const String&amp;)extension
</span><span class="cx"> {
</span><del>-    ASSERT(extension.lower() == extension);
</del><ins>+    ASSERT(extension.convertToASCIILowercase() == extension);
</ins><span class="cx">     
</span><del>-    for (size_t i = 0; i &lt; pluginInfo.mimes.size(); ++i) {
-        const MimeClassInfo&amp; mimeClassInfo = pluginInfo.mimes[i];
-        const Vector&lt;String&gt;&amp; extensions = mimeClassInfo.extensions;
-
-        if (std::find(extensions.begin(), extensions.end(), extension) != extensions.end())
-            return mimeClassInfo.type;
</del><ins>+    for (auto&amp; entry : pluginInfo.mimes) {
+        if (entry.extensions.contains(extension))
+            return entry.type;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return nil;
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit/win/ChangeLog        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-02-06  Darin Adler  &lt;darin@apple.com&gt;
+
+        Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions
+        https://bugs.webkit.org/show_bug.cgi?id=153905
+
+        Reviewed by Sam Weinig.
+
+        * Plugins/PluginDatabase.cpp:
+        (WebCore::PluginDatabase::pluginForMIMEType): Use ASCII case-insensitive map rather
+        than lowercasing the MIME type.
+        (WebCore::PluginDatabase::setPreferredPluginForMIMEType): Ditto.
+
+        * Plugins/PluginDatabase.h: Make m_preferredPlugins use an ASCII case-insensitive hash.
+
+        * Plugins/PluginPackage.h: Use ASCII case-insensitive hash for maps keyed by MIME type.
+
+        * Plugins/PluginPackageWin.cpp:
+        (WebCore::PluginPackage::fetchInfo): Use convertToASCIILowercase to lowercase a MIME type.
+
</ins><span class="cx"> 2016-02-04  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: InspectorTimelineAgent doesn't need to recompile functions because it now uses the sampling profiler
</span></span></pre></div>
<a id="trunkSourceWebKitwinPluginsPluginDatabasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Plugins/PluginDatabase.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Plugins/PluginDatabase.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit/win/Plugins/PluginDatabase.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -104,8 +104,8 @@
</span><span class="cx">         getDeletedPlugins(pluginsToUnload);
</span><span class="cx"> 
</span><span class="cx">         // Unload plugins
</span><del>-        PluginSet::const_iterator end = pluginsToUnload.end();
-        for (PluginSet::const_iterator it = pluginsToUnload.begin(); it != end; ++it)
</del><ins>+        auto end = pluginsToUnload.end();
+        for (auto it = pluginsToUnload.begin(); it != end; ++it)
</ins><span class="cx">             remove(it-&gt;get());
</span><span class="cx"> 
</span><span class="cx">         pluginSetChanged = !pluginsToUnload.isEmpty();
</span><span class="lines">@@ -121,8 +121,8 @@
</span><span class="cx">     // of RealPlayer installed and just removed the newer one, we'll pick up the older one.
</span><span class="cx">     bool shouldSkipUnchangedFiles = !pluginSetChanged;
</span><span class="cx"> 
</span><del>-    HashSet&lt;String&gt;::const_iterator pathsEnd = paths.end();
-    for (HashSet&lt;String&gt;::const_iterator it = paths.begin(); it != pathsEnd; ++it) {
</del><ins>+    auto pathsEnd = paths.end();
+    for (auto it = paths.begin(); it != pathsEnd; ++it) {
</ins><span class="cx">         time_t lastModified;
</span><span class="cx">         if (!getFileModificationTime(*it, lastModified))
</span><span class="cx">             continue;
</span><span class="lines">@@ -156,11 +156,11 @@
</span><span class="cx">     m_registeredMIMETypes.clear();
</span><span class="cx"> 
</span><span class="cx">     // Register plug-in MIME types
</span><del>-    PluginSet::const_iterator end = m_plugins.end();
-    for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
</del><ins>+    auto end = m_plugins.end();
+    for (auto it = m_plugins.begin(); it != end; ++it) {
</ins><span class="cx">         // Get MIME types
</span><del>-        MIMEToDescriptionsMap::const_iterator map_it = (*it)-&gt;mimeToDescriptions().begin();
-        MIMEToDescriptionsMap::const_iterator map_end = (*it)-&gt;mimeToDescriptions().end();
</del><ins>+        auto map_it = (*it)-&gt;mimeToDescriptions().begin();
+        auto map_end = (*it)-&gt;mimeToDescriptions().end();
</ins><span class="cx">         for (; map_it != map_end; ++map_it)
</span><span class="cx">             m_registeredMIMETypes.add(map_it-&gt;key);
</span><span class="cx">     }
</span><span class="lines">@@ -172,8 +172,8 @@
</span><span class="cx"> {
</span><span class="cx">     Vector&lt;PluginPackage*&gt; result;
</span><span class="cx"> 
</span><del>-    PluginSet::const_iterator end = m_plugins.end();
-    for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it)
</del><ins>+    auto end = m_plugins.end();
+    for (auto it = m_plugins.begin(); it != end; ++it)
</ins><span class="cx">         result.append((*it).get());
</span><span class="cx"> 
</span><span class="cx">     return result;
</span><span class="lines">@@ -190,26 +190,25 @@
</span><span class="cx"> PluginPackage* PluginDatabase::pluginForMIMEType(const String&amp; mimeType)
</span><span class="cx"> {
</span><span class="cx">     if (mimeType.isEmpty())
</span><del>-        return 0;
</del><ins>+        return nullptr;
</ins><span class="cx"> 
</span><del>-    String key = mimeType.lower();
-    PluginSet::const_iterator end = m_plugins.end();
-    PluginPackage* preferredPlugin = m_preferredPlugins.get(key);
</del><ins>+    PluginPackage* preferredPlugin = m_preferredPlugins.get(mimeType);
</ins><span class="cx">     if (preferredPlugin
</span><span class="cx">         &amp;&amp; preferredPlugin-&gt;isEnabled()
</span><del>-        &amp;&amp; preferredPlugin-&gt;mimeToDescriptions().contains(key)) {
</del><ins>+        &amp;&amp; preferredPlugin-&gt;mimeToDescriptions().contains(mimeType)) {
</ins><span class="cx">         return preferredPlugin;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;PluginPackage*, 2&gt; pluginChoices;
</span><span class="cx"> 
</span><del>-    for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
</del><ins>+    auto end = m_plugins.end();
+    for (auto it = m_plugins.begin(); it != end; ++it) {
</ins><span class="cx">         PluginPackage* plugin = (*it).get();
</span><span class="cx"> 
</span><span class="cx">         if (!plugin-&gt;isEnabled())
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        if (plugin-&gt;mimeToDescriptions().contains(key)) {
</del><ins>+        if (plugin-&gt;mimeToDescriptions().contains(mimeType)) {
</ins><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
</span><span class="cx">             if (!plugin-&gt;ensurePluginLoaded())
</span><span class="cx">                 continue;
</span><span class="lines">@@ -231,18 +230,18 @@
</span><span class="cx">     if (extension.isEmpty())
</span><span class="cx">         return String();
</span><span class="cx"> 
</span><del>-    PluginSet::const_iterator end = m_plugins.end();
</del><ins>+    auto end = m_plugins.end();
</ins><span class="cx">     String mimeType;
</span><span class="cx">     Vector&lt;PluginPackage*, 2&gt; pluginChoices;
</span><span class="cx">     HashMap&lt;PluginPackage*, String&gt; mimeTypeForPlugin;
</span><span class="cx"> 
</span><del>-    for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
</del><ins>+    for (auto it = m_plugins.begin(); it != end; ++it) {
</ins><span class="cx">         if (!(*it)-&gt;isEnabled())
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><del>-        MIMEToExtensionsMap::const_iterator mime_end = (*it)-&gt;mimeToExtensions().end();
</del><ins>+        auto mime_end = (*it)-&gt;mimeToExtensions().end();
</ins><span class="cx"> 
</span><del>-        for (MIMEToExtensionsMap::const_iterator mime_it = (*it)-&gt;mimeToExtensions().begin(); mime_it != mime_end; ++mime_it) {
</del><ins>+        for (auto mime_it = (*it)-&gt;mimeToExtensions().begin(); mime_it != mime_end; ++mime_it) {
</ins><span class="cx">             mimeType = mime_it-&gt;key;
</span><span class="cx">             PluginPackage* preferredPlugin = m_preferredPlugins.get(mimeType);
</span><span class="cx">             const Vector&lt;String&gt;&amp; extensions = mime_it-&gt;value;
</span><span class="lines">@@ -305,7 +304,7 @@
</span><span class="cx"> void PluginDatabase::setPreferredPluginForMIMEType(const String&amp; mimeType, PluginPackage* plugin)
</span><span class="cx"> {
</span><span class="cx">     if (!plugin || plugin-&gt;mimeToExtensions().contains(mimeType))
</span><del>-        m_preferredPlugins.set(mimeType.lower(), plugin);
</del><ins>+        m_preferredPlugins.set(mimeType, plugin);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool PluginDatabase::fileExistsAndIsNotDisabled(const String&amp; filePath) const
</span><span class="lines">@@ -319,8 +318,8 @@
</span><span class="cx"> 
</span><span class="cx"> void PluginDatabase::getDeletedPlugins(PluginSet&amp; plugins) const
</span><span class="cx"> {
</span><del>-    PluginSet::const_iterator end = m_plugins.end();
-    for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
</del><ins>+    auto end = m_plugins.end();
+    for (auto it = m_plugins.begin(); it != end; ++it) {
</ins><span class="cx">         if (!fileExistsAndIsNotDisabled((*it)-&gt;path()))
</span><span class="cx">             plugins.add(*it);
</span><span class="cx">     }
</span><span class="lines">@@ -341,10 +340,10 @@
</span><span class="cx"> 
</span><span class="cx"> void PluginDatabase::remove(PluginPackage* package)
</span><span class="cx"> {
</span><del>-    MIMEToExtensionsMap::const_iterator it = package-&gt;mimeToExtensions().begin();
-    MIMEToExtensionsMap::const_iterator end = package-&gt;mimeToExtensions().end();
</del><ins>+    auto it = package-&gt;mimeToExtensions().begin();
+    auto end = package-&gt;mimeToExtensions().end();
</ins><span class="cx">     for ( ; it != end; ++it) {
</span><del>-        PluginPackageByNameMap::iterator packageInMap = m_preferredPlugins.find(it-&gt;key);
</del><ins>+        auto packageInMap = m_preferredPlugins.find(it-&gt;key);
</ins><span class="cx">         if (packageInMap != m_preferredPlugins.end() &amp;&amp; packageInMap-&gt;value == package)
</span><span class="cx">             m_preferredPlugins.remove(packageInMap);
</span><span class="cx">     }
</span><span class="lines">@@ -408,11 +407,11 @@
</span><span class="cx"> 
</span><span class="cx">     String fileNameFilter(&quot;&quot;);
</span><span class="cx"> 
</span><del>-    Vector&lt;String&gt;::const_iterator dirsEnd = m_pluginDirectories.end();
-    for (Vector&lt;String&gt;::const_iterator dIt = m_pluginDirectories.begin(); dIt != dirsEnd; ++dIt) {
</del><ins>+    auto dirsEnd = m_pluginDirectories.end();
+    for (auto dIt = m_pluginDirectories.begin(); dIt != dirsEnd; ++dIt) {
</ins><span class="cx">         Vector&lt;String&gt; pluginPaths = listDirectory(*dIt, fileNameFilter);
</span><del>-        Vector&lt;String&gt;::const_iterator pluginsEnd = pluginPaths.end();
-        for (Vector&lt;String&gt;::const_iterator pIt = pluginPaths.begin(); pIt != pluginsEnd; ++pIt) {
</del><ins>+        auto pluginsEnd = pluginPaths.end();
+        for (auto pIt = pluginPaths.begin(); pIt != pluginsEnd; ++pIt) {
</ins><span class="cx">             if (!fileExistsAndIsNotDisabled(*pIt))
</span><span class="cx">                 continue;
</span><span class="cx"> 
</span><span class="lines">@@ -583,8 +582,8 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    PluginSet::const_iterator end = m_plugins.end();
-    for (PluginSet::const_iterator it = m_plugins.begin(); it != end; ++it) {
</del><ins>+    auto end = m_plugins.end();
+    for (auto it = m_plugins.begin(); it != end; ++it) {
</ins><span class="cx">         if (!(writeUTF8String(file, (*it)-&gt;path())
</span><span class="cx">               &amp;&amp; writeTime(file, (*it)-&gt;lastModified())
</span><span class="cx">               &amp;&amp; writeUTF8String(file, (*it)-&gt;name())
</span></span></pre></div>
<a id="trunkSourceWebKitwinPluginsPluginDatabaseh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Plugins/PluginDatabase.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Plugins/PluginDatabase.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit/win/Plugins/PluginDatabase.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -107,7 +107,7 @@
</span><span class="cx">         PluginSet m_plugins;
</span><span class="cx">         HashMap&lt;String, RefPtr&lt;PluginPackage&gt; &gt; m_pluginsByPath;
</span><span class="cx">         HashMap&lt;String, time_t&gt; m_pluginPathsWithTimes;
</span><del>-        HashMap&lt;String, RefPtr&lt;PluginPackage&gt; &gt; m_preferredPlugins;
</del><ins>+        HashMap&lt;String, RefPtr&lt;PluginPackage&gt;, ASCIICaseInsensitiveHash&gt; m_preferredPlugins;
</ins><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
</span><span class="cx">         bool m_persistentMetadataCacheIsLoaded;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitwinPluginsPluginPackageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Plugins/PluginPackage.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Plugins/PluginPackage.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit/win/Plugins/PluginPackage.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -39,9 +39,10 @@
</span><span class="cx"> #include &lt;wtf/text/WTFString.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><del>-    typedef HashMap&lt;String, String&gt; MIMEToDescriptionsMap;
-    typedef HashMap&lt;String, Vector&lt;String&gt; &gt; MIMEToExtensionsMap;
</del><span class="cx"> 
</span><ins>+    typedef HashMap&lt;String, String, ASCIICaseInsensitiveHash&gt; MIMEToDescriptionsMap;
+    typedef HashMap&lt;String, Vector&lt;String&gt;, ASCIICaseInsensitiveHash&gt; MIMEToExtensionsMap;
+
</ins><span class="cx">     class PluginPackage : public RefCounted&lt;PluginPackage&gt; {
</span><span class="cx">     public:
</span><span class="cx">         ~PluginPackage();
</span></span></pre></div>
<a id="trunkSourceWebKitwinPluginsPluginPackageWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/Plugins/PluginPackageWin.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/Plugins/PluginPackageWin.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit/win/Plugins/PluginPackageWin.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">     getVersionInfo(versionInfoData.get(), &quot;FileOpenName&quot;).split('|', descriptions);
</span><span class="cx"> 
</span><span class="cx">     for (unsigned i = 0; i &lt; types.size(); i++) {
</span><del>-        String type = types[i].lower();
</del><ins>+        String type = types[i].convertToASCIILowercase();
</ins><span class="cx">         String description = i &lt; descriptions.size() ? descriptions[i] : &quot;&quot;;
</span><span class="cx">         String extensionList = i &lt; extensionLists.size() ? extensionLists[i] : &quot;&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -319,8 +319,8 @@
</span><span class="cx">     if (a.m_mimeToExtensions.size() != b.m_mimeToExtensions.size())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    MIMEToExtensionsMap::const_iterator::Keys end = a.m_mimeToExtensions.end().keys();
-    for (MIMEToExtensionsMap::const_iterator::Keys it = a.m_mimeToExtensions.begin().keys(); it != end; ++it) {
</del><ins>+    auto end = a.m_mimeToExtensions.end().keys();
+    for (auto it = a.m_mimeToExtensions.begin().keys(); it != end; ++it) {
</ins><span class="cx">         if (!b.m_mimeToExtensions.contains(*it))
</span><span class="cx">             return false;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/ChangeLog        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1,3 +1,60 @@
</span><ins>+2016-02-06  Darin Adler  &lt;darin@apple.com&gt;
+
+        Finish auditing call sites of upper() and lower(), eliminate many, and rename the functions
+        https://bugs.webkit.org/show_bug.cgi?id=153905
+
+        Reviewed by Sam Weinig.
+
+        * NetworkProcess/CustomProtocols/CustomProtocolManager.h: Use ASCII case-insensitive hash
+        for set of registered schemes.
+
+        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
+        (WebKit::getPluginInfoFromPropertyLists): Use convertToASCIILowercase for MIME type and
+        for file extensions.
+
+        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
+        (WebKit::NetscapePluginModule::parseMIMEDescription): Use convertToASCIILowercase for
+        MIME description.
+
+        * UIProcess/API/efl/ewk_context.cpp:
+        (ewk_context_preferred_languages_set): Use convertToASCIILowercase for language.
+
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (webkit_web_context_set_preferred_languages): Use convertToASCIILowercase for language.
+
+        * UIProcess/Plugins/PluginInfoStore.cpp:
+        (WebKit::PluginInfoStore::findPluginForExtension): Use Vector::contains instead of
+        writing it out using std::find.
+        (WebKit::pathExtension): Lowercase the result with convertToASCIILowercase instead of
+        leaving that to the caller.
+        (WebKit::PluginInfoStore::findPlugin): Removed call to lower since pathExtension
+        handles that now.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::findPlugin): Use convertToASCIILowercase for MIME type.
+
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::globalURLSchemesWithCustomProtocolHandlers): Use
+        an ASCII case-insensitive hash.
+        (WebKit::WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers):
+        Remove lowercasing, since the hash is now ASCII case-insensitive.
+        (WebKit::WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers):
+        Ditto.
+
+        * UIProcess/WebProcessPool.h: Use an ASCII case-insensitive hash.
+
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::NetscapePlugin::initialize): Use convertToASCIILowercase on parameter names
+        and values.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::pluginSupportsExtension): Use convertToASCIILowercase for extension assertion.
+        Also use a modern for loop.
+        (WebKit::WebFrameLoaderClient::objectContentType): Make the checks for empty MIME types
+        a little less redundant. Reordered logic to avoid checking the list of supported MIME
+        types extra times, and to eliminate the need for a boolean. Use convertToASCIILowercase
+        on the extension.
+
</ins><span class="cx"> 2016-02-06  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Fix more incorrect ASSERT introduced in r196053.
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessCustomProtocolsCustomProtocolManagerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/CustomProtocolManager.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="cx"> #include &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> #include &lt;wtf/Threading.h&gt;
</span><ins>+#include &lt;wtf/text/StringHash.h&gt;
</ins><span class="cx"> OBJC_CLASS NSURLSessionConfiguration;
</span><span class="cx"> OBJC_CLASS WKCustomProtocol;
</span><span class="cx"> #else
</span><span class="lines">@@ -99,7 +100,7 @@
</span><span class="cx">     RefPtr&lt;WorkQueue&gt; m_messageQueue;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-    HashSet&lt;String&gt; m_registeredSchemes;
</del><ins>+    HashSet&lt;String, ASCIICaseInsensitiveHash&gt; m_registeredSchemes;
</ins><span class="cx">     Lock m_registeredSchemesMutex;
</span><span class="cx"> 
</span><span class="cx">     typedef HashMap&lt;uint64_t, RetainPtr&lt;WKCustomProtocol&gt;&gt; CustomProtocolMap;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedPluginsNetscapemacNetscapePluginModuleMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx">         if (mimeTypeDescription &amp;&amp; CFGetTypeID(mimeTypeDescription) != CFStringGetTypeID())
</span><span class="cx">             mimeTypeDescription = 0;
</span><span class="cx"> 
</span><del>-        mimeClassInfo.type = String(mimeType).lower();
</del><ins>+        mimeClassInfo.type = String(mimeType).convertToASCIILowercase();
</ins><span class="cx">         mimeClassInfo.desc = mimeTypeDescription;
</span><span class="cx"> 
</span><span class="cx">         // Now get the extensions for this MIME type.
</span><span class="lines">@@ -204,10 +204,10 @@
</span><span class="cx">             // multiple array elements in the property list. Work around this here by splitting the
</span><span class="cx">             // extension string into components.
</span><span class="cx">             Vector&lt;String&gt; extensionComponents;
</span><del>-            String(extension).lower().split(',', extensionComponents);
</del><ins>+            String(extension).convertToASCIILowercase().split(',', extensionComponents);
</ins><span class="cx"> 
</span><del>-            for (size_t i = 0; i &lt; extensionComponents.size(); ++i)
-                mimeClassInfo.extensions.append(extensionComponents[i]);
</del><ins>+            for (auto&amp; component : extensionComponents)
+                mimeClassInfo.extensions.append(component);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         // Add this MIME type.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedPluginsNetscapex11NetscapePluginModuleX11cpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     ASSERT_ARG(result, result.isEmpty());
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;String&gt; types;
</span><del>-    mimeDescription.lower().split(UChar(';'), false, types);
</del><ins>+    mimeDescription.convertToASCIILowercase().split(UChar(';'), false, types);
</ins><span class="cx">     result.reserveInitialCapacity(types.size());
</span><span class="cx"> 
</span><span class="cx">     size_t mimeInfoCount = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflewk_contextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -563,7 +563,7 @@
</span><span class="cx">         Eina_List* l;
</span><span class="cx">         void* data;
</span><span class="cx">         EINA_LIST_FOREACH(languages, l, data)
</span><del>-            preferredLanguages.append(String::fromUTF8(static_cast&lt;char*&gt;(data)).lower().replace(&quot;_&quot;, &quot;-&quot;));
</del><ins>+            preferredLanguages.append(String::fromUTF8(static_cast&lt;char*&gt;(data)).convertToASCIILowercase().replace(&quot;_&quot;, &quot;-&quot;));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     WebCore::overrideUserPreferredLanguages(preferredLanguages);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -968,7 +968,7 @@
</span><span class="cx"> 
</span><span class="cx">     Vector&lt;String&gt; languages;
</span><span class="cx">     for (size_t i = 0; languageList[i]; ++i)
</span><del>-        languages.append(String::fromUTF8(languageList[i]).lower().replace(&quot;_&quot;, &quot;-&quot;));
</del><ins>+        languages.append(String::fromUTF8(languageList[i]).convertToASCIILowercase().replace(&quot;_&quot;, &quot;-&quot;));
</ins><span class="cx"> 
</span><span class="cx">     WebCore::overrideUserPreferredLanguages(languages);
</span><span class="cx">     WebCore::languageDidChange();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsPluginInfoStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PluginInfoStore.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -138,9 +138,7 @@
</span><span class="cx">             continue;
</span><span class="cx"> 
</span><span class="cx">         for (const auto&amp; mimeClassInfo : plugin.info.mimes) {
</span><del>-            const Vector&lt;String&gt;&amp; extensions = mimeClassInfo.extensions;
-            
-            if (std::find(extensions.begin(), extensions.end(), extension) != extensions.end()) {
</del><ins>+            if (mimeClassInfo.extensions.contains(extension)) {
</ins><span class="cx">                 // We found a supported extension, set the correct MIME type.
</span><span class="cx">                 mimeType = mimeClassInfo.type;
</span><span class="cx">                 return plugin;
</span><span class="lines">@@ -160,11 +158,11 @@
</span><span class="cx">         if (extensionPos != notFound)
</span><span class="cx">             extension = filename.substring(extensionPos + 1);
</span><span class="cx">     }
</span><del>-    
-    return extension;
</del><ins>+    return extension.convertToASCIILowercase();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(COCOA)
</span><ins>+
</ins><span class="cx"> PluginModuleLoadPolicy PluginInfoStore::defaultLoadPolicyForPlugin(const PluginModuleInfo&amp;)
</span><span class="cx"> {
</span><span class="cx">     return PluginModuleLoadNormally;
</span><span class="lines">@@ -190,7 +188,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Next, check if any plug-ins claim to support the URL extension.
</span><del>-    String extension = pathExtension(url).lower();
</del><ins>+    String extension = pathExtension(url);
</ins><span class="cx">     if (!extension.isNull() &amp;&amp; mimeType.isEmpty()) {
</span><span class="cx">         PluginModuleInfo plugin = findPluginForExtension(extension, mimeType, allowedPluginTypes);
</span><span class="cx">         if (!plugin.path.isNull())
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1863,7 +1863,7 @@
</span><span class="cx"> 
</span><span class="cx">     MESSAGE_CHECK_URL(urlString);
</span><span class="cx"> 
</span><del>-    newMimeType = mimeType.lower();
</del><ins>+    newMimeType = mimeType.convertToASCIILowercase();
</ins><span class="cx">     pluginLoadPolicy = PluginModuleLoadNormally;
</span><span class="cx"> 
</span><span class="cx">     PluginData::AllowedPluginTypes allowedPluginTypes = allowOnlyApplicationPlugins ? PluginData::OnlyApplicationPlugins : PluginData::AllPlugins;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -913,9 +913,9 @@
</span><span class="cx">     sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsCORSEnabled(urlScheme));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-HashSet&lt;String&gt;&amp; WebProcessPool::globalURLSchemesWithCustomProtocolHandlers()
</del><ins>+HashSet&lt;String, ASCIICaseInsensitiveHash&gt;&amp; WebProcessPool::globalURLSchemesWithCustomProtocolHandlers()
</ins><span class="cx"> {
</span><del>-    static NeverDestroyed&lt;HashSet&lt;String&gt;&gt; set;
</del><ins>+    static NeverDestroyed&lt;HashSet&lt;String, ASCIICaseInsensitiveHash&gt;&gt; set;
</ins><span class="cx">     return set;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -924,10 +924,9 @@
</span><span class="cx">     if (!urlScheme)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    String schemeLower = urlScheme.lower();
-    globalURLSchemesWithCustomProtocolHandlers().add(schemeLower);
</del><ins>+    globalURLSchemesWithCustomProtocolHandlers().add(urlScheme);
</ins><span class="cx">     for (auto* processPool : allProcessPools())
</span><del>-        processPool-&gt;registerSchemeForCustomProtocol(schemeLower);
</del><ins>+        processPool-&gt;registerSchemeForCustomProtocol(urlScheme);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&amp; urlScheme)
</span><span class="lines">@@ -935,10 +934,9 @@
</span><span class="cx">     if (!urlScheme)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    String schemeLower = urlScheme.lower();
-    globalURLSchemesWithCustomProtocolHandlers().remove(schemeLower);
</del><ins>+    globalURLSchemesWithCustomProtocolHandlers().remove(urlScheme);
</ins><span class="cx">     for (auto* processPool : allProcessPools())
</span><del>-        processPool-&gt;unregisterSchemeForCustomProtocol(schemeLower);
</del><ins>+        processPool-&gt;unregisterSchemeForCustomProtocol(urlScheme);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(CACHE_PARTITIONING)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -317,7 +317,7 @@
</span><span class="cx">     void registerSchemeForCustomProtocol(const String&amp;);
</span><span class="cx">     void unregisterSchemeForCustomProtocol(const String&amp;);
</span><span class="cx"> 
</span><del>-    static HashSet&lt;String&gt;&amp; globalURLSchemesWithCustomProtocolHandlers();
</del><ins>+    static HashSet&lt;String, ASCIICaseInsensitiveHash&gt;&amp; globalURLSchemesWithCustomProtocolHandlers();
</ins><span class="cx">     static void registerGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&amp;);
</span><span class="cx">     static void unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessPluginsNetscapeNetscapePlugincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -638,7 +638,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLUGIN_ARCHITECTURE(MAC)
</span><span class="cx">         if (m_pluginModule-&gt;pluginQuirks().contains(PluginQuirks::WantsLowercaseParameterNames))
</span><del>-            parameterName = parameterName.lower();
</del><ins>+            parameterName = parameterName.convertToASCIILowercase();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">         paramNames.append(parameterName.utf8());
</span><span class="lines">@@ -675,7 +675,7 @@
</span><span class="cx">     if (m_pluginModule-&gt;pluginQuirks().contains(PluginQuirks::MakeOpaqueUnlessTransparentSilverlightBackgroundAttributeExists)) {
</span><span class="cx">         for (size_t i = 0; i &lt; parameters.names.size(); ++i) {
</span><span class="cx">             if (equalLettersIgnoringASCIICase(parameters.names[i], &quot;background&quot;)) {
</span><del>-                setIsTransparent(isTransparentSilverlightBackgroundValue(parameters.values[i].lower()));
</del><ins>+                setIsTransparent(isTransparentSilverlightBackgroundValue(parameters.values[i].convertToASCIILowercase()));
</ins><span class="cx">                 break;
</span><span class="cx">             }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (196222 => 196223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2016-02-06 23:07:54 UTC (rev 196222)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2016-02-06 23:18:47 UTC (rev 196223)
</span><span class="lines">@@ -1508,14 +1508,11 @@
</span><span class="cx"> 
</span><span class="cx"> static bool pluginSupportsExtension(const PluginData&amp; pluginData, const String&amp; extension)
</span><span class="cx"> {
</span><del>-    ASSERT(extension.lower() == extension);
-
</del><ins>+    ASSERT(extension.convertToASCIILowercase() == extension);
</ins><span class="cx">     Vector&lt;MimeClassInfo&gt; mimes;
</span><span class="cx">     Vector&lt;size_t&gt; mimePluginIndices;
</span><span class="cx">     pluginData.getWebVisibleMimesAndPluginIndices(mimes, mimePluginIndices);
</span><del>-    for (size_t i = 0; i &lt; mimes.size(); ++i) {
-        const MimeClassInfo&amp; mimeClassInfo = mimes[i];
-
</del><ins>+    for (auto&amp; mimeClassInfo : mimes) {
</ins><span class="cx">         if (mimeClassInfo.extensions.contains(extension))
</span><span class="cx">             return true;
</span><span class="cx">     }
</span><span class="lines">@@ -1524,43 +1521,38 @@
</span><span class="cx"> 
</span><span class="cx"> ObjectContentType WebFrameLoaderClient::objectContentType(const URL&amp; url, const String&amp; mimeTypeIn)
</span><span class="cx"> {
</span><del>-    // FIXME: This should be merged with WebCore::FrameLoader::defaultObjectContentType when the plugin code
-    // is consolidated.
</del><ins>+    // FIXME: This should eventually be merged with WebCore::FrameLoader::defaultObjectContentType.
</ins><span class="cx"> 
</span><span class="cx">     String mimeType = mimeTypeIn;
</span><span class="cx">     if (mimeType.isEmpty()) {
</span><del>-        String extension = url.path().substring(url.path().reverseFind('.') + 1).lower();
</del><ins>+        String path = url.path();
+        auto dotPosition = path.reverseFind('.');
+        if (dotPosition == notFound)
+            return ObjectContentFrame;
+        String extension = path.substring(dotPosition + 1).convertToASCIILowercase();
</ins><span class="cx"> 
</span><span class="cx">         // Try to guess the MIME type from the extension.
</span><span class="cx">         mimeType = MIMETypeRegistry::getMIMETypeForExtension(extension);
</span><del>-
</del><span class="cx">         if (mimeType.isEmpty()) {
</span><span class="cx">             // Check if there's a plug-in around that can handle the extension.
</span><span class="cx">             if (WebPage* webPage = m_frame-&gt;page()) {
</span><span class="cx">                 if (pluginSupportsExtension(webPage-&gt;corePage()-&gt;pluginData(), extension))
</span><span class="cx">                     return ObjectContentNetscapePlugin;
</span><span class="cx">             }
</span><ins>+            return ObjectContentFrame;
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (mimeType.isEmpty())
-        return ObjectContentFrame;
</del><ins>+    if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
+        return ObjectContentImage;
</ins><span class="cx"> 
</span><del>-    bool plugInSupportsMIMEType = false;
</del><span class="cx">     if (WebPage* webPage = m_frame-&gt;page()) {
</span><del>-        const PluginData&amp; pluginData = webPage-&gt;corePage()-&gt;pluginData();
-        if (pluginData.supportsMimeType(mimeType, PluginData::AllPlugins) &amp;&amp; webFrame()-&gt;coreFrame()-&gt;loader().subframeLoader().allowPlugins())
-            plugInSupportsMIMEType = true;
-        else if (pluginData.supportsMimeType(mimeType, PluginData::OnlyApplicationPlugins))
-            plugInSupportsMIMEType = true;
</del><ins>+        auto allowedPluginTypes = webFrame()-&gt;coreFrame()-&gt;loader().subframeLoader().allowPlugins()
+            ? PluginData::AllPlugins : PluginData::OnlyApplicationPlugins;
+        if (webPage-&gt;corePage()-&gt;pluginData().supportsMimeType(mimeType, allowedPluginTypes))
+            return ObjectContentNetscapePlugin;
</ins><span class="cx">     }
</span><del>-    
-    if (MIMETypeRegistry::isSupportedImageMIMEType(mimeType))
-        return ObjectContentImage;
</del><span class="cx"> 
</span><del>-    if (plugInSupportsMIMEType)
-        return ObjectContentNetscapePlugin;
-
</del><span class="cx">     if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
</span><span class="cx">         return ObjectContentFrame;
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>