Changeset 147552 in webkit


Ignore:
Timestamp:
Apr 3, 2013 7:36:00 AM (11 years ago)
Author:
anilsson@rim.com
Message:

[BlackBerry] Remove defaultViewportArguments check from call site of recomputeVirtualViewportFromViewportArguments
https://bugs.webkit.org/show_bug.cgi?id=113872

Reviewed by Carlos Garcia Campos.

Carlos pointed out that recomputeVirtualViewportFromViewportArguments
already contains the check, and returns an empty IntSize if it fails.
So pick up on that to make the code a bit more DRY.

  • Api/WebPage.cpp:

(BlackBerry::WebKit::WebPagePrivate::setViewportSize):

Location:
trunk/Source/WebKit/blackberry
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/WebPage.cpp

    r147537 r147552  
    36833683    // Recompute our virtual viewport.
    36843684    bool needsLayout = false;
    3685     static ViewportArguments defaultViewportArguments;
    3686     if (m_viewportArguments != defaultViewportArguments) {
    3687         // We may need to infer the width and height for the viewport with respect to the rotation.
    3688         Platform::IntSize newVirtualViewport = recomputeVirtualViewportFromViewportArguments();
    3689         ASSERT(!newVirtualViewport.isEmpty());
     3685    Platform::IntSize newVirtualViewport = recomputeVirtualViewportFromViewportArguments();
     3686    if (!newVirtualViewport.isEmpty()) {
    36903687        m_webPage->setVirtualViewportSize(newVirtualViewport);
    36913688        m_mainFrame->view()->setUseFixedLayout(useFixedLayout());
  • trunk/Source/WebKit/blackberry/ChangeLog

    r147537 r147552  
     12013-04-03  Arvid Nilsson  <anilsson@rim.com>
     2
     3        [BlackBerry] Remove defaultViewportArguments check from call site of recomputeVirtualViewportFromViewportArguments
     4        https://bugs.webkit.org/show_bug.cgi?id=113872
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        Carlos pointed out that recomputeVirtualViewportFromViewportArguments
     9        already contains the check, and returns an empty IntSize if it fails.
     10        So pick up on that to make the code a bit more DRY.
     11
     12        * Api/WebPage.cpp:
     13        (BlackBerry::WebKit::WebPagePrivate::setViewportSize):
     14
    1152013-04-03  Arvid Nilsson  <anilsson@rim.com>
    216
Note: See TracChangeset for help on using the changeset viewer.