Title: [140667] trunk/Source/WebKit2
- Revision
- 140667
- Author
- [email protected]
- Date
- 2013-01-24 02:11:51 -0800 (Thu, 24 Jan 2013)
Log Message
[EFL][WK2] Expose accessibility hierarchy in WebKit2-EFL.
https://bugs.webkit.org/show_bug.cgi?id=106216
Patch by Krzysztof Czech <[email protected]> on 2013-01-24
Reviewed by Andreas Kling.
Create WebPage's accessibility object on WebPage initialization.
Wrap around WebCore's accessibility objects.
Updating accessibility hierarchy. Expands accessibility implementation
of WebKit-GTK to be used in EFL.
* PlatformEfl.cmake:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
(webPageAccessibilityObjectGetIndexInParent):
(web_page_accessibility_object_init):
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::platformInitialize):
(WebKit):
(WebKit::WebPage::updateAccessibilityTree):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (140666 => 140667)
--- trunk/Source/WebKit2/ChangeLog 2013-01-24 09:20:21 UTC (rev 140666)
+++ trunk/Source/WebKit2/ChangeLog 2013-01-24 10:11:51 UTC (rev 140667)
@@ -1,3 +1,28 @@
+2013-01-24 Krzysztof Czech <[email protected]>
+
+ [EFL][WK2] Expose accessibility hierarchy in WebKit2-EFL.
+ https://bugs.webkit.org/show_bug.cgi?id=106216
+
+ Reviewed by Andreas Kling.
+
+ Create WebPage's accessibility object on WebPage initialization.
+ Wrap around WebCore's accessibility objects.
+ Updating accessibility hierarchy. Expands accessibility implementation
+ of WebKit-GTK to be used in EFL.
+
+ * PlatformEfl.cmake:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
+ * WebProcess/WebPage/WebPage.h:
+ (WebPage):
+ * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp:
+ (webPageAccessibilityObjectGetIndexInParent):
+ (web_page_accessibility_object_init):
+ * WebProcess/WebPage/efl/WebPageEfl.cpp:
+ (WebKit::WebPage::platformInitialize):
+ (WebKit):
+ (WebKit::WebPage::updateAccessibilityTree):
+
2013-01-23 Seokju Kwon <[email protected]>
[EFL] Unreviewed build fix after r140605
Modified: trunk/Source/WebKit2/PlatformEfl.cmake (140666 => 140667)
--- trunk/Source/WebKit2/PlatformEfl.cmake 2013-01-24 09:20:21 UTC (rev 140666)
+++ trunk/Source/WebKit2/PlatformEfl.cmake 2013-01-24 10:11:51 UTC (rev 140667)
@@ -136,6 +136,7 @@
WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
+ WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp
WebProcess/WebPage/efl/WebInspectorEfl.cpp
WebProcess/WebPage/efl/WebPageEfl.cpp
@@ -411,3 +412,13 @@
${ENCHANT_LIBRARIES}
)
endif ()
+
+if (ENABLE_ACCESSIBILITY)
+ list(APPEND WebKit2_INCLUDE_DIRECTORIES
+ "${WEBKIT2_DIR}/WebProcess/WebPage/atk"
+ ${ATK_INCLUDE_DIRS}
+ )
+ list(APPEND WebKit2_LIBRARIES
+ ${ATK_LIBRARIES}
+ )
+endif ()
Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (140666 => 140667)
--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2013-01-24 09:20:21 UTC (rev 140666)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp 2013-01-24 10:11:51 UTC (rev 140667)
@@ -1481,7 +1481,7 @@
webPage->injectedBundleLoaderClient().didClearWindowObjectForFrame(webPage, m_frame, world);
-#if PLATFORM(GTK)
+#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
// Ensure the accessibility hierarchy is updated.
webPage->updateAccessibilityTree();
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (140666 => 140667)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2013-01-24 09:20:21 UTC (rev 140666)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2013-01-24 10:11:51 UTC (rev 140667)
@@ -78,9 +78,13 @@
#include <QNetworkRequest>
#endif
+#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+#include "WebPageAccessibilityObject.h"
+#include <wtf/gobject/GRefPtr.h>
+#endif
+
#if PLATFORM(GTK)
#include "ArgumentCodersGtk.h"
-#include "WebPageAccessibilityObject.h"
#include "WebPrintOperationGtk.h"
#endif
@@ -460,12 +464,15 @@
void setComposition(const WTF::String& compositionString, const WTF::Vector<WebCore::CompositionUnderline>& underlines, uint64_t cursorPosition);
void cancelComposition();
#elif PLATFORM(GTK)
- void updateAccessibilityTree();
#if USE(TEXTURE_MAPPER_GL)
void setAcceleratedCompositingWindowId(int64_t nativeWindowHandle);
#endif
#endif
+#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+ void updateAccessibilityTree();
+#endif
+
void setCompositionForTesting(const String& compositionString, uint64_t from, uint64_t length);
bool hasCompositionForTesting();
void confirmCompositionForTesting(const String& compositionString);
@@ -849,7 +856,7 @@
WebCore::KeyboardEvent* m_keyboardEventBeingInterpreted;
-#elif PLATFORM(GTK)
+#elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
GRefPtr<WebPageAccessibilityObject> m_accessibilityObject;
#if USE(TEXTURE_MAPPER_GL)
Modified: trunk/Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp (140666 => 140667)
--- trunk/Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp 2013-01-24 09:20:21 UTC (rev 140666)
+++ trunk/Source/WebKit2/WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp 2013-01-24 10:11:51 UTC (rev 140667)
@@ -75,7 +75,7 @@
atk_object_set_role(atkObject, ATK_ROLE_FILLER);
}
-static gint webPageAccessibilityObjectGetIndexInParent(AtkObject *atkObject)
+static gint webPageAccessibilityObjectGetIndexInParent(AtkObject*)
{
// An AtkPlug is the only child an AtkSocket can have.
return 0;
@@ -106,7 +106,7 @@
return rootObject;
}
-static void web_page_accessibility_object_init(WebPageAccessibilityObject* accessible)
+static void web_page_accessibility_object_init(WebPageAccessibilityObject*)
{
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp (140666 => 140667)
--- trunk/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp 2013-01-24 09:20:21 UTC (rev 140666)
+++ trunk/Source/WebKit2/WebProcess/WebPage/efl/WebPageEfl.cpp 2013-01-24 10:11:51 UTC (rev 140667)
@@ -42,15 +42,33 @@
#include <WebCore/RenderThemeEfl.h>
#include <WebCore/Settings.h>
+#if HAVE(ACCESSIBILITY)
+#include "WebPageAccessibilityObject.h"
+#endif
+
using namespace WebCore;
namespace WebKit {
void WebPage::platformInitialize()
{
+#if HAVE(ACCESSIBILITY)
+ m_accessibilityObject = adoptGRef(webPageAccessibilityObjectNew(this));
+#else
notImplemented();
+#endif
}
+#if HAVE(ACCESSIBILITY)
+void WebPage::updateAccessibilityTree()
+{
+ if (!m_accessibilityObject)
+ return;
+
+ webPageAccessibilityObjectRefresh(m_accessibilityObject.get());
+}
+#endif
+
void WebPage::platformPreferencesDidChange(const WebPreferencesStore&)
{
notImplemented();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes