Initialize m_orientation of the frame class while creating a frame object.
authorjinwoo jeong <jw00.jeong@samsung.com>
Thu, 30 May 2013 02:35:07 +0000 (11:35 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 30 May 2013 03:51:42 +0000 (12:51 +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: Ieb8ccff31bca4c9e1d0e1dbfcf7e03c3954d6b28

Source/WebCore/page/Frame.cpp

index 80f9dd3..19a4bc4 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() && page->mainFrame() != this)
+        m_orientation = page->mainFrame()->orientation();
+#endif
 }
 
 PassRefPtr<Frame> Frame::create(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* client)