[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

mitz at apple.com mitz at apple.com
Wed Dec 22 13:58:00 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3c28639413881a2ff1e6062934833ff39e940250
Author: mitz at apple.com <mitz at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 30 17:16:32 2010 +0000

    Add printing SPI allowing full control over shrink-to-fit
    https://bugs.webkit.org/show_bug.cgi?id=46877
    
    Reviewed by John Sullivan.
    
    * WebView/WebHTMLView.mm:
    (-[WebHTMLView _beginPrintModeWithMinimumPageWidth:height:maximumPageWidth:]): Added.
    * WebView/WebHTMLViewPrivate.h:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68796 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index d707720..580b3e9 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,14 @@
+2010-09-30  Dan Bernstein  <mitz at apple.com>
+
+        Reviewed by John Sullivan.
+
+        Add printing SPI allowing full control over shrink-to-fit
+        https://bugs.webkit.org/show_bug.cgi?id=46877
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _beginPrintModeWithMinimumPageWidth:height:maximumPageWidth:]): Added.
+        * WebView/WebHTMLViewPrivate.h:
+
 2010-09-28  Johnny Ding  <jnd at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 02d32d9..0456c2e 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -2232,6 +2232,22 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
     return _private->printing;
 }
 
+- (BOOL)_beginPrintModeWithMinimumPageWidth:(CGFloat)minimumPageWidth height:(CGFloat)minimumPageHeight maximumPageWidth:(CGFloat)maximumPageWidth
+{
+    Frame* frame = core([self _frame]);
+    if (!frame)
+        return NO;
+
+    if (frame->document() && frame->document()->isFrameSet()) {
+        minimumPageWidth = 0;
+        minimumPageHeight = 0;
+        maximumPageWidth = 0;
+    }
+
+    [self _setPrinting:YES minimumPageWidth:minimumPageWidth height:minimumPageHeight maximumPageWidth:maximumPageWidth adjustViewSize:YES paginateScreenContent:[self _isInScreenPaginationMode]];
+    return YES;
+}
+
 - (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit
 {
     Frame* frame = core([self _frame]);
diff --git a/WebKit/mac/WebView/WebHTMLViewPrivate.h b/WebKit/mac/WebView/WebHTMLViewPrivate.h
index e1d15dc..1218efc 100644
--- a/WebKit/mac/WebView/WebHTMLViewPrivate.h
+++ b/WebKit/mac/WebView/WebHTMLViewPrivate.h
@@ -136,6 +136,9 @@ extern const float _WebHTMLViewPrintingMaximumShrinkFactor;
 - (WebCGFloat)_adjustedBottomOfPageWithTop:(WebCGFloat)top bottom:(WebCGFloat)bottom limit:(WebCGFloat)bottomLimit;
 - (BOOL)_isInPrintMode;
 - (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit;
+// Lays out to pages of the given minimum width and height or more (increasing both dimensions proportionally)
+// as needed for the content to fit, but no more than the given maximum width.
+- (BOOL)_beginPrintModeWithMinimumPageWidth:(WebCGFloat)minimumPageWidth height:(WebCGFloat)minimumPageHeight maximumPageWidth:(WebCGFloat)maximumPageWidth;
 - (void)_endPrintMode;
 
 - (BOOL)_isInScreenPaginationMode;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list