Initialize m_orientation of the frame class while creating a frame object.
authorjinwoo jeong <jw00.jeong@samsung.com>
Fri, 24 May 2013 03:48:44 +0000 (12:48 +0900)
committerjinwoo jeong <jw00.jeong@samsung.com>
Fri, 24 May 2013 07:12:22 +0000 (16:12 +0900)
[Title] Initialize m_orientation of the frame class while creating a frame object.
[Issues#] N/A
[Problem] If a target is on landscape mode while loading, the m_orientation of all frame objects is set to '0'.
[Cause] The m_orientation is initialized as '0' in frame constructor.
[Solution] Initialize m_orientation of the frame obejct as the same value of the mainFrame object.

Change-Id: I2219af39b9fafcd1d528a97073db165c146506bb

Source/WebCore/page/Frame.cpp

index 80f9dd3..d0ba92d 100644 (file)
@@ -201,6 +201,10 @@ inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader
     Frame* parent = parentFromOwnerElement(ownerElement);
     if (parent && parent->activeDOMObjectsAndAnimationsSuspended())
         suspendActiveDOMObjectsAndAnimations();
+#if ENABLE(TIZEN_ORIENTATION_EVENTS)
+    if (page->mainFrame() != this)
+        m_orientation = page->mainFrame()->orientation();
+#endif
 }
 
 PassRefPtr<Frame> Frame::create(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* client)