Change timing to enable screen reader
authorSangYong Park <sy302.park@samsung.com>
Thu, 9 May 2013 05:52:09 +0000 (14:52 +0900)
committerGerrit Code Review <gerrit@gerrit.vlan144.tizendev.org>
Tue, 2 Jul 2013 06:19:29 +0000 (06:19 +0000)
[Title] Change timing to enable screen reader
[Issue#] N/A
[Problem]
[Cause]
[Solution]

Change-Id: Ida27f6df0cb2b56c895ef8dabcb2f80b1d433bd8

Source/WebKit2/UIProcess/API/efl/ewk_view.cpp [changed mode: 0644->0755]
Source/WebKit2/UIProcess/API/efl/tizen/ScreenReaderProxy.cpp

old mode 100644 (file)
new mode 100755 (executable)
index b334470..33931ee
@@ -1003,6 +1003,10 @@ static void _ewk_view_smart_show(Evas_Object* ewkView)
     if (evas_object_clipees_get(smartData->base.clipper))
         evas_object_show(smartData->base.clipper);
     evas_object_show(smartData->image);
+
+#if ENABLE(TIZEN_SCREEN_READER)
+    ScreenReaderProxy::screenReader().enable(impl);
+#endif
 }
 
 static void _ewk_view_smart_hide(Evas_Object* ewkView)
@@ -2916,11 +2920,6 @@ Eina_Bool ewk_view_visibility_set(Evas_Object* ewkView, Eina_Bool enable)
         impl->pageClient->setDragMode(false);
 #endif
 
-#if ENABLE(TIZEN_SCREEN_READER)
-    if (enable)
-        ScreenReaderProxy::screenReader().enable(impl);
-#endif
-
     impl->pageClient->setIsVisible(enable);
     return true;
 }
index ae4fa26..e4411d0 100755 (executable)
@@ -54,6 +54,9 @@ ScreenReaderProxy::~ScreenReaderProxy()
 
 void ScreenReaderProxy::addViewImpl(EwkViewImpl* viewImpl)
 {
+    if (m_viewImplSet.contains(viewImpl))
+        return;
+
     m_viewImplSet.append(viewImpl);
     viewImpl->focusRing->setImage(SCREEN_READER_FOCUS_RING_IMAGE_PATH, 4, 2);
 }
@@ -137,8 +140,7 @@ void ScreenReaderProxy::setText(const String& text)
 
 bool ScreenReaderProxy::executeAction(EwkViewImpl* viewImpl, Elm_Access_Action_Info* actionInfo)
 {
-    if (!m_viewImplSet.contains(viewImpl))
-        addViewImpl(viewImpl);
+    addViewImpl(viewImpl);
 
     if (actionInfo->action_type == ELM_ACCESS_ACTION_HIGHLIGHT_NEXT) {
         if (!viewImpl->page()->moveScreenReaderFocus(true))