Use WTFString::split(char) in more places
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Sep 2014 04:58:35 +0000 (04:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Sep 2014 04:58:35 +0000 (04:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136543

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-09-05
Reviewed by Sam Weinig.

Source/WebCore:

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::nodeForPath):
* mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
* page/PerformanceResourceTiming.cpp:
(WebCore::passesTimingAllowCheck):
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
* platform/graphics/opengl/GLPlatformContext.cpp:
(WebCore::parseExtensions):
* platform/gtk/PasteboardHelper.cpp:
(WebCore::PasteboardHelper::fillDataObjectFromDropData):
* platform/network/curl/CurlCacheEntry.cpp:
(WebCore::CurlCacheEntry::loadResponseHeaders):
* platform/network/curl/CurlCacheManager.cpp:
(WebCore::CurlCacheManager::loadIndex):

Source/WebKit2:

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::PluginVersion::parse):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::initInspectorServer):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::isTransparentSilverlightBackgroundValue):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173350 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorDOMAgent.cpp
Source/WebCore/mathml/MathMLMencloseElement.cpp
Source/WebCore/page/PerformanceResourceTiming.cpp
Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp
Source/WebCore/platform/gtk/PasteboardHelper.cpp
Source/WebCore/platform/network/curl/CurlCacheEntry.cpp
Source/WebCore/platform/network/curl/CurlCacheManager.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm
Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp

index fbdee60..8ae30da 100644 (file)
@@ -1,3 +1,27 @@
+2014-09-05  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Use WTFString::split(char) in more places
+        https://bugs.webkit.org/show_bug.cgi?id=136543
+
+        Reviewed by Sam Weinig.
+
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::nodeForPath):
+        * mathml/MathMLMencloseElement.cpp:
+        (WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
+        * page/PerformanceResourceTiming.cpp:
+        (WebCore::passesTimingAllowCheck):
+        * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
+        (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
+        * platform/graphics/opengl/GLPlatformContext.cpp:
+        (WebCore::parseExtensions):
+        * platform/gtk/PasteboardHelper.cpp:
+        (WebCore::PasteboardHelper::fillDataObjectFromDropData):
+        * platform/network/curl/CurlCacheEntry.cpp:
+        (WebCore::CurlCacheEntry::loadResponseHeaders):
+        * platform/network/curl/CurlCacheManager.cpp:
+        (WebCore::CurlCacheManager::loadIndex):
+
 2014-09-05  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Laying out a TextRun using an SVG font is O(n^2)
index cb7e7da..4b29793 100644 (file)
@@ -1936,7 +1936,7 @@ Node* InspectorDOMAgent::nodeForPath(const String& path)
 
     Node* node = m_document.get();
     Vector<String> pathTokens;
-    path.split(",", false, pathTokens);
+    path.split(',', false, pathTokens);
     if (!pathTokens.size())
         return 0;
     for (size_t i = 0; i < pathTokens.size() - 1; i += 2) {
index e576304..d597e4a 100755 (executable)
@@ -78,7 +78,7 @@ void MathMLMencloseElement::collectStyleForPresentationAttribute(const Qualified
     if (val.isEmpty())
         return;
     if (name == MathMLNames::notationAttr) {
-        val.split(" ", m_notationValues);
+        val.split(' ', m_notationValues);
         size_t notationValueSize = m_notationValues.size();
         for (size_t i = 0; i < notationValueSize; i++) {
             if (m_notationValues[i] == "top" || m_notationValues[i] == "longdiv") {
index c0516c2..226111d 100644 (file)
@@ -67,7 +67,7 @@ static bool passesTimingAllowCheck(const ResourceResponse& response, Document* r
 
     const String& securityOrigin = requestingDocument->securityOrigin()->toString();
     Vector<String> timingAllowOrigins;
-    timingAllowOriginString.split(" ", timingAllowOrigins);
+    timingAllowOriginString.split(' ', timingAllowOrigins);
     for (size_t i = 0; i < timingAllowOrigins.size(); ++i)
         if (timingAllowOrigins[i] == securityOrigin)
             return true;
index fd53545..0750e77 100644 (file)
@@ -215,7 +215,7 @@ void Extensions3DOpenGLCommon::initializeAvailableExtensions()
 {
     String extensionsString = getExtensions();
     Vector<String> availableExtensions;
-    extensionsString.split(" ", availableExtensions);
+    extensionsString.split(' ', availableExtensions);
     for (size_t i = 0; i < availableExtensions.size(); ++i)
         m_availableExtensions.add(availableExtensions[i]);
     m_initializedAvailableExtensions = true;
index 39c0023..847e45e 100644 (file)
@@ -77,7 +77,7 @@ static std::unique_ptr<GLPlatformContext> createOffScreenContext()
 static HashSet<String> parseExtensions(const String& extensionsString)
 {
     Vector<String> extNames;
-    extensionsString.split(" ", extNames);
+    extensionsString.split(' ', extNames);
     HashSet<String> splitExtNames;
     unsigned size = extNames.size();
     for (unsigned i = 0; i < size; ++i)
index 8f2381a..c092227 100644 (file)
@@ -247,7 +247,7 @@ void PasteboardHelper::fillDataObjectFromDropData(GtkSelectionData* data, guint
     } else if (target == netscapeURLAtom) {
         String urlWithLabel(selectionDataToUTF8String(data));
         Vector<String> pieces;
-        urlWithLabel.split("\n", pieces);
+        urlWithLabel.split('\n', pieces);
 
         // Give preference to text/uri-list here, as it can hold more
         // than one URI but still take  the label if there is one.
index 266460e..1378525 100644 (file)
@@ -153,7 +153,7 @@ bool CurlCacheEntry::loadResponseHeaders()
 
     String headerContent = String(buffer.data(), buffer.size());
     Vector<String> headerFields;
-    headerContent.split("\n", headerFields);
+    headerContent.split('\n', headerFields);
 
     Vector<String>::const_iterator it = headerFields.begin();
     Vector<String>::const_iterator end = headerFields.end();
index 5fa9bc4..7670e96 100644 (file)
@@ -129,7 +129,7 @@ void CurlCacheManager::loadIndex()
     // Create strings from buffer
     String headerContent = String(buffer.data(), buffer.size());
     Vector<String> indexURLs;
-    headerContent.split("\n", indexURLs);
+    headerContent.split('\n', indexURLs);
     buffer.clear();
 
     // Add entries to index
index 2a8ad81..3522a40 100644 (file)
@@ -1,3 +1,17 @@
+2014-09-05  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Use WTFString::split(char) in more places
+        https://bugs.webkit.org/show_bug.cgi?id=136543
+
+        Reviewed by Sam Weinig.
+
+        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
+        (WebKit::PluginVersion::parse):
+        * UIProcess/gtk/WebContextGtk.cpp:
+        (WebKit::initInspectorServer):
+        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
+        (WebKit::isTransparentSilverlightBackgroundValue):
+
 2014-09-05  Enrica Casucci  <enrica@apple.com>
 
         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
index 595d6dd..a50c50e 100644 (file)
@@ -443,7 +443,7 @@ PluginVersion PluginVersion::parse(const String& versionString)
     PluginVersion version;
 
     Vector<String> versionStringComponents;
-    versionString.split(".", versionStringComponents);
+    versionString.split('.', versionStringComponents);
     for (size_t i = 0; i < versionStringComponents.size(); ++i) {
         bool successfullyParsed = false;
         unsigned versionComponent = versionStringComponents[i].toUInt(&successfullyParsed);
index 54fab94..77975db 100644 (file)
@@ -61,7 +61,7 @@ static void initInspectorServer()
         unsigned short port = 2999;
 
         Vector<String> result;
-        serverAddress.split(":", result);
+        serverAddress.split(':', result);
 
         if (result.size() == 2) {
             bindAddress = result[0];
index 86d02b2..dc0f982 100644 (file)
@@ -560,7 +560,7 @@ static bool isTransparentSilverlightBackgroundValue(const String& lowercaseBackg
         }
     } else if (lowercaseBackgroundValue.startsWith("sc#")) {
         Vector<String> components;
-        lowercaseBackgroundValue.substring(3).split(",", components);
+        lowercaseBackgroundValue.substring(3).split(',', components);
 
         // An ScRGB value with alpha transparency, in the form sc#A,R,G,B.
         if (components.size() == 4) {