Initiate device scale factor on WebProcess's creation
authorChanghyup Jwa <ch.jwa@samsung.com>
Mon, 24 Jun 2013 14:41:44 +0000 (23:41 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Mon, 24 Jun 2013 15:23:58 +0000 (15:23 +0000)
[Title] Initiate device scale factor WebProcess's creation
[Issue#] N_SE-41307
[Problem] Sometimes, TouchPaint app drawing point is not matched to touch point
[Cause] On viewport initiation, layout size and initial scale factor are
        calculated incorrectly by uninitiated device scale factor. Device scale
        factor is initiated after rendering logic begins.
[Solution] Initiate device scale factor on WebProcess's creation

Change-Id: Id231b8bb47b6508bbd803f34a7132b07e88172d1

Source/WebKit2/UIProcess/WebPageProxy.cpp

index 69074d2..c5becb1 100755 (executable)
 #include "InputMethodContextEfl.h"
 #endif
 
+#if ENABLE(TIZEN_VIEWPORT_META_TAG)
+#include <WebCore/EflScreenUtilities.h>
+#endif
+
 // This controls what strategy we use for mouse wheel coalescing.
 #define MERGE_WHEEL_EVENTS 1
 
@@ -190,7 +194,7 @@ WebPageProxy::WebPageProxy(PageClient* pageClient, PassRefPtr<WebProcessProxy> p
     , m_textZoomFactor(1)
     , m_pageZoomFactor(1)
     , m_pageScaleFactor(1)
-    , m_intrinsicDeviceScaleFactor(1)
+    , m_intrinsicDeviceScaleFactor(getMobileDPI() / 160)
     , m_customDeviceScaleFactor(0)
 #if HAVE(LAYER_HOSTING_IN_WINDOW_SERVER)
     , m_layerHostingMode(LayerHostingModeInWindowServer)