Changeset 70777 in webkit


Ignore:
Timestamp:
Oct 28, 2010 8:49:08 AM (14 years ago)
Author:
kenneth@webkit.org
Message:

2010-10-28 Kenneth Rohde Christiansen <kenneth@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@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):
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/Api/qwebpage.cpp

    r70487 r70777  
    22942294    environment variables QTWEBKIT_DEVICE_WIDTH and QTWEBKIT_DEVICE_HEIGHT, which
    22952295    both needs to be set.
     2296
     2297    An invalid instance will be returned in the case an empty size is passed to the
     2298    method.
    22962299*/
    22972300
     
    23022305
    23032306    ViewportAttributes result;
     2307
     2308     if (availableSize.isEmpty())
     2309         return result; // Returns an invalid instance.
    23042310
    23052311    int deviceWidth = getintenv("QTWEBKIT_DEVICE_WIDTH");
  • trunk/WebKit/qt/ChangeLog

    r70690 r70777  
     12010-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Make Qt viewportAttributesForSize not assert on (0, 0) size
     6        https://bugs.webkit.org/show_bug.cgi?id=48524
     7
     8        We now return an invalid (isValid() == false) ViewportAttributes
     9        instance when the supplied size is (0, 0).
     10
     11        * Api/qwebpage.cpp:
     12        (QWebPage::viewportAttributesForSize):
     13
    1142010-10-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
    215
  • trunk/WebKit2/ChangeLog

    r70776 r70777  
     12010-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
     2
     3        Reviewed by Andreas Kling.
     4
     5        Make Qt viewportAttributesForSize not assert on (0, 0) size
     6        https://bugs.webkit.org/show_bug.cgi?id=48524
     7
     8        We now return an invalid (isValid() == false) ViewportAttributes
     9        instance when the supplied size is (0, 0).
     10
     11        * UIProcess/API/qt/qwkpage.cpp:
     12        (QWKPage::viewportAttributesForSize):
     13
    1142010-10-28  Balazs Kelemen  <kbalazs@webkit.org>
    215
  • trunk/WebKit2/UIProcess/API/qt/qwkpage.cpp

    r70734 r70777  
    385385    static int deviceDPI = 160;
    386386
     387    ViewportAttributes result;
     388
     389     if (availableSize.isEmpty())
     390         return result; // Returns an invalid instance.
     391
    387392    // FIXME: Add a way to get these data via the platform plugin and fall back
    388393    // to the size of the view.
     
    391396
    392397    WebCore::ViewportAttributes conf = WebCore::computeViewportAttributes(d->viewportArguments, desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize);
    393 
    394     ViewportAttributes result;
    395398
    396399    result.m_isValid = true;
Note: See TracChangeset for help on using the changeset viewer.