[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:31:02 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 3f7ee8529d27ec84d40b569c413ee60636e36efd
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 26 21:49:35 2004 +0000

    WebKit:
    
            - fixed <rdar://problem/3576334>: Printing "empty" page gives print error,
            leaves browser window UI broken
    
            Reviewed by Dave.
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView knowsPageRange:]):
            AppKit printing mechanism can't handle the case where you tell it there is
            nothing at all to print, so when we hit that case we give it a degenerate
            1-pixel rect to print. This prints a blank page (with correctly-placed
            header & footer if so configured), which matches other browsers' behavior for
            this page.
    
            * Plugins.subproj/npruntime.h:
            cvs keeps thinking I've removed a blank line from this auto-copied file.
            Richard said to just check it in to see if it stops doing this.
    
    WebBrowser:
    
            fixed <rdar://problem/3603092>: "new folder" menu item is enabled but
            does nothing when current collection is history
    
            Reviewed by Dave.
    
            * BookmarksViewController.m:
            (-[BookmarksViewController newBookmarkFolder:]):
            If displayed contents can't accept new items, make a new collection
            even if outline view is focused.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6265 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 639b32a..d51754a 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,22 @@
+2004-03-26  John Sullivan  <sullivan at apple.com>
+
+        - fixed <rdar://problem/3576334>: Printing "empty" page gives print error, 
+        leaves browser window UI broken
+
+        Reviewed by Dave.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView knowsPageRange:]):
+        AppKit printing mechanism can't handle the case where you tell it there is
+        nothing at all to print, so when we hit that case we give it a degenerate
+        1-pixel rect to print. This prints a blank page (with correctly-placed
+        header & footer if so configured), which matches other browsers' behavior for
+        this page.
+
+        * Plugins.subproj/npruntime.h:
+        cvs keeps thinking I've removed a blank line from this auto-copied file.
+        Richard said to just check it in to see if it stops doing this.
+        
 === Safari-134 ===
 
 2004-03-26  John Sullivan  <sullivan at apple.com>
diff --git a/WebKit/Plugins.subproj/npruntime.h b/WebKit/Plugins.subproj/npruntime.h
index 3420171..abf0103 100644
--- a/WebKit/Plugins.subproj/npruntime.h
+++ b/WebKit/Plugins.subproj/npruntime.h
@@ -48,7 +48,6 @@
 extern "C" {
 #endif
 
-
 /*
     This API is used to facilitate binding code written in 'C' to JavaScript
     objects.  In particular it is used to support the extended Netscape 
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 7c795fc..bbb127e 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -1870,9 +1870,19 @@ static WebHTMLView *lastHitView = nil;
     float totalScaleFactor = [self _scaleFactorForPrintOperation:printOperation];
     float userScaleFactor = [printOperation _web_pageSetupScaleFactor];
     [_private->pageRects release];
-    _private->pageRects = [[[self _bridge] computePageRectsWithPrintWidthScaleFactor:userScaleFactor
-                                                                         printHeight:[self _calculatePrintHeight]/totalScaleFactor] retain];
+    NSArray *newPageRects = [[self _bridge] computePageRectsWithPrintWidthScaleFactor:userScaleFactor
+                                                                          printHeight:[self _calculatePrintHeight]/totalScaleFactor];
+    // AppKit gets all messed up if you give it a zero-length page count (see 3576334), so if we
+    // hit that case we'll pass along a degenerate 1 pixel square to print. This will print
+    // a blank page (with correct-looking header and footer if that option is on), which matches
+    // the behavior of IE and Camino at least.
+    if ([newPageRects count] == 0) {
+        newPageRects = [NSArray arrayWithObject:[NSValue valueWithRect: NSMakeRect(0, 0, 1, 1)]];
+    }
+    _private->pageRects = [newPageRects retain];
+    
     range->length = [_private->pageRects count];
+    
     return YES;
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list