[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:55:43 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8ebb31c9317aba4aa2ae00326180c3f78a177794
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 8 18:45:28 2003 +0000

            Reviewed by Chris.
    
            - fixed 3412726 -- some HTML messages in Mail lose a line at page breaks when printed (multipart/alternative)
    
            * WebView.subproj/WebHTMLView.m: (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
            Go into printing mode when asked to adjust page height, if not already in it.
            We already have code in drawRect that does this when actually printing, but it's
            also important to lay out the same way when deciding where to break pages, otherwise
            the difference between printer and screen fonts can lead to page breaks that split a line
            of text across two pages, and that can lead to missing lines of text as well.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4953 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 666cc3f..1c70e5e 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,16 @@
+2003-09-08  Darin Adler  <darin at apple.com>
+
+        Reviewed by Chris.
+
+        - fixed 3412726 -- some HTML messages in Mail lose a line at page breaks when printed (multipart/alternative)
+
+        * WebView.subproj/WebHTMLView.m: (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
+        Go into printing mode when asked to adjust page height, if not already in it.
+        We already have code in drawRect that does this when actually printing, but it's
+        also important to lay out the same way when deciding where to break pages, otherwise
+        the difference between printer and screen fonts can lead to page breaks that split a line
+        of text across two pages, and that can lead to missing lines of text as well.
+
 2003-09-07  Darin Adler  <darin at apple.com>
 
         Reviewed by Maciej.
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 14781be..f3e560c 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -900,7 +900,18 @@
 
 - (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit
 {
+    // This helps when we print as part of a larger print process.
+    // If the WebHTMLView itself is what we're printing, then we will never have to do this.
+    BOOL wasInPrintingMode = _private->printing;
+    if (!wasInPrintingMode) {
+        [self _setPrinting:YES pageWidth:0 adjustViewSize:NO];
+    }
+    
     [[self _bridge] adjustPageHeightNew:newBottom top:oldTop bottom:oldBottom limit:bottomLimit];
+
+    if (!wasInPrintingMode) {
+        [self _setPrinting:NO pageWidth:0 adjustViewSize:NO];
+    }
 }
 
 - (void)beginDocument

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list