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

kenneth at webkit.org kenneth at webkit.org
Wed Dec 22 15:08:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3cbd0462eb2d3f1291754345e6e30214ac23a9a5
Author: kenneth at webkit.org <kenneth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Oct 28 15:49:08 2010 +0000

    2010-10-28  Kenneth Rohde Christiansen  <kenneth at webkit.org>
    
            Reviewed by Andreas Kling.
    
            Make Qt viewportAttributesForSize not assert on (0, 0) size
            https://bugs.webkit.org/show_bug.cgi?id=48524
    
            We now return an invalid (isValid() == false) ViewportAttributes
            instance when the supplied size is (0, 0).
    
            * Api/qwebpage.cpp:
            (QWebPage::viewportAttributesForSize):
    2010-10-28  Kenneth Rohde Christiansen  <kenneth at webkit.org>
    
            Reviewed by Andreas Kling.
    
            Make Qt viewportAttributesForSize not assert on (0, 0) size
            https://bugs.webkit.org/show_bug.cgi?id=48524
    
            We now return an invalid (isValid() == false) ViewportAttributes
            instance when the supplied size is (0, 0).
    
            * UIProcess/API/qt/qwkpage.cpp:
            (QWKPage::viewportAttributesForSize):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70777 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index eabab69..fa672b8 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -2293,6 +2293,9 @@ static QSize queryDeviceSizeForScreenContainingWidget(const QWidget* widget)
     automatically. For testing purposes the size can be overridden by setting two
     environment variables QTWEBKIT_DEVICE_WIDTH and QTWEBKIT_DEVICE_HEIGHT, which
     both needs to be set.
+
+    An invalid instance will be returned in the case an empty size is passed to the
+    method.
 */
 
 QWebPage::ViewportAttributes QWebPage::viewportAttributesForSize(const QSize& availableSize) const
@@ -2302,6 +2305,9 @@ QWebPage::ViewportAttributes QWebPage::viewportAttributesForSize(const QSize& av
 
     ViewportAttributes result;
 
+     if (availableSize.isEmpty())
+         return result; // Returns an invalid instance.
+
     int deviceWidth = getintenv("QTWEBKIT_DEVICE_WIDTH");
     int deviceHeight = getintenv("QTWEBKIT_DEVICE_HEIGHT");
 
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 389f864..657d99c 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-28  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        Make Qt viewportAttributesForSize not assert on (0, 0) size
+        https://bugs.webkit.org/show_bug.cgi?id=48524
+
+        We now return an invalid (isValid() == false) ViewportAttributes
+        instance when the supplied size is (0, 0).
+
+        * Api/qwebpage.cpp:
+        (QWebPage::viewportAttributesForSize):
+
 2010-10-27  Jocelyn Turcotte  <jocelyn.turcotte at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 8ab62ff..75bf394 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-28  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        Make Qt viewportAttributesForSize not assert on (0, 0) size
+        https://bugs.webkit.org/show_bug.cgi?id=48524
+
+        We now return an invalid (isValid() == false) ViewportAttributes
+        instance when the supplied size is (0, 0).
+
+        * UIProcess/API/qt/qwkpage.cpp:
+        (QWKPage::viewportAttributesForSize):
+
 2010-10-28  Balazs Kelemen  <kbalazs at webkit.org>
 
         Reviewed by Andreas Kling.
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index 5f525bf..87f5aad 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -384,6 +384,11 @@ QWKPage::ViewportAttributes QWKPage::viewportAttributesForSize(QSize availableSi
     static int desktopWidth = 980;
     static int deviceDPI = 160;
 
+    ViewportAttributes result;
+
+     if (availableSize.isEmpty())
+         return result; // Returns an invalid instance.
+
     // FIXME: Add a way to get these data via the platform plugin and fall back
     // to the size of the view.
     int deviceWidth = 480;
@@ -391,8 +396,6 @@ QWKPage::ViewportAttributes QWKPage::viewportAttributesForSize(QSize availableSi
 
     WebCore::ViewportAttributes conf = WebCore::computeViewportAttributes(d->viewportArguments, desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize);
 
-    ViewportAttributes result;
-
     result.m_isValid = true;
     result.m_size = conf.layoutSize;
     result.m_initialScaleFactor = conf.initialScale;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list