From 9c3246fc700f45c3ddf498b218d0c3a1ec97bf84 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E2=80=9Cprabhavathi=E2=80=9D?= <“prabha.p@samsung.com”> Date: Mon, 25 Mar 2013 10:53:34 +0530 Subject: [PATCH] [WK2] Fix for white screen on device-orientation change [Title] Fix for white screen on device-orientation change [issue#] N_SE-26272 [Problem] Width and height is not updated in webprocess, when JS querying for it [Solution] Setting the width and height on view port attributes change [Developer] prabha.p Change-Id: I141cf5501d5afa4580d09407f16da04e4ca27566 --- Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp index 1e978b1..f0ee7fd 100755 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp @@ -1072,15 +1072,10 @@ void WebPage::sendViewportAttributesChanged() // On WebProcess, JS runs before visible content rect is updated by UIProcess // In this case, JS returns incorrect inner size value because scale factor is not updated yet // So, we update fixed visible content rect at here. - // Fixed visible content rect should be updated for new page only - // mainFrameView()->didFirstLayout() checks it's new page or not - // ref 1. https://bugs.webkit.org/show_bug.cgi?id=105627 - // ref 2. https://bugs.webkit.org/show_bug.cgi?id=103737 - if (!mainFrameView()->didFirstLayout()) { - FloatSize contentFixedSize = m_viewportSize; - contentFixedSize.scale(1 / (attr.initialScale * attr.devicePixelRatio)); - mainFrameView()->setFixedVisibleContentRect(IntRect(mainFrameView()->scrollPosition(), roundedIntSize(contentFixedSize))); - } + // FIXME: scale factor needs to be calculated and set fixed visible content rect + FloatSize contentFixedSize = m_viewportSize; + contentFixedSize.scale(1 / (attr.initialScale * attr.devicePixelRatio)); + mainFrameView()->setFixedVisibleContentRect(IntRect(mainFrameView()->scrollPosition(), roundedIntSize(contentFixedSize))); // If viewport meta tag is not defined or initial scale factor is not defined, // initial scale factor can be defined by "Default View" setting of UIProcess. -- 2.7.4