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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:17:30 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 7570c92ec795d338ac3587607e56192db8df11dc
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 28 18:33:08 2002 +0000

            Reviewed by Don.
    
    	- fixed 3136206 -- Can't display images in Ambrosia Software image viewer
    
    	WebKit wasn't creating the frames correctly when they weren't HTML.
    
            * WebView.subproj/WebFramePrivate.m: (-[WebFrame _makeDocumentView]): Added. Calls the
    	WebView to make the document view and then installs the new view, as WebHTMLView used to do.
            (-[WebFrame _transitionToCommitted:]): Call _makeDocumentView instead of calling WebView
    	directly. These are all the calls to _makeDocumentViewForDataSource:.
    
            * WebView.subproj/WebViewPrivate.h: Add return value to _makeDocumentViewForDataSource:.
            * WebView.subproj/WebViewPrivate.m: (-[WebView _makeDocumentViewForDataSource:]):
    	Return the newly-created view.
    
            * WebView.subproj/WebHTMLView.m: (-[WebHTMLView setDataSource:]): Removed the code here
    	since it's done by WebFrame now.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3191 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 1d92e82..d6e595b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,23 @@
+2002-12-27  Darin Adler  <darin at apple.com>
+
+        Reviewed by Don.
+
+	- fixed 3136206 -- Can't display images in Ambrosia Software image viewer
+
+	WebKit wasn't creating the frames correctly when they weren't HTML.
+
+        * WebView.subproj/WebFramePrivate.m: (-[WebFrame _makeDocumentView]): Added. Calls the
+	WebView to make the document view and then installs the new view, as WebHTMLView used to do.
+        (-[WebFrame _transitionToCommitted:]): Call _makeDocumentView instead of calling WebView
+	directly. These are all the calls to _makeDocumentViewForDataSource:.
+
+        * WebView.subproj/WebViewPrivate.h: Add return value to _makeDocumentViewForDataSource:.
+        * WebView.subproj/WebViewPrivate.m: (-[WebView _makeDocumentViewForDataSource:]):
+	Return the newly-created view.
+
+        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView setDataSource:]): Removed the code here
+	since it's done by WebFrame now.
+
 2002-12-25  Darin Adler  <darin at apple.com>
 
         Reviewed by Don.
diff --git a/WebKit/WebView.subproj/WebFramePrivate.m b/WebKit/WebView.subproj/WebFramePrivate.m
index 9b004ab..9b67229 100644
--- a/WebKit/WebView.subproj/WebFramePrivate.m
+++ b/WebKit/WebView.subproj/WebFramePrivate.m
@@ -488,6 +488,19 @@ Repeat load of the same URL (by any other means of navigation other than the rel
     }
 }
 
+- (void)_makeDocumentView
+{
+    id <WebDocumentView> documentView = [_private->webView _makeDocumentViewForDataSource:_private->dataSource];
+    if (!documentView) {
+        return;
+    }
+
+    // FIXME: We could save work and not do this for a top-level view that is not a WebHTMLView.
+    [_private->bridge createKHTMLViewWithNSView:documentView
+        marginWidth:[_private->webView _marginWidth]
+        marginHeight:[_private->webView _marginHeight]];
+    [_private->bridge installInFrame:[_private->webView frameScrollView]];
+}
 
 - (void)_transitionToCommitted: (NSDictionary *)pageCache
 {
@@ -541,7 +554,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
                         [[self webView] _setDocumentView: cachedView];
                     }
                     else
-                        [[self webView] _makeDocumentViewForDataSource:ds];
+                        [self _makeDocumentView];
                         
                     // FIXME - I'm not sure this call does anything.  Should be dealt with as
                     // part of 3024377
@@ -559,7 +572,7 @@ Repeat load of the same URL (by any other means of navigation other than the rel
                 if (loadType == WebFrameLoadTypeReload) {
                     [self _saveScrollPositionToItem:currItem];
                 }
-                [[self webView] _makeDocumentViewForDataSource:ds];
+                [self _makeDocumentView];
                 break;
             }
 
@@ -578,23 +591,20 @@ Repeat load of the same URL (by any other means of navigation other than the rel
                     // update the URL in the BF list that we made before the redirect
                     [[_private currentItem] setURL:[[ds request] URL]];
                 }
-                [[self webView] _makeDocumentViewForDataSource:ds];
+                [self _makeDocumentView];
                 break;
                 
             case WebFrameLoadTypeInternal:
-                {  // braces because the silly compiler lets you declare vars everywhere but here?!
                 // Add an item to the item tree for this frame
                 ASSERT(![ds _isClientRedirect]);
-                WebHistoryItem *item = [self _createItem];
                 ASSERT([[self parent]->_private currentItem]);
-                [[[self parent]->_private currentItem] addChildItem:item];
-                [[self webView] _makeDocumentViewForDataSource:ds];
-                }
+                [[[self parent]->_private currentItem] addChildItem:[self _createItem]];
+                [self _makeDocumentView];
                 break;
 
             // FIXME - just get rid of this case, and merge WebFrameLoadTypeReloadAllowingStaleData with one of the other reload types
             case WebFrameLoadTypeReloadAllowingStaleData:
-                [[self webView] _makeDocumentViewForDataSource:ds];
+                [self _makeDocumentView];
                 break;
                 
             // FIXME Remove this check when dummy ds is removed.  An exception should be thrown
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index 1b0b8d5..ccfa2e2 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -29,7 +29,7 @@
 
 @interface WebView (WebPrivate)
 - (void)_setDocumentView:(id <WebDocumentView>)view;
-- (void)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
+- (id <WebDocumentView>)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
 - (void)_setController:(WebController *)controller;
 - (int)_marginWidth;
 - (int)_marginHeight;
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index 1b0b8d5..ccfa2e2 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -29,7 +29,7 @@
 
 @interface WebView (WebPrivate)
 - (void)_setDocumentView:(id <WebDocumentView>)view;
-- (void)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
+- (id <WebDocumentView>)_makeDocumentViewForDataSource:(WebDataSource *)dataSource;
 - (void)_setController:(WebController *)controller;
 - (int)_marginWidth;
 - (int)_marginHeight;
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 83de588..e12a493 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -69,14 +69,16 @@
     [[self frameScrollView] setDocumentView: view];    
 }
 
--(void)_makeDocumentViewForDataSource:(WebDataSource *)dataSource
+-(id <WebDocumentView>)_makeDocumentViewForDataSource:(WebDataSource *)dataSource
 {
     Class viewClass = [[[self class] _viewTypes] _web_objectForMIMEType:[[dataSource response] contentType]];
-    id documentView = viewClass ? [[viewClass alloc] init] : nil;
-    [self _setDocumentView:(id<WebDocumentView>)documentView];
+    id <WebDocumentView> documentView = viewClass ? [[viewClass alloc] init] : nil;
+    [self _setDocumentView:documentView];
     [documentView release];
 
-    [[self documentView] setDataSource:dataSource];
+    [documentView setDataSource:dataSource];
+    
+    return documentView;
 }
 
 - (void)_setController: (WebController *)controller
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 5a8ed5e..73b55c8 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -937,11 +937,6 @@
 //------------------------------------------------------------------------------------
 - (void)setDataSource:(WebDataSource *)dataSource 
 {
-    [[dataSource _bridge]
-        createKHTMLViewWithNSView:self
-        marginWidth:[[[dataSource webFrame] webView] _marginWidth]
-        marginHeight:[[[dataSource webFrame] webView] _marginHeight]];
-    [[self _bridge] installInFrame:[[self _web_parentWebView] frameScrollView]];
 }
 
 - (void)dataSourceUpdated:(WebDataSource *)dataSource

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list