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

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:38:58 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit c143d3b92ca330ce44618731f356d8cf8ab5d142
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Apr 26 01:42:11 2003 +0000

    WebBrowser:
            API changes from final review meeting.
    
            WebView:
            Added canShowMIMETypeAsHTML:
    
            WebFrameView:
            Removed scrollView
            Removed isDocumentHTML
    
            WebDataSource:
            Removed isDocumentHTML
    
            Reviewed by Chris.
    
            * BrowserDocument.m:
            (-[BrowserDocument _isDocumentHTML]):
            * BrowserWebViewExtras.h:
            * BrowserWebViewExtras.m:
            (-[WebFrameView scrollView]):
            * FrameProgressEntry.m:
            (+[FrameProgressEntry _isDocumentHTMLForDataSource:]):
            (-[FrameProgressEntry useSingletonChildForDisplay]):
    
    WebKit:
            API changes from final review meeting.
    
            WebView:
            Added canShowMIMETypeAsHTML:
    
            WebFrameView:
            Removed scrollView
            Removed isDocumentHTML
    
            WebDataSource:
            Removed isDocumentHTML
    
            Reviewed by Chris.
    
            * WebCoreSupport.subproj/WebTextRenderer.m:
            (-[WebTextRenderer initWithFont:usingPrinterFont:]):
            * WebView.subproj/WebDataSource.h:
            * WebView.subproj/WebDataSource.m:
            * WebView.subproj/WebDataSourcePrivate.h:
            * WebView.subproj/WebDataSourcePrivate.m:
            (-[WebDataSource _layoutChildren]):
            (-[WebDataSource _mainDocumentError]):
            (-[WebDataSource _isDocumentHTML]):
            * WebView.subproj/WebFramePrivate.m:
            (-[WebFrame _makeDocumentView]):
            (-[WebFrame _setState:]):
            (-[WebFrame _isLoadComplete]):
            * WebView.subproj/WebFrameView.h:
            * WebView.subproj/WebFrameView.m:
            (-[WebFrameView setAllowsScrolling:]):
            (-[WebFrameView allowsScrolling]):
            (-[WebFrameView documentView]):
            (-[WebFrameView drawRect:]):
            (-[WebFrameView setFrameSize:]):
            * WebView.subproj/WebFrameViewPrivate.h:
            * WebView.subproj/WebFrameViewPrivate.m:
            (-[WebFrameView _setDocumentView:]):
            (-[WebFrameView _scrollView]):
            (-[WebFrameView _contentView]):
            (-[WebFrameView _verticalKeyboardScrollAmount]):
            (-[WebFrameView _horizontalKeyboardScrollAmount]):
            (-[WebFrameView _scrollToBottomLeft]):
            (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
            (+[WebFrameView _canShowMIMETypeAsHTML:]):
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView _setPrinting:pageWidth:]):
            * WebView.subproj/WebHTMLViewPrivate.m:
            (-[WebHTMLView _updateMouseoverWithEvent:]):
            * WebView.subproj/WebView.h:
            * WebView.subproj/WebView.m:
            (+[WebView canShowMIMETypeAsHTML:]):
    
    Tests:
            API changes from final review meeting.
    
            WebView:
            Added canShowMIMETypeAsHTML:
    
            WebFrameView:
            Removed scrollView
            Removed isDocumentHTML
    
            WebDataSource:
            Removed isDocumentHTML
    
            Reviewed by Chris.
    
            * SimpleViewer/DocumentController.m:
            (-[DocumentController webView:didReceiveTitle:forFrame:]):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4196 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index bdd3f0d..391d28c 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,57 @@
+2003-04-25  Richard Williamson   <rjw at apple.com>
+
+        API changes from final review meeting.
+        
+        WebView:
+        Added canShowMIMETypeAsHTML:
+
+        WebFrameView:
+        Removed scrollView
+        Removed isDocumentHTML
+        
+        WebDataSource:
+        Removed isDocumentHTML
+        
+        Reviewed by Chris.
+
+        * WebCoreSupport.subproj/WebTextRenderer.m:
+        (-[WebTextRenderer initWithFont:usingPrinterFont:]):
+        * WebView.subproj/WebDataSource.h:
+        * WebView.subproj/WebDataSource.m:
+        * WebView.subproj/WebDataSourcePrivate.h:
+        * WebView.subproj/WebDataSourcePrivate.m:
+        (-[WebDataSource _layoutChildren]):
+        (-[WebDataSource _mainDocumentError]):
+        (-[WebDataSource _isDocumentHTML]):
+        * WebView.subproj/WebFramePrivate.m:
+        (-[WebFrame _makeDocumentView]):
+        (-[WebFrame _setState:]):
+        (-[WebFrame _isLoadComplete]):
+        * WebView.subproj/WebFrameView.h:
+        * WebView.subproj/WebFrameView.m:
+        (-[WebFrameView setAllowsScrolling:]):
+        (-[WebFrameView allowsScrolling]):
+        (-[WebFrameView documentView]):
+        (-[WebFrameView drawRect:]):
+        (-[WebFrameView setFrameSize:]):
+        * WebView.subproj/WebFrameViewPrivate.h:
+        * WebView.subproj/WebFrameViewPrivate.m:
+        (-[WebFrameView _setDocumentView:]):
+        (-[WebFrameView _scrollView]):
+        (-[WebFrameView _contentView]):
+        (-[WebFrameView _verticalKeyboardScrollAmount]):
+        (-[WebFrameView _horizontalKeyboardScrollAmount]):
+        (-[WebFrameView _scrollToBottomLeft]):
+        (+[WebFrameView _viewTypesAllowImageTypeOmission:]):
+        (+[WebFrameView _canShowMIMETypeAsHTML:]):
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView _setPrinting:pageWidth:]):
+        * WebView.subproj/WebHTMLViewPrivate.m:
+        (-[WebHTMLView _updateMouseoverWithEvent:]):
+        * WebView.subproj/WebView.h:
+        * WebView.subproj/WebView.m:
+        (+[WebView canShowMIMETypeAsHTML:]):
+
 2003-04-25  Chris Blumenberg  <cblu at apple.com>
 
         Renamed WebDownload to NSURLDownload and moved it to WebFoundation.
diff --git a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
index f0faf31..3fe688d 100644
--- a/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
+++ b/WebKit/WebCoreSupport.subproj/WebTextRenderer.m
@@ -493,7 +493,7 @@ static inline BOOL _fontContainsString (NSFont *font, NSString *string)
     float asc = (ScaleEmToUnits(metrics->ascent, unitsPerEm)*pointSize);
     float dsc = (-ScaleEmToUnits(metrics->descent, unitsPerEm)*pointSize);
     float lineGap = ScaleEmToUnits(metrics->lineGap, unitsPerEm)*pointSize;
-    float akiAdjustment;
+    float akiAdjustment = 0;
 
     ascent = ROUND_TO_INT(asc);
     descent = ROUND_TO_INT(dsc);
@@ -502,8 +502,8 @@ static inline BOOL _fontContainsString (NSFont *font, NSString *string)
     // ascender and descender).  The check is performed by _forceAscenderDelta, but that
     // method caches the result for the entire font family.  Here we reset the cache bit
     // before calling the check method.
-    [((NSCGSFont *)f) _resetLineHeightAdjustmentCache];
-    akiAdjustment = ([font _forceAscenderDelta] ? floor(((asc + dsc) * 0.20) + 0.5) : 0.0);
+    //[((NSCGSFont *)f) _resetLineHeightAdjustmentCache];
+    //akiAdjustment = ([font _forceAscenderDelta] ? floor(((asc + dsc) * 0.20) + 0.5) : 0.0);
 
     lineSpacing =  ascent + descent + (int)(lineGap > 0.0 ? floor(lineGap + 0.5) : 0.0) + akiAdjustment;
 
diff --git a/WebKit/WebView.subproj/WebDataSource.h b/WebKit/WebView.subproj/WebDataSource.h
index 2eb028c..ac2e53b 100644
--- a/WebKit/WebView.subproj/WebDataSource.h
+++ b/WebKit/WebView.subproj/WebDataSource.h
@@ -88,12 +88,6 @@
 - (BOOL)isLoading;
 
 /*!
-    @method isDocumentHTML
-    @result Returns YES if the representation of the datasource is a WebHTMLRepresentation.
-*/
-- (BOOL)isDocumentHTML;
-
-/*!
     @method pageTitle
     @result Returns nil or the page title.
     // FIXME move to WebHTMLRepresentation
diff --git a/WebKit/WebView.subproj/WebDataSource.m b/WebKit/WebView.subproj/WebDataSource.m
index 37b6100..91932d3 100644
--- a/WebKit/WebView.subproj/WebDataSource.m
+++ b/WebKit/WebView.subproj/WebDataSource.m
@@ -115,11 +115,6 @@
 }
 
 
-- (BOOL)isDocumentHTML
-{
-    return [[self representation] isKindOfClass: [WebHTMLRepresentation class]];
-}
-
 // Returns nil or the page title.
 - (NSString *)pageTitle
 {
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.h b/WebKit/WebView.subproj/WebDataSourcePrivate.h
index 81a1fb2..5e114a6 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.h
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.h
@@ -182,4 +182,6 @@
 
 - (void)_setWebFrame:(WebFrame *)frame;
 
+- (BOOL)_isDocumentHTML;
+
 @end
diff --git a/WebKit/WebView.subproj/WebDataSourcePrivate.m b/WebKit/WebView.subproj/WebDataSourcePrivate.m
index 2245f0c..060fafd 100644
--- a/WebKit/WebView.subproj/WebDataSourcePrivate.m
+++ b/WebKit/WebView.subproj/WebDataSourcePrivate.m
@@ -433,7 +433,7 @@
         for (i = 0; i < [subFrames count]; i++){
             subFrame = [subFrames objectAtIndex: i];
             dview = [[subFrame frameView] documentView];
-            if ([[subFrame frameView] isDocumentHTML])
+            if ([[subFrame dataSource] _isDocumentHTML])
                 [dview _adjustFrames];
             [dview setNeedsDisplay: YES];
             [[subFrame dataSource] _layoutChildren];
@@ -779,5 +779,11 @@
     return _private->mainDocumentError;
 }
 
+- (BOOL)_isDocumentHTML
+{
+    NSString *MIMEType = [[self response] MIMEType];
+    return [WebView canShowMIMETypeAsHTML:MIMEType];
+}
+
 
 @end
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 3b2db46..15267ba 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -579,7 +579,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
     // FIXME: We could save work and not do this for a top-level view that is not a WebHTMLView.
     WebFrameView *v = _private->webFrameView;
     [_private->bridge createKHTMLViewWithNSView:documentView marginWidth:[v _marginWidth] marginHeight:[v _marginHeight]];
-    [_private->bridge installInFrame:[v scrollView]];
+    [_private->bridge installInFrame:[v _scrollView]];
 
     // Call setDataSource on the document view after it has been placed in the view hierarchy.
     // This what we for the top-level view, so should do this for views in subframes as well.
@@ -800,7 +800,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
         // FIXME: This is OK as long as no one resizes the window,
         // but in the case where someone does, it means garbage outside
         // the occupied part of the scroll view.
-        [[[self frameView] scrollView] setDrawsBackground:NO];
+        [[[self frameView] _scrollView] setDrawsBackground:NO];
 
         // Cache the page, if possible.
         // Don't write to the cache if in the middle of a redirect, since we will want to
@@ -833,7 +833,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
     }
     
     if (_private->state == WebFrameStateComplete) {
-        NSScrollView *sv = [[self frameView] scrollView];
+        NSScrollView *sv = [[self frameView] _scrollView];
         [sv setDrawsBackground:YES];
         // FIXME: This overrides the setCopiesOnScroll setting done by
         // WebCore based on whether the page's contents are dynamic or not.
@@ -925,7 +925,7 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
                 // non-HTML content, or make a call to the document and let it deal with the bridge.
 
                 [self _setState:WebFrameStateComplete];
-                if ([ds isDocumentHTML]) {
+                if ([ds _isDocumentHTML]) {
                     [_private->bridge end];
                 }
 
@@ -939,13 +939,13 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
                 WebDataSource *parentDS = [[self parentFrame] dataSource];
                 if ([[parentDS _bridge] isFrameSet]){
                     WebFrameView *parentWebFrameView = [[self parentFrame] frameView];
-                    if ([parentWebFrameView isDocumentHTML])
+                    if ([parentDS _isDocumentHTML])
                         [(WebHTMLView *)[parentWebFrameView documentView] _adjustFrames];
                 }
 
                 // Tell the just loaded document to layout.  This may be necessary
                 // for non-html content that needs a layout message.
-                if (!([[self frameView] isDocumentHTML])) {
+                if (!([[self dataSource] _isDocumentHTML])) {
                     [thisDocumentView setNeedsLayout:YES];
                     [thisDocumentView layout];
                     [thisDocumentView setNeedsDisplay:YES];
@@ -985,8 +985,6 @@ static CFAbsoluteTime _timeOfLastCompletedLoad;
                                                     didFinishLoadForFrame:self];
                 }
  
-                //if ([ds isDocumentHTML])
-                //    [[ds representation] part]->closeURL();        
                 return;
             }
             // A resource was loaded, but the entire frame isn't complete.  Schedule a
diff --git a/WebKit/WebView.subproj/WebFrameView.h b/WebKit/WebView.subproj/WebFrameView.h
index 982e2af..9893261 100644
--- a/WebKit/WebView.subproj/WebFrameView.h
+++ b/WebKit/WebView.subproj/WebFrameView.h
@@ -30,13 +30,6 @@
 - (WebFrame *)webFrame;
 
 /*!
-    @method frameScrollView
-    @abstract Returns the WebFrameView's scroll view
-    @result The scrolling view used by the WebFrameView to display its document view
-*/
-- (NSScrollView *)scrollView;
-
-/*!
     @method documentView
     @abstract Returns the WebFrameView's document subview
     @result The subview that renders the WebFrameView's contents
@@ -44,13 +37,6 @@
 - (NSView <WebDocumentView> *)documentView;
 
 /*!
-    @method isDocumentHTML
-    @abstract Returns whether the WebFrameView's document view is rendering HTML content
-    @result YES if the document represented in the view is HTML, otherwise NO.
-*/
-- (BOOL)isDocumentHTML;
-
-/*!
     @method setAllowsScrolling:
     @abstract Sets whether the WebFrameView allows its document to be scrolled
     @param flag YES to allow the document to be scrolled, NO to disallow scrolling
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 75f78fb..90f4838 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -77,27 +77,17 @@ enum {
 
 - (void)setAllowsScrolling: (BOOL)flag
 {
-    [(WebDynamicScrollBarsView *)[self scrollView] setAllowsScrolling: flag];
+    [(WebDynamicScrollBarsView *)[self _scrollView] setAllowsScrolling: flag];
 }
 
 - (BOOL)allowsScrolling
 {
-    return [(WebDynamicScrollBarsView *)[self scrollView] allowsScrolling];
+    return [(WebDynamicScrollBarsView *)[self _scrollView] allowsScrolling];
 }
 
-- (NSScrollView *)scrollView
-{
-    return _private->frameScrollView;
-}   
-
 - documentView
 {
-    return [[self scrollView] documentView];
-}
-
-- (BOOL)isDocumentHTML
-{
-    return [[self documentView] isKindOfClass:[WebHTMLView class]];
+    return [[self _scrollView] documentView];
 }
 
 -(BOOL)acceptsFirstResponder
@@ -126,7 +116,7 @@ enum {
         NSRectFill(rect);
     } else {
 #ifndef NDEBUG
-        if ([[self scrollView] drawsBackground]) {
+        if ([[self _scrollView] drawsBackground]) {
             [[NSColor cyanColor] set];
             NSRectFill(rect);
         }
@@ -137,7 +127,7 @@ enum {
 - (void)setFrameSize:(NSSize)size
 {
     if (!NSEqualSizes(size, [self frame].size)) {
-        [[self scrollView] setDrawsBackground:YES];
+        [[self _scrollView] setDrawsBackground:YES];
     }
     [super setFrameSize:size];
 }
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index 1ddf8e6..1add609 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -48,5 +48,8 @@
 - (void)_goForward;
 + (NSMutableDictionary *)_viewTypes;
 + (Class)_viewClassForMIMEType:(NSString *)MIMEType;
++ (BOOL)_canShowMIMETypeAsHTML:(NSString *)MIMEType;
 - (BOOL)_isMainFrame;
+- (NSScrollView *)_scrollView;
+
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index 1ddf8e6..1add609 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -48,5 +48,8 @@
 - (void)_goForward;
 + (NSMutableDictionary *)_viewTypes;
 + (Class)_viewClassForMIMEType:(NSString *)MIMEType;
++ (BOOL)_canShowMIMETypeAsHTML:(NSString *)MIMEType;
 - (BOOL)_isMainFrame;
+- (NSScrollView *)_scrollView;
+
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index de67602..771b4f2 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -67,7 +67,7 @@
 
 - (void)_setDocumentView:(NSView *)view
 {
-    WebDynamicScrollBarsView *sv = (WebDynamicScrollBarsView *)[self scrollView];
+    WebDynamicScrollBarsView *sv = (WebDynamicScrollBarsView *)[self _scrollView];
     
     [sv setSuppressLayout: YES];
     
@@ -98,9 +98,15 @@
     _private->controller = controller;    
 }
 
+- (NSScrollView *)_scrollView
+{
+    return _private->frameScrollView;
+}
+
+
 - (NSClipView *)_contentView
 {
-    return [[self scrollView] contentView];
+    return [[self _scrollView] contentView];
 }
 
 - (void)_scrollVerticallyBy: (float)delta
@@ -122,7 +128,7 @@
     // verticalLineScroll is quite small, to make scrolling from the scroll bar
     // arrows relatively smooth. But this seemed too small for scrolling with
     // the arrow keys, so we bump up the number here. Cheating? Perhaps.
-    return [[self scrollView] verticalLineScroll] * 4;
+    return [[self _scrollView] verticalLineScroll] * 4;
 }
 
 - (float)_horizontalKeyboardScrollAmount
@@ -130,7 +136,7 @@
     // verticalLineScroll is quite small, to make scrolling from the scroll bar
     // arrows relatively smooth. But this seemed too small for scrolling with
     // the arrow keys, so we bump up the number here. Cheating? Perhaps.
-    return [[self scrollView] horizontalLineScroll] * 4;
+    return [[self _scrollView] horizontalLineScroll] * 4;
 }
 
 - (void)_pageVertically:(BOOL)up
@@ -220,7 +226,7 @@
 
 - (void)_scrollToBottomLeft
 {
-    [[self _contentView] scrollPoint: NSMakePoint(0, [[[self scrollView] documentView] bounds].size.height)];
+    [[self _contentView] scrollPoint: NSMakePoint(0, [[[self _scrollView] documentView] bounds].size.height)];
 }
 
 - (void)scrollLineUp:(id)sender
@@ -243,9 +249,10 @@
     [self _scrollLineHorizontally: NO];
 }
 
+static NSMutableDictionary *viewTypes;
+
 + (NSMutableDictionary *)_viewTypesAllowImageTypeOmission:(BOOL)allowImageTypeOmission
 {
-    static NSMutableDictionary *viewTypes;
     static BOOL addedImageTypes;
 
     if (!viewTypes) {
@@ -271,6 +278,12 @@
     return viewTypes;
 }
 
++ (BOOL)_canShowMIMETypeAsHTML:(NSString *)MIMEType
+{
+    return ([viewTypes objectForKey:MIMEType] == [WebHTMLView class]);
+}
+
+
 + (NSMutableDictionary *)_viewTypes
 {
     return [self _viewTypesAllowImageTypeOmission:NO];
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 3bec9d5..f1c6e6e 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -807,7 +807,7 @@
     for (i = 0; i != n; ++i) {
         WebFrame *subframe = [subframes objectAtIndex:i];
         WebFrameView *frameView = [subframe frameView];
-        if ([frameView isDocumentHTML]) {
+        if ([[subframe dataSource] _isDocumentHTML]) {
             [(WebHTMLView *)[frameView documentView] _setPrinting:printing pageWidth:0];
         }
     }
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.m b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
index b819eff..83698ca 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.m
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.m
@@ -353,7 +353,7 @@ static WebHTMLView *lastHitView = nil;
 	// If we are moving out of a view (or frame), let's pretend the mouse moved
 	// all the way out of that view. But we have to account for scrolling, because
 	// khtml doesn't understand our clipping.
-	NSRect visibleRect = [[[[lastHitView _frame] frameView] scrollView] documentVisibleRect];
+	NSRect visibleRect = [[[[lastHitView _frame] frameView] _scrollView] documentVisibleRect];
 	float yScroll = visibleRect.origin.y;
 	float xScroll = visibleRect.origin.x;
 
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index cc40259..55f7880 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -80,6 +80,15 @@ extern NSString *WebElementLinkLabelKey;	// NSString of the text within the anch
 */
 + (BOOL)canShowMIMEType:(NSString *)MIMEType;
 
+
+/*!
+     @method canShowMIMETypeAsHTML:
+     @abstract Checks if the the MIME type is a type that the WebKit will interpret as HTML.
+     @param MIMEType The MIME type to check.
+     @result YES if the MIMEtype in an HTML type.
+*/
++ (BOOL)canShowMIMETypeAsHTML:(NSString *)MIMEType;
+
 /*!
     @method initWithFrame:frameName:groupName:
     @abstract The designated initializer for WebView.
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index df53f3f..6a79fc4 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -81,6 +81,11 @@ NSString *WebElementLinkTitleKey = 		@"WebElementLinkTitle";
     return NO;
 }
 
++ (BOOL)canShowMIMETypeAsHTML:(NSString *)MIMEType
+{
+    return [WebFrameView _canShowMIMETypeAsHTML:MIMEType];
+}
+
 - (void)_commonInitialization: (WebFrameView *)wv frameName:(NSString *)frameName groupName:(NSString *)groupName
 {
     _private = [[WebViewPrivate alloc] init];

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list