From c5fb7170d3cde54ad20558641aceea5260dea280 Mon Sep 17 00:00:00 2001 From: Ryuan Choi Date: Mon, 26 Aug 2013 16:21:36 +0900 Subject: [PATCH] Device aspect ratio is changed as opposite direction [Title] Device aspect ratio is changed as opposite direction [Issue#] N/A [Problem] When rotated to landscape, portait value is shown. [Cause] We should layout after changed orientation value. If not ,layout() uses wrong orientation value while checking whether media query was changed or not. [Solution] Moved sendOrientationEvent related change. Change-Id: I7e9cd40d9c3667165c4e620286ca51a0fbf20ed0 --- Source/WebKit2/WebProcess/WebPage/WebPage.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp index 86586e5..816eb2c 100755 --- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp +++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp @@ -1133,6 +1133,20 @@ void WebPage::sendViewportAttributesChanged() attr.initialScale = ViewportArguments::ValueAuto; #endif +#if ENABLE(TIZEN_ORIENTATION_EVENTS) + if (m_mainFrame->coreFrame() && m_newOrientation != -1) { + m_mainFrame->coreFrame()->sendOrientationChangeEvent(m_newOrientation); + for (WebCore::Frame* child = m_mainFrame->coreFrame()->tree()->firstChild(); child; child = child->tree()->nextSibling()) + child->sendOrientationChangeEvent(m_newOrientation); + m_newOrientation = -1; + +#if ENABLE(TIZEN_USE_XWINDOW_FOR_FULLSCREEN_VIDEO) + if (fullScreenManager()->isUsingXWindowForVideo()) + fullScreenManager()->didRotateScreen(); +#endif + } +#endif + setResizesToContentsUsingLayoutSize(IntSize(static_cast(attr.layoutSize.width()), static_cast(attr.layoutSize.height()))); #if ENABLE(TIZEN_VIEWPORT_META_TAG) -- 2.7.4