[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:33:41 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit a05c4027d4d5c36fc027121a3f25cc7cd29678da
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 12 13:52:50 2009 +0000

    2009-11-12  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Custom printing shrink factors
            https://bugs.webkit.org/show_bug.cgi?id=29042
    
            This reverts commit r49769. The public API for this needs to be reviewed
            before its inclusion in Qt.
    
            * page/PrintContext.cpp:
            (WebCore::PrintContext::begin):
            * page/Settings.cpp:
            (WebCore::Settings::Settings):
            * page/Settings.h:
    2009-11-12  Benjamin Poulain  <benjamin.poulain at nokia.com>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Custom printing shrink factors
            https://bugs.webkit.org/show_bug.cgi?id=29042
    
            This reverts commit r49769. The public API for this needs to be reviewed
            before its inclusion in Qt.
    
            * Api/qwebsettings.cpp:
            (QWebSettingsPrivate::apply):
            (QWebSettings::QWebSettings):
            * Api/qwebsettings.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50876 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 2693e8e..9f30428 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-12  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Custom printing shrink factors
+        https://bugs.webkit.org/show_bug.cgi?id=29042
+
+        This reverts commit r49769. The public API for this needs to be reviewed
+        before its inclusion in Qt.
+
+        * page/PrintContext.cpp:
+        (WebCore::PrintContext::begin):
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+        * page/Settings.h:
+
 2009-11-12  Alexander Pavlov  <apavlov at chromium.org>
 
         Reviewed by Pavel Feldman.
diff --git a/WebCore/page/PrintContext.cpp b/WebCore/page/PrintContext.cpp
index bba678a..4d3a839 100644
--- a/WebCore/page/PrintContext.cpp
+++ b/WebCore/page/PrintContext.cpp
@@ -25,7 +25,6 @@
 #include "Frame.h"
 #include "FrameView.h"
 #include "RenderView.h"
-#include "Settings.h"
 
 using namespace WebCore;
 
@@ -96,23 +95,18 @@ void PrintContext::computePageRects(const FloatRect& printRect, float headerHeig
 
 void PrintContext::begin(float width)
 {
-    float PrintingMinimumShrinkFactor = m_frame->settings() ? m_frame->settings()->printingMinimumShrinkFactor() : 0.0f;
-    float PrintingMaximumShrinkFactor = m_frame->settings() ? m_frame->settings()->printingMaximumShrinkFactor() : 0.0f;
-
-    if (PrintingMaximumShrinkFactor < PrintingMinimumShrinkFactor || PrintingMinimumShrinkFactor <= 0.0f) {
-        // By imaging to a width a little wider than the available pixels,
-        // thin pages will be scaled down a little, matching the way they
-        // print in IE and Camino. This lets them use fewer sheets than they
-        // would otherwise, which is presumably why other browsers do this.
-        // Wide pages will be scaled down more than this.
-        PrintingMinimumShrinkFactor = 1.25f;
-
-        // This number determines how small we are willing to reduce the page content
-        // in order to accommodate the widest line. If the page would have to be
-        // reduced smaller to make the widest line fit, we just clip instead (this
-        // behavior matches MacIE and Mozilla, at least)
-        PrintingMaximumShrinkFactor = 2.0f;
-    }
+    // By imaging to a width a little wider than the available pixels,
+    // thin pages will be scaled down a little, matching the way they
+    // print in IE and Camino. This lets them use fewer sheets than they
+    // would otherwise, which is presumably why other browsers do this.
+    // Wide pages will be scaled down more than this.
+    const float PrintingMinimumShrinkFactor = 1.25f;
+
+    // This number determines how small we are willing to reduce the page content
+    // in order to accommodate the widest line. If the page would have to be
+    // reduced smaller to make the widest line fit, we just clip instead (this
+    // behavior matches MacIE and Mozilla, at least)
+    const float PrintingMaximumShrinkFactor = 2.0f;
 
     float minLayoutWidth = width * PrintingMinimumShrinkFactor;
     float maxLayoutWidth = width * PrintingMaximumShrinkFactor;
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index c57c56d..c3cc6a2 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -63,8 +63,6 @@ Settings::Settings(Page* page)
     , m_maximumDecodedImageSize(numeric_limits<size_t>::max())
     , m_localStorageQuota(5 * 1024 * 1024)  // Suggested by the HTML5 spec.
     , m_pluginAllowedRunTime(numeric_limits<unsigned>::max())
-    , m_printingMinimumShrinkFactor(0.0f)
-    , m_printingMaximumShrinkFactor(0.0f)
     , m_isJavaEnabled(false)
     , m_loadsImagesAutomatically(false)
     , m_privateBrowsingEnabled(false)
@@ -525,14 +523,4 @@ void Settings::setWebGLEnabled(bool enabled)
     m_webGLEnabled = enabled;
 }
 
-void Settings::setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor)
-{
-    m_printingMinimumShrinkFactor = printingMinimumShrinkFactor;
-}    
-
-void Settings::setPrintingMaximumShrinkFactor(float printingMaximumShrinkFactor)
-{
-    m_printingMaximumShrinkFactor = printingMaximumShrinkFactor;
-}    
-
 } // namespace WebCore
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index 9cb4362..a215a3e 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -267,12 +267,6 @@ namespace WebCore {
         void setWebGLEnabled(bool);
         bool webGLEnabled() const { return m_webGLEnabled; }
 
-        void setPrintingMinimumShrinkFactor(float);
-        float printingMinimumShrinkFactor() const { return m_printingMinimumShrinkFactor; }
-
-        void setPrintingMaximumShrinkFactor(float);
-        float printingMaximumShrinkFactor() const { return m_printingMaximumShrinkFactor; }
-
     private:
         Page* m_page;
         
@@ -295,8 +289,6 @@ namespace WebCore {
         size_t m_maximumDecodedImageSize;
         unsigned m_localStorageQuota;
         unsigned m_pluginAllowedRunTime;
-        float m_printingMinimumShrinkFactor;
-        float m_printingMaximumShrinkFactor;
         bool m_isJavaEnabled : 1;
         bool m_loadsImagesAutomatically : 1;
         bool m_privateBrowsingEnabled : 1;
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index ff86e1f..490fe92 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -62,8 +62,6 @@ public:
     QString localStoragePath;
     QString offlineWebApplicationCachePath;
     qint64 offlineStorageDefaultQuota;
-    float printingMinimumShrinkFactor;
-    float printingMaximumShrinkFactor;
 
     void apply();
     WebCore::Settings* settings;
@@ -176,12 +174,6 @@ void QWebSettingsPrivate::apply()
         QString storagePath = !localStoragePath.isEmpty() ? localStoragePath : global->localStoragePath;
         settings->setLocalStorageDatabasePath(storagePath);
 
-        float minimumShrinkFactor = printingMinimumShrinkFactor > 0.0f ? printingMinimumShrinkFactor : global->printingMinimumShrinkFactor;
-        settings->setPrintingMinimumShrinkFactor(minimumShrinkFactor);
-
-        float maximumShrinkFactor = printingMaximumShrinkFactor > 0.0f ? printingMaximumShrinkFactor : global->printingMaximumShrinkFactor;
-        settings->setPrintingMaximumShrinkFactor(maximumShrinkFactor);
-
         value = attributes.value(QWebSettings::ZoomTextOnly,
                                  global->attributes.value(QWebSettings::ZoomTextOnly));
         settings->setZoomsTextOnly(value);
@@ -379,8 +371,6 @@ QWebSettings::QWebSettings()
     d->attributes.insert(QWebSettings::LocalContentCanAccessRemoteUrls, false);
     d->offlineStorageDefaultQuota = 5 * 1024 * 1024;
     d->defaultTextEncoding = QLatin1String("iso-8859-1");
-    d->printingMinimumShrinkFactor = 0.0f;
-    d->printingMaximumShrinkFactor = 0.0f;
 }
 
 /*!
@@ -495,60 +485,6 @@ QString QWebSettings::defaultTextEncoding() const
 }
 
 /*!
-    \since 4.7 
-    Specifies minimum shrink fator allowed for printing. If set to 0 a
-    default value is used.
-
-    When printing, content will be shrunk to reduce page usage, it
-    will reduced by a factor between printingMinimumShrinkFactor and
-    printingMaximumShrinkFactor. 
-
-    \sa printingMinimumShrinkFactor()
-    \sa setPrintingMaximumShrinkFactor()
-    \sa printingMaximumShrinkFactor()
-*/
-void QWebSettings::setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor)
-{
-    d->printingMinimumShrinkFactor = printingMinimumShrinkFactor;
-    d->apply();
-}
-
-/*!
-    \since 4.7 
-    returns the minimum shrink factor used for printing.
-
-    \sa setPrintingMinimumShrinkFactor()
-*/
-float QWebSettings::printingMinimumShrinkFactor() const
-{
-    return d->printingMinimumShrinkFactor;
-}
-
-/*!
-    \since 4.7 
-    Specifies maximum shrink fator allowed for printing. If set to 0 a
-    default value is used.
-
-    \sa setPrintingMinimumShrinkFactor()
-*/
-void QWebSettings::setPrintingMaximumShrinkFactor(float printingMaximumShrinkFactor)
-{
-    d->printingMaximumShrinkFactor = printingMaximumShrinkFactor;
-    d->apply();
-}
-
-/*!
-    \since 4.7 
-    returns the maximum shrink factor used for printing.
-
-    \sa setPrintingMinimumShrinkFactor()
-*/
-float QWebSettings::printingMaximumShrinkFactor() const
-{
-    return d->printingMaximumShrinkFactor;
-}
-
-/*!
     Sets the path of the icon database to \a path. The icon database is used
     to store "favicons" associated with web sites.
 
diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h
index 3b6d1a7..50cf424 100644
--- a/WebKit/qt/Api/qwebsettings.h
+++ b/WebKit/qt/Api/qwebsettings.h
@@ -102,12 +102,6 @@ public:
     void setDefaultTextEncoding(const QString &encoding);
     QString defaultTextEncoding() const;
 
-    void setPrintingMinimumShrinkFactor(float printingMinimumShrinkFactor);
-    float printingMinimumShrinkFactor() const;
-
-    void setPrintingMaximumShrinkFactor(float printingMaximimShrinkFactor);
-    float printingMaximumShrinkFactor() const;
-
     static void setIconDatabasePath(const QString &location);
     static QString iconDatabasePath();
     static void clearIconDatabase();
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index bd8c4ad..bb70fb3 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,18 @@
+2009-11-12  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Custom printing shrink factors
+        https://bugs.webkit.org/show_bug.cgi?id=29042
+
+        This reverts commit r49769. The public API for this needs to be reviewed
+        before its inclusion in Qt.
+
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply):
+        (QWebSettings::QWebSettings):
+        * Api/qwebsettings.h:
+
 2009-11-11  Antonio Gomes  <tonikitoo at webkit.org>
 
         Reviewed by Kenneth Christiansen.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list