Commit 6bbd2b1e authored by anilsson@rim.com's avatar anilsson@rim.com
Browse files

[BlackBerry] Remove defaultViewportArguments check from call site of...

[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):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 55e99a5b
......@@ -3682,11 +3682,8 @@ bool WebPagePrivate::setViewportSize(const IntSize& transformedActualVisibleSize
// Recompute our virtual viewport.
bool needsLayout = false;
static ViewportArguments defaultViewportArguments;
if (m_viewportArguments != defaultViewportArguments) {
// We may need to infer the width and height for the viewport with respect to the rotation.
Platform::IntSize newVirtualViewport = recomputeVirtualViewportFromViewportArguments();
ASSERT(!newVirtualViewport.isEmpty());
Platform::IntSize newVirtualViewport = recomputeVirtualViewportFromViewportArguments();
if (!newVirtualViewport.isEmpty()) {
m_webPage->setVirtualViewportSize(newVirtualViewport);
m_mainFrame->view()->setUseFixedLayout(useFixedLayout());
m_mainFrame->view()->setFixedLayoutSize(fixedLayoutSize());
......
2013-04-03 Arvid Nilsson <anilsson@rim.com>
[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):
2013-04-03 Arvid Nilsson <anilsson@rim.com>
 
[BlackBerry] Decouple layout viewport from visual viewport
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment