[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:25:11 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 175c64d01ba115759875e7193254fe07553e9cab
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Feb 2 23:29:24 2004 +0000

    WebKit:
    
            Reviewed by Darin.
    
            * Misc.subproj/WebNSURLExtras.h:
            * Misc.subproj/WebNSURLExtras.m:
            (-[NSURL _web_URLWithLowercasedScheme]):
            new method, returns a URL whose scheme has been tolower'ed
    
            * English.lproj/StringsNotToBeLocalized.txt:
            Updated for recent changes.
    
    WebBrowser:
    
            - fixed <rdar://problem/3527598>:
            "(null)" appears for some malformed URLs in location bar
    
            Reviewed by Darin.
    
            * BrowserWebController.m:
            (-[BrowserWebView webView:unableToImplementPolicyWithError:frame:]):
            Call new _web_URLWithLowercasedScheme; the old code here was subtly
            transforming some degenerate URLs
    
            (-[BrowserWebView openURLExternallyWithRequest:inFrame:]):
            New error message to handle the case where [URL scheme] returns nil.
    
            * English.lproj/Localizable.strings:
            * English.lproj/StringsNotToBeLocalized.txt:
            updated for these changes
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6027 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index edb8c4f..9988a67 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,15 @@
+2004-02-02  John Sullivan  <sullivan at apple.com>
+
+        Reviewed by Darin.
+
+        * Misc.subproj/WebNSURLExtras.h:
+        * Misc.subproj/WebNSURLExtras.m:
+        (-[NSURL _web_URLWithLowercasedScheme]):
+        new method, returns a URL whose scheme has been tolower'ed
+
+        * English.lproj/StringsNotToBeLocalized.txt:
+        Updated for recent changes.
+
 2004-02-02  Chris Blumenberg  <cblu at apple.com>
 
 	Fixed: <rdar://problem/3546924>: REGRESSION: dragging text or images over a WebView is jerky
diff --git a/WebKit/English.lproj/StringsNotToBeLocalized.txt b/WebKit/English.lproj/StringsNotToBeLocalized.txt
index 3690816..d74609a 100644
--- a/WebKit/English.lproj/StringsNotToBeLocalized.txt
+++ b/WebKit/English.lproj/StringsNotToBeLocalized.txt
@@ -128,10 +128,12 @@
 "WebCurrentFrameState"
 "WebDataRequest"
 "WebElementFrame"
+"WebElementHTMLString"
 "WebElementImage"
 "WebElementImageAltString"
 "WebElementImageRect"
 "WebElementImageURL"
+"WebElementIsEditable"
 "WebElementIsSelected"
 "WebElementLinkLabel"
 "WebElementLinkTitle"
diff --git a/WebKit/Misc.subproj/WebNSURLExtras.h b/WebKit/Misc.subproj/WebNSURLExtras.h
index 9fbfbe5..acfea1c 100644
--- a/WebKit/Misc.subproj/WebNSURLExtras.h
+++ b/WebKit/Misc.subproj/WebNSURLExtras.h
@@ -16,6 +16,8 @@
 + (NSURL *)_web_URLWithData:(NSData *)data;
 + (NSURL *)_web_URLWithData:(NSData *)data relativeToURL:(NSURL *)baseURL;
 
+- (NSURL *)_web_URLWithLowercasedScheme;
+
 - (NSData *)_web_originalData;
 - (NSString *)_web_originalDataAsString;
 - (const char *)_web_URLCString;
diff --git a/WebKit/Misc.subproj/WebNSURLExtras.m b/WebKit/Misc.subproj/WebNSURLExtras.m
index 9f5ad82..3989d68 100644
--- a/WebKit/Misc.subproj/WebNSURLExtras.m
+++ b/WebKit/Misc.subproj/WebNSURLExtras.m
@@ -526,6 +526,47 @@ static NSString *mapHostNames(NSString *string, BOOL encode)
     return [[self _web_originalDataAsString] _web_hasCaseInsensitivePrefix:@"about:"] || [self _web_isEmpty];
 }
 
+- (NSURL *)_web_URLWithLowercasedScheme
+{
+    CFRange range;
+    CFURLGetByteRangeForComponent((CFURLRef)self, kCFURLComponentScheme, &range);
+    if (range.location == kCFNotFound) {
+        return self;
+    }
+    
+    UInt8 static_buffer[URL_BYTES_BUFFER_LENGTH];
+    UInt8 *buffer = static_buffer;
+    CFIndex bytesFilled = CFURLGetBytes((CFURLRef)self, buffer, URL_BYTES_BUFFER_LENGTH);
+    if (bytesFilled == -1) {
+        CFIndex bytesToAllocate = CFURLGetBytes((CFURLRef)self, NULL, 0);
+        buffer = malloc(bytesToAllocate);
+        bytesFilled = CFURLGetBytes((CFURLRef)self, buffer, bytesToAllocate);
+        ASSERT(bytesFilled == bytesToAllocate);
+    }
+    
+    int i;
+    BOOL changed = NO;
+    for (i = 0; i < range.length; ++i) {
+        UInt8 c = buffer[range.location + i];
+        UInt8 lower = tolower(c);
+        if (c != lower) {
+            buffer[range.location + i] = lower;
+            changed = YES;
+        }
+    }
+    
+    NSURL *result = changed
+        ? [(NSURL *)CFURLCreateAbsoluteURLWithBytes(NULL, buffer, bytesFilled, kCFStringEncodingUTF8, nil, YES) autorelease]
+        : self;
+
+    if (buffer != static_buffer) {
+        free(buffer);
+    }
+    
+    return result;
+}
+
+
 -(BOOL)_web_hasQuestionMarkOnlyQueryString
 {
     CFRange rangeWithSeparators;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list