[Title] Fix issue that the layout is not fit in most visited sites when rotate.
authorHyerim Bae <hyerim.bae@samsung.com>
Wed, 5 Sep 2012 13:13:15 +0000 (22:13 +0900)
committerHyerim Bae <hyerim.bae@samsung.com>
Wed, 5 Sep 2012 13:18:05 +0000 (22:18 +0900)
[Issue#] N_SE-9166
[Problem] The rotate information is not correct.
[Cause] Check it by window size.
[Solution] Modify to use orientation API.
[Developer] Hyerim Bae

Change-Id: Ie8a43421535c1a2044cbb848359ad82d79d649e6

src/browser-common-view.cpp [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 197a163..10ce90c
@@ -927,16 +927,11 @@ char *Browser_Common_View::_trim(char *str)
 #if defined(HORIZONTAL_UI)
 Eina_Bool Browser_Common_View::is_landscape(void)
 {
-       int window_w = 0;
-       int window_h = 0;
-       evas_object_geometry_get(m_win, NULL, NULL, &window_w, &window_h);
-       if (window_h > window_w) {
-               BROWSER_LOGD("portrait");
+       app_device_orientation_e rotation_value = app_get_device_orientation();
+       if (rotation_value == APP_DEVICE_ORIENTATION_0 || rotation_value == APP_DEVICE_ORIENTATION_180)
                return EINA_FALSE;
-       } else {
-               BROWSER_LOGD("landscape");
+       else
                return EINA_TRUE;
-       }
 }
 #endif