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

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:46:35 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 72e4d30ac32f37a557e3e9ec7258b93d1dab0182
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Jul 9 21:57:19 2003 +0000

    WebKit:
    
    	Fixed: <rdar://problem/3229364>: user stylesheet path should be stored relative to home directory
    
            Reviewed by john.
    
            * Misc.subproj/WebKitNSStringExtras.h:
            * Misc.subproj/WebKitNSStringExtras.m:
            (-[NSString _web_stringByAbbreviatingWithTildeInPath]): new, handles home directories that have symlinks in path
            * WebView.subproj/WebPreferences.m:
            (-[WebPreferences userStyleSheetLocation]): converts path string or URL string to URL
            (-[WebPreferences setUserStyleSheetLocation:]): converts URL to path string or URL string
    
    WebBrowser:
    
    	Fixed: <rdar://problem/3183049>: Saved download entries use absolute paths thus not mobility-friendly
    
            Reviewed by john.
    
            * DownloadProgressEntry.m:
    	(-[DownloadProgressEntry initWithDictionary:]): expand home-dir relative paths
            (-[DownloadProgressEntry dictionaryRepresentation]): use home-dir relative paths when saving downloads paths to disk
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 5aed245..ac9d93a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2003-07-09  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3229364>: user stylesheet path should be stored relative to home directory
+
+        Reviewed by john.
+
+        * Misc.subproj/WebKitNSStringExtras.h:
+        * Misc.subproj/WebKitNSStringExtras.m:
+        (-[NSString _web_stringByAbbreviatingWithTildeInPath]): new, handles home directories that have symlinks in path
+        * WebView.subproj/WebPreferences.m:
+        (-[WebPreferences userStyleSheetLocation]): converts path string or URL string to URL
+        (-[WebPreferences setUserStyleSheetLocation:]): converts URL to path string or URL string
+
 2003-07-08  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebKit/Misc.subproj/WebKitNSStringExtras.h b/WebKit/Misc.subproj/WebKitNSStringExtras.h
index 78bf762..132866f 100644
--- a/WebKit/Misc.subproj/WebKitNSStringExtras.h
+++ b/WebKit/Misc.subproj/WebKitNSStringExtras.h
@@ -13,4 +13,8 @@
 
 - (float)_web_widthWithFont:(NSFont *)font;
 
+// Handles home directories that have symlinks in their paths.
+// This works around 2774250.
+- (NSString *)_web_stringByAbbreviatingWithTildeInPath;
+
 @end
diff --git a/WebKit/Misc.subproj/WebKitNSStringExtras.m b/WebKit/Misc.subproj/WebKitNSStringExtras.m
index 0f6e96c..b6512a5 100644
--- a/WebKit/Misc.subproj/WebKitNSStringExtras.m
+++ b/WebKit/Misc.subproj/WebKitNSStringExtras.m
@@ -91,4 +91,19 @@ static BOOL canUseFastRenderer (const UniChar *buffer, unsigned length)
     return width;
 }
 
+- (NSString *)_web_stringByAbbreviatingWithTildeInPath
+{
+    NSString *resolvedHomeDirectory = [NSHomeDirectory() stringByResolvingSymlinksInPath];
+    NSString *path;
+    
+    if ([self hasPrefix:resolvedHomeDirectory]) {
+        NSString *relativePath = [self substringFromIndex:[resolvedHomeDirectory length]];
+        path = [NSHomeDirectory() stringByAppendingPathComponent:relativePath];
+    } else {
+        path = self;
+    }
+        
+    return [path stringByAbbreviatingWithTildeInPath];
+}
+
 @end
diff --git a/WebKit/Plugins.subproj/WebNetscapePluginPackage.m b/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
index eb3c58a..d947c62 100644
--- a/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
+++ b/WebKit/Plugins.subproj/WebNetscapePluginPackage.m
@@ -146,20 +146,6 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
         }
     }
 
-    // Workaround for this bug:
-    // Radar 3134219 (MPEG-4 files don't work with the QuickTime plugin in Safari, work fine in Mozilla, IE)
-    // For beta 1, when getting the MIME information for the QuickTime plugin, we directly insert the 
-    // information to handle MP4. 
-    // In the future, we will use the additional plugin entry points to dynamically load this information
-    // from the plugin itself.
-    if ([[self filename] isEqualToString:@"QuickTime Plugin.plugin"]) {
-        NSArray *extensions = [NSArray arrayWithObjects:@"mp4", @"mpg4", nil];
-        [MIMEToExtensionsDictionary setObject:extensions forKey:@"video/mp4"];
-        [MIMEToDescriptionDictionary setObject:@"MP4 Video" forKey:@"video/mp4"];
-        [MIMEToExtensionsDictionary setObject:extensions forKey:@"audio/mp4"];
-        [MIMEToDescriptionDictionary setObject:@"MP4 Audio" forKey:@"audio/mp4"];
-    }
-
     [self setMIMEToDescriptionDictionary:MIMEToDescriptionDictionary];
     [self setMIMEToExtensionsDictionary:MIMEToExtensionsDictionary];
 
@@ -279,11 +265,9 @@ static TransitionVector tVectorForFunctionPointer(FunctionPointer);
 #endif
     }
 
-    if (![self getPluginInfoFromPLists]) {
-        if (![self getPluginInfoFromResources]) {
-            [self release];
-            return nil;
-        }
+    if (![self getPluginInfoFromPLists] && ![self getPluginInfoFromResources]) {
+        [self release];
+        return nil;
     }
 
     return self;
diff --git a/WebKit/WebView.subproj/WebPreferences.m b/WebKit/WebView.subproj/WebPreferences.m
index be9ba3d..d9d97e4 100644
--- a/WebKit/WebView.subproj/WebPreferences.m
+++ b/WebKit/WebView.subproj/WebPreferences.m
@@ -5,7 +5,10 @@
 
 #import <WebKit/WebPreferencesPrivate.h>
 
+#import <WebKit/WebKitNSStringExtras.h>
+
 #import <Foundation/NSDictionary_NSURLExtras.h>
+#import <Foundation/NSString_NSURLExtras.h>
 
 #import <WebCore/WebCoreSettings.h>
 
@@ -387,12 +390,27 @@ NS_ENDHANDLER
 
 - (NSURL *)userStyleSheetLocation
 {
-    return [NSURL URLWithString:[self _stringValueForKey: WebKitUserStyleSheetLocationPreferenceKey]];
+    NSString *locationString = [self _stringValueForKey: WebKitUserStyleSheetLocationPreferenceKey];
+    
+    if ([locationString _web_looksLikeAbsoluteURL]) {
+        return [NSURL URLWithString:locationString];
+    } else {
+        locationString = [locationString stringByExpandingTildeInPath];
+        return [NSURL fileURLWithPath:locationString];
+    }
 }
 
 - (void)setUserStyleSheetLocation:(NSURL *)URL
 {
-    [self _setStringValue: [URL absoluteString] forKey: WebKitUserStyleSheetLocationPreferenceKey];
+    NSString *locationString;
+    
+    if ([URL isFileURL]) {
+        locationString = [[URL path] _web_stringByAbbreviatingWithTildeInPath];
+    } else {
+        locationString = [URL absoluteString];
+    }
+    
+    [self _setStringValue:locationString forKey: WebKitUserStyleSheetLocationPreferenceKey];
 }
 
 - (BOOL)isJavaEnabled

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list