<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[175098] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/175098">175098</a></dd>
<dt>Author</dt> <dd>k.czech@samsung.com</dd>
<dt>Date</dt> <dd>2014-10-23 01:02:35 -0700 (Thu, 23 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[EFL] Introduce EFL Accessibility in WebKit
https://bugs.webkit.org/show_bug.cgi?id=137819

Reviewed by Gyuyoung Kim.

EFL Accessibility provides an API that is used to notify clients that certain
Accessibility events occur. Utilizing it makes WebKit-EFL coherent with EFL native
accessibility approach.

* PlatformEfl.cmake:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
(EwkView::webAccessibility):
* UIProcess/API/efl/WebAccessibility.cpp: Added.
(WebKit::WebAccessibility::WebAccessibility):
(WebKit::WebAccessibility::~WebAccessibility):
(WebKit::WebAccessibility::eventHandler):
(WebKit::WebAccessibility::executeGestureAction):
(WebKit::WebAccessibility::activate):
(WebKit::WebAccessibility::read):
(WebKit::WebAccessibility::readNext):
(WebKit::WebAccessibility::readPrev):
(WebKit::WebAccessibility::up):
(WebKit::WebAccessibility::down):
(WebKit::WebAccessibility::scroll):
(WebKit::WebAccessibility::mouse):
(WebKit::WebAccessibility::enable):
(WebKit::WebAccessibility::disable):
* UIProcess/API/efl/WebAccessibility.h: Added.
(WebKit::WebAccessibility::activateAction):
(WebKit::WebAccessibility::nextAction):
(WebKit::WebAccessibility::prevAction):
(WebKit::WebAccessibility::readAction):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_accessibility_action_activate_get):
(ewk_view_accessibility_action_next_get):
(ewk_view_accessibility_action_prev_get):
(ewk_view_accessibility_action_read_by_point_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Added.
(EWK2Accessibility::xwindow):
(TEST_F):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::accessibilityObjectReadByPoint):
(WebKit::WebPageProxy::accessibilityObjectReadPrevious):
(WebKit::WebPageProxy::accessibilityObjectReadNext):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformEflcmake">trunk/Source/WebKit2/PlatformEfl.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflEwkViewcpp">trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflEwkViewh">trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflewk_viewcpp">trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflewk_viewh">trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcesseflWebPageProxyEflcpp">trunk/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflWebAccessibilitycpp">trunk/Source/WebKit2/UIProcess/API/efl/WebAccessibility.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflWebAccessibilityh">trunk/Source/WebKit2/UIProcess/API/efl/WebAccessibility.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIeflteststest_ewk2_accessibilitycpp">trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_accessibility.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (175097 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-10-23 07:27:38 UTC (rev 175097)
+++ trunk/Source/WebKit2/ChangeLog        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2014-10-23  Krzysztof Czech  &lt;k.czech@samsung.com&gt;
+
+        [EFL] Introduce EFL Accessibility in WebKit
+        https://bugs.webkit.org/show_bug.cgi?id=137819
+
+        Reviewed by Gyuyoung Kim.
+
+        EFL Accessibility provides an API that is used to notify clients that certain
+        Accessibility events occur. Utilizing it makes WebKit-EFL coherent with EFL native
+        accessibility approach.
+
+        * PlatformEfl.cmake:
+        * UIProcess/API/efl/EwkView.cpp:
+        (EwkView::EwkView):
+        * UIProcess/API/efl/EwkView.h:
+        (EwkView::webAccessibility):
+        * UIProcess/API/efl/WebAccessibility.cpp: Added.
+        (WebKit::WebAccessibility::WebAccessibility):
+        (WebKit::WebAccessibility::~WebAccessibility):
+        (WebKit::WebAccessibility::eventHandler):
+        (WebKit::WebAccessibility::executeGestureAction):
+        (WebKit::WebAccessibility::activate):
+        (WebKit::WebAccessibility::read):
+        (WebKit::WebAccessibility::readNext):
+        (WebKit::WebAccessibility::readPrev):
+        (WebKit::WebAccessibility::up):
+        (WebKit::WebAccessibility::down):
+        (WebKit::WebAccessibility::scroll):
+        (WebKit::WebAccessibility::mouse):
+        (WebKit::WebAccessibility::enable):
+        (WebKit::WebAccessibility::disable):
+        * UIProcess/API/efl/WebAccessibility.h: Added.
+        (WebKit::WebAccessibility::activateAction):
+        (WebKit::WebAccessibility::nextAction):
+        (WebKit::WebAccessibility::prevAction):
+        (WebKit::WebAccessibility::readAction):
+        * UIProcess/API/efl/ewk_view.cpp:
+        (ewk_view_accessibility_action_activate_get):
+        (ewk_view_accessibility_action_next_get):
+        (ewk_view_accessibility_action_prev_get):
+        (ewk_view_accessibility_action_read_by_point_get):
+        * UIProcess/API/efl/ewk_view.h:
+        * UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Added.
+        (EWK2Accessibility::xwindow):
+        (TEST_F):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/efl/WebPageProxyEfl.cpp:
+        (WebKit::WebPageProxy::accessibilityObjectReadByPoint):
+        (WebKit::WebPageProxy::accessibilityObjectReadPrevious):
+        (WebKit::WebPageProxy::accessibilityObjectReadNext):
+
</ins><span class="cx"> 2014-10-22  Benjamin Poulain  &lt;bpoulain@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS WK2] Protect WKWebView dynamic viewport change against empty sizes
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformEflcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformEfl.cmake (175097 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformEfl.cmake        2014-10-23 07:27:38 UTC (rev 175097)
+++ trunk/Source/WebKit2/PlatformEfl.cmake        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx">     UIProcess/API/efl/EwkView.cpp
</span><span class="cx">     UIProcess/API/efl/GestureRecognizer.cpp
</span><span class="cx">     UIProcess/API/efl/SnapshotImageGL.cpp
</span><ins>+    UIProcess/API/efl/WebAccessibility.cpp
</ins><span class="cx">     UIProcess/API/efl/ewk_application_cache_manager.cpp
</span><span class="cx">     UIProcess/API/efl/ewk_auth_request.cpp
</span><span class="cx">     UIProcess/API/efl/ewk_back_forward_list.cpp
</span><span class="lines">@@ -492,6 +493,7 @@
</span><span class="cx"> # The &quot;ewk&quot; on the test name needs to be suffixed with &quot;2&quot;, otherwise it
</span><span class="cx"> # will clash with tests from the WebKit 1 test suite.
</span><span class="cx"> set(EWK2UnitTests_BINARIES
</span><ins>+    test_ewk2_accessibility
</ins><span class="cx">     test_ewk2_application_cache_manager
</span><span class="cx">     test_ewk2_auth_request
</span><span class="cx">     test_ewk2_back_forward_list
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflEwkViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp (175097 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp        2014-10-23 07:27:38 UTC (rev 175097)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkView.cpp        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -82,6 +82,10 @@
</span><span class="cx"> #include &quot;WebFullScreenManagerProxy.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+#include &quot;WebAccessibility.h&quot;
+#endif
+
</ins><span class="cx"> using namespace EwkViewCallbacks;
</span><span class="cx"> using namespace WebCore;
</span><span class="cx"> using namespace WebKit;
</span><span class="lines">@@ -297,6 +301,9 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_displayTimer(this, &amp;EwkView::displayTimerFired)
</span><span class="cx">     , m_inputMethodContext(InputMethodContextEfl::create(this, smartData()-&gt;base.evas))
</span><ins>+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+    , m_webAccessibility(std::make_unique&lt;WebAccessibility&gt;(this))
+#endif
</ins><span class="cx">     , m_pageViewportControllerClient(this)
</span><span class="cx">     , m_pageViewportController(page(), &amp;m_pageViewportControllerClient)
</span><span class="cx">     , m_isAccelerated(true)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflEwkViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h (175097 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h        2014-10-23 07:27:38 UTC (rev 175097)
+++ trunk/Source/WebKit2/UIProcess/API/efl/EwkView.h        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -59,6 +59,10 @@
</span><span class="cx"> #if ENABLE(VIBRATION)
</span><span class="cx"> class VibrationClientEfl;
</span><span class="cx"> #endif
</span><ins>+
+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+class WebAccessibility;
+#endif
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -201,6 +205,10 @@
</span><span class="cx"> 
</span><span class="cx">     static const char smartClassName[];
</span><span class="cx"> 
</span><ins>+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+    WebKit::WebAccessibility* webAccessibility() { return m_webAccessibility.get(); }
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     EwkView(WKViewRef, Evas_Object*);
</span><span class="cx">     ~EwkView();
</span><span class="lines">@@ -301,6 +309,10 @@
</span><span class="cx">     std::unique_ptr&lt;EwkColorPicker&gt; m_colorPicker;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+    std::unique_ptr&lt;WebKit::WebAccessibility&gt; m_webAccessibility;
+#endif
+
</ins><span class="cx">     WebKit::PageViewportControllerClientEfl m_pageViewportControllerClient;
</span><span class="cx">     WebKit::PageViewportController m_pageViewportController;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflWebAccessibilitycpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/efl/WebAccessibility.cpp (0 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/WebAccessibility.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/efl/WebAccessibility.cpp        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -0,0 +1,173 @@
</span><ins>+/*
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;WebAccessibility.h&quot;
+
+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+
+#include &quot;EwkView.h&quot;
+#include &quot;WKViewEfl.h&quot;
+#include &quot;WebHitTestResult.h&quot;
+#include &lt;WebCore/NotImplemented.h&gt;
+
+namespace WebKit {
+
+WebAccessibility::WebAccessibility(EwkView* ewkView)
+    : m_activateAction(false)
+    , m_nextAction(false)
+    , m_prevAction(false)
+    , m_readAction(false)
+    , m_currentPoint(WebCore::IntPoint(-1, -1))
+    , m_ewkView(ewkView)
+    , m_eventHandler(ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, eventHandler, this))
+{
+}
+
+WebAccessibility::~WebAccessibility()
+{
+    ecore_event_handler_del(m_eventHandler);
+}
+
+Eina_Bool WebAccessibility::eventHandler(void* data, int, void* event)
+{
+    WebAccessibility* webAccessibility = static_cast&lt;WebAccessibility*&gt;(data);
+    if (!webAccessibility)
+        return false;
+
+    Ecore_X_Event_Client_Message* ev = static_cast&lt;Ecore_X_Event_Client_Message*&gt;(event);
+    if (!ev)
+        return false;
+
+    return webAccessibility-&gt;action(ev);
+}
+
+Eina_Bool WebAccessibility::action(Ecore_X_Event_Client_Message* event)
+{
+    if (event-&gt;message_type == ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL) {
+        unsigned gestureType = static_cast&lt;unsigned&gt;(event-&gt;data.l[1]);
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ACTIVATE)
+            return activate();
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ)
+            return read(event-&gt;data.l[2], event-&gt;data.l[3]);
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_OVER)
+            return read(event-&gt;data.l[2], event-&gt;data.l[3]);
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_NEXT)
+            return readNext();
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_READ_PREV)
+            return readPrev();
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_UP)
+            return up();
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DOWN)
+            return down();
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_SCROLL)
+            return scroll();
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_MOUSE)
+            return mouse();
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_ENABLE)
+            return enable();
+
+        if (gestureType == ECORE_X_ATOM_E_ILLUME_ACCESS_ACTION_DISABLE)
+            return disable();
+    }
+
+    return true;
+}
+
+bool WebAccessibility::activate()
+{
+    notImplemented();
+    return false;
+}
+
+bool WebAccessibility::read(int, int)
+{
+    ASSERT(m_ewkView);
+    m_readAction = m_ewkView-&gt;page()-&gt;accessibilityObjectReadByPoint(WebCore::IntPoint(m_currentPoint.x(), m_currentPoint.y()));
+    return m_readAction;
+}
+
+bool WebAccessibility::readNext()
+{
+    ASSERT(m_ewkView);
+    m_nextAction = m_ewkView-&gt;page()-&gt;accessibilityObjectReadPrevious();
+    return m_nextAction;
+}
+
+bool WebAccessibility::readPrev()
+{
+    ASSERT(m_ewkView);
+    m_prevAction = m_ewkView-&gt;page()-&gt;accessibilityObjectReadPrevious();
+    return m_prevAction;
+}
+
+bool WebAccessibility::up()
+{
+    notImplemented();
+    return false;
+}
+
+bool WebAccessibility::down()
+{
+    notImplemented();
+    return false;
+}
+
+bool WebAccessibility::scroll()
+{
+    notImplemented();
+    return false;
+}
+
+bool WebAccessibility::mouse()
+{
+    notImplemented();
+    return false;
+}
+
+bool WebAccessibility::enable()
+{
+    notImplemented();
+    return false;
+}
+
+bool WebAccessibility::disable()
+{
+    notImplemented();
+    return false;
+}
+
+} // namespace WebKit
+
+#endif // HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflWebAccessibilityh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/efl/WebAccessibility.h (0 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/WebAccessibility.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/efl/WebAccessibility.h        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -0,0 +1,82 @@
</span><ins>+/*
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebAccessibility_h
+#define WebAccessibility_h
+
+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+
+#include &lt;Ecore.h&gt;
+#include &lt;Ecore_X.h&gt;
+#include &lt;Eina.h&gt;
+#include &lt;WebCore/IntPoint.h&gt;
+
+class EwkView;
+
+namespace WebKit {
+
+class WebAccessibility {
+public:
+    explicit WebAccessibility(EwkView* ewkView);
+    ~WebAccessibility();
+
+    bool activateAction() const { return m_activateAction; }
+    bool nextAction() const { return m_nextAction; }
+    bool prevAction() const { return m_prevAction; }
+    bool readAction() const { return m_readAction; }
+
+private:
+    static Eina_Bool eventHandler(void*, int, void*);
+
+    Eina_Bool action(Ecore_X_Event_Client_Message*);
+
+    // Actions
+    bool activate();
+    bool read(int, int);
+    bool readNext();
+    bool readPrev();
+    bool up();
+    bool down();
+    bool scroll();
+    bool zoom();
+    bool mouse();
+    bool enable();
+    bool disable();
+
+    bool m_activateAction;
+    bool m_nextAction;
+    bool m_prevAction;
+    bool m_readAction;
+
+    WebCore::IntPoint m_currentPoint;
+    EwkView* m_ewkView;
+    Ecore_Event_Handler* m_eventHandler;
+};
+
+} // namespace WebKit
+
+#endif // HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+
+#endif // WebAccessibility_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflewk_viewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp (175097 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp        2014-10-23 07:27:38 UTC (rev 175097)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -46,6 +46,10 @@
</span><span class="cx"> #include &quot;WebInspectorProxy.h&quot;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if HAVE(ACCESSIBILITY)
+#include &quot;WebAccessibility.h&quot;
+#endif
+
</ins><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><span class="cx"> static inline EwkView* toEwkViewChecked(const Evas_Object* evasObject)
</span><span class="lines">@@ -784,3 +788,47 @@
</span><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><ins>+
+Eina_Bool ewk_view_accessibility_action_activate_get(const Evas_Object* ewkView)
+{
+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+    EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+    return impl-&gt;webAccessibility()-&gt;activateAction();
+#else
+    UNUSED_PARAM(ewkView);
+    return false;
+#endif
+}
+
+Eina_Bool ewk_view_accessibility_action_next_get(const Evas_Object* ewkView)
+{
+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+    EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+    return impl-&gt;webAccessibility()-&gt;nextAction();
+#else
+    UNUSED_PARAM(ewkView);
+    return false;
+#endif
+}
+
+Eina_Bool ewk_view_accessibility_action_prev_get(const Evas_Object* ewkView)
+{
+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+    EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+    return impl-&gt;webAccessibility()-&gt;prevAction();
+#else
+    UNUSED_PARAM(ewkView);
+    return false;
+#endif
+}
+
+Eina_Bool ewk_view_accessibility_action_read_by_point_get(const Evas_Object* ewkView)
+{
+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+    EWK_VIEW_IMPL_GET_OR_RETURN(ewkView, impl, false);
+    return impl-&gt;webAccessibility()-&gt;readAction();
+#else
+    UNUSED_PARAM(ewkView);
+    return false;
+#endif
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflewk_viewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h (175097 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h        2014-10-23 07:27:38 UTC (rev 175097)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.h        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -1018,6 +1018,42 @@
</span><span class="cx">  */
</span><span class="cx"> EAPI Eina_Bool ewk_view_contents_size_get(const Evas_Object *o, Evas_Coord *width, Evas_Coord *height);
</span><span class="cx"> 
</span><ins>+/**
+ * Get status of the activate action. Activate action describes the click.
+ *
+ * @param o view of the object
+ *
+ * @return @c EINA_TRUE on success, or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_accessibility_action_activate_get(const Evas_Object *o);
+
+/**
+ * Get status of the next action. Action next moves and focuses next object.
+ *
+ * @param o view of the object
+ *
+ * @return @c EINA_TRUE on success, or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_accessibility_action_next_get(const Evas_Object *o);
+
+/**
+ * Get status of the previous action. Previous action moves and focuses previous element.
+ *
+ * @param o view of the object
+ *
+ * @return @c EINA_TRUE on success, or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_accessibility_action_prev_get(const Evas_Object *o);
+
+/**
+ * Get status of the read action. Read action focuses object with specific coordinates.
+ *
+ * @param o view of the object
+ *
+ * @return @c EINA_TRUE on success, or @c EINA_FALSE otherwise
+ */
+EAPI Eina_Bool ewk_view_accessibility_action_read_by_point_get(const Evas_Object *o);
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIeflteststest_ewk2_accessibilitycpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_accessibility.cpp (0 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_accessibility.cpp                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_accessibility.cpp        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -0,0 +1,52 @@
</span><ins>+#include &quot;config.h&quot;
+
+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+
+#include &quot;UnitTestUtils/EWK2UnitTestBase.h&quot;
+#include &lt;Ecore_Evas.h&gt;
+#include &lt;Ecore_X.h&gt;
+#include &lt;WebCore/EflScreenUtilities.h&gt;
+
+using namespace EWK2UnitTest;
+
+class EWK2Accessibility : public EWK2UnitTestBase {
+protected:
+    Ecore_X_Window xwindow()
+    {
+        return WebCore::getEcoreXWindow(ecore_evas_ecore_evas_get(evas_object_evas_get(webView())));
+    }
+};
+
+TEST_F(EWK2Accessibility, ewk_accessibility_action_activate)
+{
+    ecore_x_e_illume_access_action_activate_send(xwindow());
+    bool activateSend = false;
+    waitUntilTrue(activateSend, 1);
+    ASSERT_TRUE(ewk_view_accessibility_action_activate_get(webView()));
+}
+
+TEST_F(EWK2Accessibility, ewk_accessibility_action_next)
+{
+    ecore_x_e_illume_access_action_read_next_send(xwindow());
+    bool nextSend = false;
+    waitUntilTrue(nextSend, 1);
+    ASSERT_TRUE(ewk_view_accessibility_action_next_get(webView()));
+}
+
+TEST_F(EWK2Accessibility, ewk_accessibility_action_prev)
+{
+    ecore_x_e_illume_access_action_read_prev_send(xwindow());
+    bool prevSend = false;
+    waitUntilTrue(prevSend, 1);
+    ASSERT_TRUE(ewk_view_accessibility_action_prev_get(webView()));
+}
+
+TEST_F(EWK2Accessibility, ewk_accessibility_action_read_by_point)
+{
+    ecore_x_e_illume_access_action_read_send(xwindow());
+    bool readSend = false;
+    waitUntilTrue(readSend, 1);
+    ASSERT_TRUE(ewk_view_accessibility_action_read_by_point_get(webView()));
+}
+
+#endif // HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (175097 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-10-23 07:27:38 UTC (rev 175097)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -926,6 +926,12 @@
</span><span class="cx">     void performActionMenuHitTestAtLocation(WebCore::FloatPoint);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+#if PLATFORM(EFL) &amp;&amp; HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+    bool accessibilityObjectReadByPoint(const WebCore::IntPoint&amp;);
+    bool accessibilityObjectReadPrevious();
+    bool accessibilityObjectReadNext();
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx">     WebPageProxy(PageClient&amp;, WebProcessProxy&amp;, uint64_t pageID, const WebPageConfiguration&amp;);
</span><span class="cx">     void platformInitialize();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcesseflWebPageProxyEflcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp (175097 => 175098)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp        2014-10-23 07:27:38 UTC (rev 175097)
+++ trunk/Source/WebKit2/UIProcess/efl/WebPageProxyEfl.cpp        2014-10-23 08:02:35 UTC (rev 175098)
</span><span class="lines">@@ -140,4 +140,27 @@
</span><span class="cx">     m_uiPopupMenuClient.initialize(client);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if HAVE(ACCESSIBILITY) &amp;&amp; defined(HAVE_ECORE_X)
+
+bool WebPageProxy::accessibilityObjectReadByPoint(const WebCore::IntPoint&amp; point)
+{
+    UNUSED_PARAM(point);
+    notImplemented();
+    return false;
+}
+
+bool WebPageProxy::accessibilityObjectReadPrevious()
+{
+    notImplemented();
+    return false;
+}
+
+bool WebPageProxy::accessibilityObjectReadNext()
+{
+    notImplemented();
+    return false;
+}
+
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>