Dispatch window resize event after changing font type
authorHurnjoo Lee <hurnjoo.lee@samsung.com>
Thu, 12 Sep 2013 02:44:11 +0000 (11:44 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Wed, 2 Oct 2013 07:54:43 +0000 (07:54 +0000)
[Title] Dispatch window resize event after changing font type
[Issues] P130902-00458
[Problem] In the page which has long text string, after changing font type,
    the scroll position does not follow the change of scrollview height.
[Solution] Dispatch window resize event after changing font type in order to relocate the scroll position.

Change-Id: Ic4f77badd20b6115ec65c8f6c64858a8e6744517

Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp

index 854239e..cb08ceb 100755 (executable)
@@ -1892,7 +1892,14 @@ void WebPage::useSettingsFont()
     FcInitReinitialize();
     WebCore::fontCache()->invalidate();
 
-    FrameView* frameView = m_mainFrame->coreFrame()->view();
+    Frame* frame = m_mainFrame->coreFrame();
+    if (!frame)
+        return;
+
+    if (frame->document())
+        frame->document()->dispatchWindowEvent(Event::create(eventNames().resizeEvent, false, false));
+
+    FrameView* frameView = frame->view();
     if (!frameView)
         return;