Fix for issue
authorhyun lee <hyunn.lee@samsung.com>
Wed, 28 Aug 2013 07:41:04 +0000 (16:41 +0900)
committerhyun lee <hyunn.lee@samsung.com>
Wed, 28 Aug 2013 07:42:20 +0000 (16:42 +0900)
Change-Id: I2dc297e3e56c38b276880069170900260838a145
Signed-off-by: hyun lee <hyunn.lee@samsung.com>
src/controls/FWebCtrl_Web.cpp
src/controls/FWebCtrl_Web.h

index b832acb..04cf64e 100755 (executable)
@@ -346,6 +346,7 @@ _Web::_Web(void)
        , __pTextElement(null)
        , __previousTouchedPosition(0.0f, 0.0f)
        , __isFullScreenEntered(false)
+       , __isRotated(false)
 {
        SetBackgroundColor(Color(0, 0, 0, 0));
 }
@@ -625,7 +626,7 @@ _Web::OnBoundsChanging(const Rectangle& bounds)
        _ICoordinateSystemTransformer* pXformer = _CoordinateSystem::GetInstance()->GetTransformer();
        SysTryReturnResult(NID_WEB_CTRL, pXformer, E_SYSTEM, "[%s] A system error has been occurred. Failed to get coordinate transformer.", GetErrorMessage(E_SYSTEM));
 
-       if (__pEflWebkit.get())
+       if (__pEflWebkit.get() && __isRotated == false)
        {
                evas_object_move(__pEflWebkit->GetWebEvasObject(), pXformer->TransformHorizontal(absoluteBounds.x - webBounds.x + bounds.x), pXformer->TransformVertical(absoluteBounds.y - webBounds.y + bounds.y));
                evas_object_resize(__pEflWebkit->GetWebEvasObject(), pXformer->TransformHorizontal(bounds.width), pXformer->TransformVertical(bounds.height));
@@ -636,6 +637,20 @@ _Web::OnBoundsChanging(const Rectangle& bounds)
 
 
 void
+_Web::OnBoundsChanged(void)
+{
+       __isRotated = false;
+}
+
+
+void
+_Web::OnChangeLayout(_ControlOrientation orientation)
+{
+       __isRotated = true;
+}
+
+
+void
 _Web::ChangeGesture(_WebGestureType type)
 {
        switch (type)
index a42ec43..ca7c1cf 100755 (executable)
@@ -122,6 +122,8 @@ public:
 
        virtual result OnAttaching(const _Control* pParent);
        virtual result OnBoundsChanging(const Tizen::Graphics::Rectangle& bounds);
+       virtual void OnBoundsChanged(void);
+       virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
 
        virtual bool OnTouchPressed(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
        virtual bool OnTouchReleased(const Tizen::Ui::_Control& source, const Tizen::Ui::_TouchInfo& touchInfo);
@@ -209,6 +211,8 @@ private:
        Tizen::Graphics::FloatPoint __previousTouchedPosition;
 
        bool __isFullScreenEntered;
+
+       bool __isRotated;
 }; // _Web
 
 }}} // Tizen::Web::Controls