[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:30:59 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a8044c0e15b4fc13c849273b57372e879c10c497
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Mar 21 23:25:03 2003 +0000
WebFoundation:
Fixed: 3081681 - text/calendar should be downloaded instead of displayed
Fixed: 3177603 - vCards appear in browser, not downloaded
Reviewed by darin.
* Misc.subproj/WebNSDataExtras.m:
(-[NSData _web_guessedMIMEType]): sniff for vcards and ical files
* types.plist: added text/calendar and text/vcard
WebKit:
Fixed: 3081681 - text/calendar should be downloaded instead of displayed
Fixed: 3177603 - vCards appear in browser, not downloaded
Reviewed by darin.
* WebView.subproj/WebDataSourcePrivate.h:
* WebView.subproj/WebDataSourcePrivate.m:
(+[WebDataSource _representationClassForMIMEType:]): was _canShowMIMEType
* WebView.subproj/WebFrameViewPrivate.h:
* WebView.subproj/WebFrameViewPrivate.m:
(+[WebFrameView _viewClassForMIMEType:]): was _canShowMIMEType
* WebView.subproj/WebTextView.h:
* WebView.subproj/WebTextView.m:
(+[WebTextView unshowableMIMETypes]): new, returns text types that shouldn't be shown
* WebView.subproj/WebView.m:
(+[WebView canShowMIMEType:]): call unshowableMIMETypes
WebBrowser:
Fixed: 3081681 - text/calendar should be downloaded instead of displayed
Fixed: 3177603 - vCards appear in browser, not downloaded
Reviewed by darin.
* Preferences.subproj/WBPreferences.m:
(+[WBPreferences shouldOpenFileAtPath:]): auto-open vcf and ics
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3896 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 7fcab06..a2bed0b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,22 @@
+2003-03-21 Chris Blumenberg <cblu at apple.com>
+
+ Fixed: 3081681 - text/calendar should be downloaded instead of displayed
+ Fixed: 3177603 - vCards appear in browser, not downloaded
+
+ Reviewed by darin.
+
+ * WebView.subproj/WebDataSourcePrivate.h:
+ * WebView.subproj/WebDataSourcePrivate.m:
+ (+[WebDataSource _representationClassForMIMEType:]): was _canShowMIMEType
+ * WebView.subproj/WebFrameViewPrivate.h:
+ * WebView.subproj/WebFrameViewPrivate.m:
+ (+[WebFrameView _viewClassForMIMEType:]): was _canShowMIMEType
+ * WebView.subproj/WebTextView.h:
+ * WebView.subproj/WebTextView.m:
+ (+[WebTextView unshowableMIMETypes]): new, returns text types that shouldn't be shown
+ * WebView.subproj/WebView.m:
+ (+[WebView canShowMIMEType:]): call unshowableMIMETypes
+
2003-03-20 Richard Williamson <rjw at apple.com>
Use "Item" consistently in the WebHistory and WebBackForwardList.
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index e5a4fbe..0a22105 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -139,7 +139,7 @@
- (void)_clearErrors;
- (void)_setMainDocumentError:(WebError *)error;
+ (NSMutableDictionary *)_repTypes;
-+ (BOOL)_canShowMIMEType:(NSString *)MIMEType;
++ (Class)_representationClassForMIMEType:(NSString *)MIMEType;
- (void)_loadIcon;
- (void)_setIconURL:(NSURL *)URL;
- (void)_setIconURL:(NSURL *)URL withType:(NSString *)iconType;
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index d202154..400cd3b 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -452,9 +452,9 @@
return repTypes;
}
-+ (BOOL)_canShowMIMEType:(NSString *)MIMEType
++ (Class)_representationClassForMIMEType:(NSString *)MIMEType
{
- return [[self _repTypes] _web_objectForMIMEType:MIMEType] != nil;
+ return [[self _repTypes] _web_objectForMIMEType:MIMEType];
}
- (WebBridge *)_bridge
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index 60797a8..9415411 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -45,7 +45,7 @@
- (void)_goBack;
- (void)_goForward;
+ (NSMutableDictionary *)_viewTypes;
-+ (BOOL)_canShowMIMEType:(NSString *)MIMEType;
++ (Class)_viewClassForMIMEType:(NSString *)MIMEType;
- (BOOL)_isMainFrame;
- (void)_reregisterDraggedTypes;
@end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index 60797a8..9415411 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -45,7 +45,7 @@
- (void)_goBack;
- (void)_goForward;
+ (NSMutableDictionary *)_viewTypes;
-+ (BOOL)_canShowMIMEType:(NSString *)MIMEType;
++ (Class)_viewClassForMIMEType:(NSString *)MIMEType;
- (BOOL)_isMainFrame;
- (void)_reregisterDraggedTypes;
@end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index a1f3d25..8961574 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -266,9 +266,9 @@
return viewTypes;
}
-+ (BOOL)_canShowMIMEType:(NSString *)MIMEType
++ (Class)_viewClassForMIMEType:(NSString *)MIMEType
{
- return [[self _viewTypes] _web_objectForMIMEType:MIMEType] != nil;
+ return [[self _viewTypes] _web_objectForMIMEType:MIMEType];
}
- (void)_goBack
diff --git a/WebKit/WebView.subproj/WebTextView.h b/WebKit/WebView.subproj/WebTextView.h
index 7ed0206..2d1dfa9 100644
--- a/WebKit/WebView.subproj/WebTextView.h
+++ b/WebKit/WebView.subproj/WebTextView.h
@@ -14,6 +14,7 @@
{
}
++ (NSArray *)unshowableMIMETypes;
- (void)setFixedWidthFont;
@end
diff --git a/WebKit/WebView.subproj/WebTextView.m b/WebKit/WebView.subproj/WebTextView.m
index 60813cf..991dee3 100644
--- a/WebKit/WebView.subproj/WebTextView.m
+++ b/WebKit/WebView.subproj/WebTextView.m
@@ -17,6 +17,15 @@
@implementation WebTextView
++ (NSArray *)unshowableMIMETypes
+{
+ return [NSArray arrayWithObjects:
+ @"text/calendar",
+ @"text/x-calendar",
+ @"text/vcard",
+ @"text/x-vcard", nil];
+}
+
- (id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index 3ad2fa6..40077d6 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -22,6 +22,8 @@
#import <WebKit/WebPolicyDelegate.h>
#import <WebKit/WebPreferences.h>
#import <WebKit/WebResourceLoadDelegate.h>
+#import <WebKit/WebTextView.h>
+#import <WebKit/WebTextRepresentation.h>
#import <WebKit/WebViewPrivate.h>
#import <WebKit/WebWindowOperationsDelegate.h>
@@ -56,14 +58,26 @@ NSString *WebElementLinkTitleKey = @"WebElementLinkTitle";
+ (BOOL)canShowMIMEType:(NSString *)MIMEType
{
- if([WebFrameView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType]){
- return YES;
- }else{
+ Class viewClass = [WebFrameView _viewClassForMIMEType:MIMEType];
+ Class repClass = [WebDataSource _representationClassForMIMEType:MIMEType];
+
+ if (!viewClass || !repClass){
// Have the plug-ins register views and representations
[WebPluginDatabase installedPlugins];
- if([WebFrameView _canShowMIMEType:MIMEType] && [WebDataSource _canShowMIMEType:MIMEType])
- return YES;
+ viewClass = [WebFrameView _viewClassForMIMEType:MIMEType];
+ repClass = [WebDataSource _representationClassForMIMEType:MIMEType];
+ }
+
+ // Special-case WebTextView for text types that shouldn't be shown.
+ if (viewClass && repClass) {
+ if (viewClass == [WebTextView class] &&
+ repClass == [WebTextRepresentation class] &&
+ [[WebTextView unshowableMIMETypes] containsObject:MIMEType]) {
+ return NO;
+ }
+ return YES;
}
+
return NO;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list