Title: [103207] trunk/Source/WebCore
Revision
103207
Author
[email protected]
Date
2011-12-18 18:59:34 -0800 (Sun, 18 Dec 2011)

Log Message

Unreviewed, rolling out r103199.
http://trac.webkit.org/changeset/103199
https://bugs.webkit.org/show_bug.cgi?id=74832

Caused a bot crashiness extravaganza! (Requested by kling on
#webkit).

Patch by Sheriff Bot <[email protected]> on 2011-12-18

* platform/KURL.cpp:
(WebCore::isLetterMatchIgnoringCase):
(WebCore::protocolIs):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (103206 => 103207)


--- trunk/Source/WebCore/ChangeLog	2011-12-19 02:51:46 UTC (rev 103206)
+++ trunk/Source/WebCore/ChangeLog	2011-12-19 02:59:34 UTC (rev 103207)
@@ -1,3 +1,16 @@
+2011-12-18  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r103199.
+        http://trac.webkit.org/changeset/103199
+        https://bugs.webkit.org/show_bug.cgi?id=74832
+
+        Caused a bot crashiness extravaganza! (Requested by kling on
+        #webkit).
+
+        * platform/KURL.cpp:
+        (WebCore::isLetterMatchIgnoringCase):
+        (WebCore::protocolIs):
+
 2011-12-18  Dan Bernstein  <[email protected]>
 
         Positioned Floats: Assertion hit in fast/block/positioning/positioned-float-layout-after-image-load.html

Modified: trunk/Source/WebCore/platform/KURL.cpp (103206 => 103207)


--- trunk/Source/WebCore/platform/KURL.cpp	2011-12-19 02:51:46 UTC (rev 103206)
+++ trunk/Source/WebCore/platform/KURL.cpp	2011-12-19 02:59:34 UTC (rev 103207)
@@ -60,8 +60,7 @@
 static const unsigned maximumValidPortNumber = 0xFFFE;
 static const unsigned invalidPortNumber = 0xFFFF;
 
-template<typename CharType>
-static inline bool isLetterMatchIgnoringCase(CharType character, char lowercaseLetter)
+static inline bool isLetterMatchIgnoringCase(UChar character, char lowercaseLetter)
 {
     ASSERT(isASCIILower(lowercaseLetter));
     return (character | 0x20) == lowercaseLetter;
@@ -69,6 +68,12 @@
 
 #if !USE(GOOGLEURL)
 
+static inline bool isLetterMatchIgnoringCase(char character, char lowercaseLetter)
+{
+    ASSERT(isASCIILower(lowercaseLetter));
+    return (character | 0x20) == lowercaseLetter;
+}
+
 enum URLCharacterClasses {
     // alpha 
     SchemeFirstChar = 1 << 0,
@@ -1714,9 +1719,10 @@
     copyASCII(m_string, buffer.data());
 }
 
-template<typename CharType>
-bool charactersAreProtocol(const CharType* url, const char* protocol)
+bool protocolIs(const String& url, const char* protocol)
 {
+    // Do the comparison without making a new string object.
+    assertProtocolIsGood(protocol);
     for (int i = 0; ; ++i) {
         if (!protocol[i])
             return url[i] == ':';
@@ -1725,16 +1731,6 @@
     }
 }
 
-bool protocolIs(const String& url, const char* protocol)
-{
-    assertProtocolIsGood(protocol);
-
-    // Do the comparison without making a new string object.
-    if (url.is8Bit())
-        return charactersAreProtocol(url.characters8(), protocol);
-    return charactersAreProtocol(url.characters16(), protocol);
-}
-
 bool isValidProtocol(const String& protocol)
 {
     // RFC3986: ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to