From 82de01d92ca23f38f4a4bdca46795a1da72558fd Mon Sep 17 00:00:00 2001 From: Changhyup Jwa Date: Wed, 10 Apr 2013 15:18:50 +0900 Subject: [PATCH] Unset device width and height in Settings [Title] Unset device width and height in Settings [Issue#] N/A [Problem] Contents' size is not fit to view size, only fit to screen size [Cause] Viewport attributes are calculated with screen size if device width and height is set [Solution] Unset device width and height Change-Id: I48f732ed70cf30a1b7b5cf074db1271bc95b5d04 --- Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp | 13 ------------- Source/WebKit2/UIProcess/API/efl/ewk_view.cpp | 5 ----- .../WebKit2/WebProcess/WebPage/efl/tizen/ScreenReader.cpp | 4 ++-- 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp index 06b2457..ba02a58 100755 --- a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp +++ b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp @@ -189,19 +189,6 @@ double PageClientImpl::adjustScaleWithViewport(double scale) #if USE(TILED_BACKING_STORE) && ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE) void PageClientImpl::updateViewportSize(const IntSize& viewportSize, const int angle) { - // update device width & height - int deviceWidth = WebCore::getDefaultScreenResolution().width(); - int deviceHeight = WebCore::getDefaultScreenResolution().height(); - - if (angle == 90 || angle == 270) { - int tempWidth = deviceWidth; - deviceWidth = deviceHeight; - deviceHeight = tempWidth; - } - - m_viewImpl->page()->pageGroup()->preferences()->setDeviceWidth(deviceWidth); - m_viewImpl->page()->pageGroup()->preferences()->setDeviceHeight(deviceHeight); - // update viewport size of webkit m_visibleContentRect.setSize(viewportSize); m_viewImpl->page()->setViewportSize(viewportSize); diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp index dae2ce5..9cde630 100644 --- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp +++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp @@ -1172,11 +1172,6 @@ static void _ewk_view_initialize(Evas_Object* ewkView, PassRefPtr c impl->pageProxy->pageGroup()->preferences()->setForceCompositingMode(true); impl->pageProxy->pageGroup()->preferences()->setFrameFlatteningEnabled(true); impl->pageProxy->pageGroup()->preferences()->setAllowUniversalAccessFromFileURLs(true); - - int deviceWidth, deviceHeight; - ecore_evas_screen_geometry_get(ecore_evas_ecore_evas_get(evas_object_evas_get(ewkView)), 0, 0, &deviceWidth, &deviceHeight); - impl->pageProxy->pageGroup()->preferences()->setDeviceWidth(deviceWidth); - impl->pageProxy->pageGroup()->preferences()->setDeviceHeight(deviceHeight); #endif impl->pageProxy->initializeWebPage(); diff --git a/Source/WebKit2/WebProcess/WebPage/efl/tizen/ScreenReader.cpp b/Source/WebKit2/WebProcess/WebPage/efl/tizen/ScreenReader.cpp index 67b8ec3..f712b60 100644 --- a/Source/WebKit2/WebProcess/WebPage/efl/tizen/ScreenReader.cpp +++ b/Source/WebKit2/WebProcess/WebPage/efl/tizen/ScreenReader.cpp @@ -44,8 +44,8 @@ #include #include #include +#include #include -#include #include #include @@ -64,7 +64,7 @@ ScreenReader::ScreenReader(WebPage* page) { if (++s_readerCount) { AXObjectCache::enableAccessibility(); - int unit = page->corePage()->settings()->deviceWidth() / 10; + int unit = static_cast(screenRect(0).width() / 10); s_hitTestPadding.setWidth(unit); s_hitTestPadding.setHeight(unit); } -- 2.7.4