implement html5 onorientationchanged API submit/tizen_2.1/20130515.031828
authorSeongjun Yim <se201.yim@samsung.com>
Tue, 14 May 2013 09:20:07 +0000 (18:20 +0900)
committerSeongjun Yim <se201.yim@samsung.com>
Tue, 14 May 2013 09:21:43 +0000 (18:21 +0900)
Change-Id: I9039c903c3b069942e6ef6fbaa8abb7764e24643
Signed-off-by: Seongjun Yim <se201.yim@samsung.com>
src/controls/FWebCtrl_WebImpl.cpp

index f1d1ac0..000dcdd 100755 (executable)
@@ -1533,6 +1533,26 @@ OnWebPageBlockSelectedByOrientation(void* pUserData, Evas_Object* pView, void* p
        }
 
        pImpl->SetOrientationChanged(false);
+
+       int orientation = 0;
+       _ControlRotation rotation = _ControlManager::GetInstance()->GetOrientationStatus();
+       switch (rotation)
+       {
+               case _CONTROL_ROTATION_0:
+                       orientation =  0;
+                       break;
+               case _CONTROL_ROTATION_90:
+                       orientation =  90;
+                       break;
+               case _CONTROL_ROTATION_180:
+                       orientation =  180;
+                       break;
+               case _CONTROL_ROTATION_270:
+                       orientation =  -90;
+                       break;
+       }
+       ewk_view_orientation_send(pView, orientation);
+
        OnWebPageBlockSelected(pUserData, pView, pEventInfo);
 }