[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
mario at webkit.org
mario at webkit.org
Fri Jan 21 15:07:50 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 86390a14c4955eb1b5096a20d87868f6005ca974
Author: mario at webkit.org <mario at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jan 7 17:34:02 2011 +0000
2011-01-07 Mario Sanchez Prada <msanchez at igalia.com>
Reviewed by Chris Fleizach.
GTK: AX: atk tests need to be updated after recent changes
https://bugs.webkit.org/show_bug.cgi?id=51932
Make sure we can always get the right accesssible parent for an
AtkObject when traversing the hierarchy bottom up.
* accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
(isRootObject): New function to check whether an
AccessibilityObject is the root one or not, according to the
latest changes in the hierarchy.
(atkParentOfRootObject): Gets the appropriate AtkObject from GTK's
GAIL as the parent of the root AtkObject from WebCore.
(webkit_accessible_get_parent): Use atkParentOfRootObject.
(webkit_accessible_get_index_in_parent): Ditto.
(atkRole): Expose AccessibilityObjects with ScrollAreaRole as
AtkObject's of role ATK_ROLE_SCROLLED_PANE.
2011-01-07 Mario Sanchez Prada <msanchez at igalia.com>
Reviewed by Chris Fleizach.
GTK: AX: atk tests need to be updated after recent changes
https://bugs.webkit.org/show_bug.cgi?id=51932
Fix gtk_widget_get_accessible() in WebKitWebView to keep returning
the AtkObject of role ATK_ROLE_DOCUMENT_FRAME.
With the change to support WK2 accessibility, the root object of
the AX hierarchy is different from what GTK expects as the current
hirarchy right now includes a new accessible object as the parent
of the accessible web area (AXScrollView).
* webkit/webkitwebview.cpp:
(webkit_web_view_get_accessible): Return the first child of the
wrapper associated to the root accessible object in the document,
to keep everything in the GTK port working as it used to be.
Re-enable skipped ATK unit tests now they are passing again.
* tests/testatk.c:
(main): Re-enable skipped tests.
* tests/testatkroles.c:
(main): Ditto.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6cbcee8..e9db153 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2011-01-07 Mario Sanchez Prada <msanchez at igalia.com>
+
+ Reviewed by Chris Fleizach.
+
+ GTK: AX: atk tests need to be updated after recent changes
+ https://bugs.webkit.org/show_bug.cgi?id=51932
+
+ Make sure we can always get the right accesssible parent for an
+ AtkObject when traversing the hierarchy bottom up.
+
+ * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+ (isRootObject): New function to check whether an
+ AccessibilityObject is the root one or not, according to the
+ latest changes in the hierarchy.
+ (atkParentOfRootObject): Gets the appropriate AtkObject from GTK's
+ GAIL as the parent of the root AtkObject from WebCore.
+ (webkit_accessible_get_parent): Use atkParentOfRootObject.
+ (webkit_accessible_get_index_in_parent): Ditto.
+ (atkRole): Expose AccessibilityObjects with ScrollAreaRole as
+ AtkObject's of role ATK_ROLE_SCROLLED_PANE.
+
2011-01-07 Zhenyao Mo <zmo at google.com>
Unreviewed, Mac 32-bit build fix.
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
index 5beffd2..7489034 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
@@ -234,21 +234,36 @@ static void setAtkRelationSetFromCoreObject(AccessibilityObject* coreObject, Atk
static gpointer webkit_accessible_parent_class = 0;
-static AtkObject* atkParentOfWebView(AtkObject* object)
+static bool isRootObject(AccessibilityObject* coreObject)
{
- AccessibilityObject* coreParent = core(object)->parentObjectUnignored();
+ // The root accessible object in WebCore is always an object with
+ // the ScrolledArea role with one child with the WebArea role.
+ if (!coreObject || !coreObject->isScrollView())
+ return false;
+
+ AccessibilityObject* firstChild = coreObject->firstChild();
+ if (!firstChild || !firstChild->isWebArea())
+ return false;
+
+ return true;
+}
- // The top level web view claims to not have a parent. This makes it
+static AtkObject* atkParentOfRootObject(AtkObject* object)
+{
+ AccessibilityObject* coreObject = core(object);
+ AccessibilityObject* coreParent = coreObject->parentObjectUnignored();
+
+ // The top level object claims to not have a parent. This makes it
// impossible for assistive technologies to ascend the accessible
// hierarchy all the way to the application. (Bug 30489)
- if (!coreParent && core(object)->isWebArea()) {
- HostWindow* hostWindow = core(object)->document()->view()->hostWindow();
+ if (!coreParent && isRootObject(coreObject)) {
+ HostWindow* hostWindow = coreObject->document()->view()->hostWindow();
if (hostWindow) {
- PlatformPageClient webView = hostWindow->platformPageClient();
- if (webView) {
- GtkWidget* webViewParent = gtk_widget_get_parent(webView);
- if (webViewParent)
- return gtk_widget_get_accessible(webViewParent);
+ PlatformPageClient scrollView = hostWindow->platformPageClient();
+ if (scrollView) {
+ GtkWidget* scrollViewParent = gtk_widget_get_parent(scrollView);
+ if (scrollViewParent)
+ return gtk_widget_get_accessible(scrollViewParent);
}
}
}
@@ -261,9 +276,10 @@ static AtkObject* atkParentOfWebView(AtkObject* object)
static AtkObject* webkit_accessible_get_parent(AtkObject* object)
{
- AccessibilityObject* coreParent = core(object)->parentObjectUnignored();
- if (!coreParent && core(object)->isWebArea())
- return atkParentOfWebView(object);
+ AccessibilityObject* coreObject = core(object);
+ AccessibilityObject* coreParent = coreObject->parentObjectUnignored();
+ if (!coreParent && isRootObject(coreObject))
+ return atkParentOfRootObject(object);
if (!coreParent)
return 0;
@@ -300,8 +316,8 @@ static gint webkit_accessible_get_index_in_parent(AtkObject* object)
AccessibilityObject* coreObject = core(object);
AccessibilityObject* parent = coreObject->parentObjectUnignored();
- if (!parent && core(object)->isWebArea()) {
- AtkObject* atkParent = atkParentOfWebView(object);
+ if (!parent && isRootObject(coreObject)) {
+ AtkObject* atkParent = atkParentOfRootObject(object);
if (!atkParent)
return -1;
@@ -416,6 +432,8 @@ static AtkRole atkRole(AccessibilityRole role)
return ATK_ROLE_LIST;
case ScrollBarRole:
return ATK_ROLE_SCROLL_BAR;
+ case ScrollAreaRole:
+ return ATK_ROLE_SCROLL_PANE;
case GridRole: // Is this right?
case TableRole:
return ATK_ROLE_TABLE;
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 3cbb351..e2ba243 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,30 @@
+2011-01-07 Mario Sanchez Prada <msanchez at igalia.com>
+
+ Reviewed by Chris Fleizach.
+
+ GTK: AX: atk tests need to be updated after recent changes
+ https://bugs.webkit.org/show_bug.cgi?id=51932
+
+ Fix gtk_widget_get_accessible() in WebKitWebView to keep returning
+ the AtkObject of role ATK_ROLE_DOCUMENT_FRAME.
+
+ With the change to support WK2 accessibility, the root object of
+ the AX hierarchy is different from what GTK expects as the current
+ hirarchy right now includes a new accessible object as the parent
+ of the accessible web area (AXScrollView).
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_accessible): Return the first child of the
+ wrapper associated to the root accessible object in the document,
+ to keep everything in the GTK port working as it used to be.
+
+ Re-enable skipped ATK unit tests now they are passing again.
+
+ * tests/testatk.c:
+ (main): Re-enable skipped tests.
+ * tests/testatkroles.c:
+ (main): Ditto.
+
2011-01-06 Martin Robinson <mrobinson at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/tests/testatk.c b/WebKit/gtk/tests/testatk.c
index 046c640..1ee6c55 100644
--- a/WebKit/gtk/tests/testatk.c
+++ b/WebKit/gtk/tests/testatk.c
@@ -1313,7 +1313,6 @@ int main(int argc, char** argv)
g_thread_init(0);
gtk_test_init(&argc, &argv, 0);
- /* See: https://bugs.webkit.org/show_bug.cgi?id=51932
g_test_bug_base("https://bugs.webkit.org/");
g_test_add_func("/webkit/atk/comboBox", testWebkitAtkComboBox);
g_test_add_func("/webkit/atk/getTextAtOffset", testWebkitAtkGetTextAtOffset);
@@ -1333,7 +1332,6 @@ int main(int argc, char** argv)
g_test_add_func("/webkit/atk/linksWithInlineImages", testWebkitAtkLinksWithInlineImages);
g_test_add_func("/webkit/atk/listsOfItems", testWebkitAtkListsOfItems);
g_test_add_func("/webkit/atk/textChangedNotifications", testWebkitAtkTextChangedNotifications);
- */
return g_test_run ();
}
diff --git a/WebKit/gtk/tests/testatkroles.c b/WebKit/gtk/tests/testatkroles.c
index 99c6c92..5ad6b5f 100644
--- a/WebKit/gtk/tests/testatkroles.c
+++ b/WebKit/gtk/tests/testatkroles.c
@@ -307,7 +307,6 @@ int main(int argc, char** argv)
g_test_bug_base("https://bugs.webkit.org/");
- /* See: https://bugs.webkit.org/show_bug.cgi?id=51932
g_test_add("/webkit/atk/test_webkit_atk_get_role_document_frame",
AtkRolesFixture, HTML_DOCUMENT_FRAME,
atk_roles_fixture_setup,
@@ -368,7 +367,7 @@ int main(int argc, char** argv)
test_webkit_atk_get_role_combobox,
atk_roles_fixture_teardown);
- // Form roles
+ /* Form roles */
g_test_add("/webkit/atk/test_webkit_atk_get_role_form",
AtkRolesFixture, HTML_FORM,
atk_roles_fixture_setup,
@@ -415,7 +414,6 @@ int main(int argc, char** argv)
atk_roles_fixture_setup,
test_webkit_atk_get_role_radio_button,
atk_roles_fixture_teardown);
- */
return g_test_run();
}
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index def41cd..bd3538c 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -1440,23 +1440,36 @@ static AtkObject* webkit_web_view_get_accessible(GtkWidget* widget)
{
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
if (!core(webView))
- return NULL;
+ return 0;
AXObjectCache::enableAccessibility();
Frame* coreFrame = core(webView)->mainFrame();
if (!coreFrame)
- return NULL;
+ return 0;
Document* doc = coreFrame->document();
if (!doc)
- return NULL;
+ return 0;
+
+ AccessibilityObject* rootAccessible = doc->axObjectCache()->rootObject();
+ if (!rootAccessible)
+ return 0;
+
+ // We need to return the root accessibility object's first child
+ // to get to the actual ATK Object associated with the web view.
+ // See https://bugs.webkit.org/show_bug.cgi?id=51932
+ AtkObject* axRoot = rootAccessible->wrapper();
+ if (!axRoot || !ATK_IS_OBJECT(axRoot))
+ return 0;
- AccessibilityObject* coreAccessible = doc->axObjectCache()->rootObject();
- if (!coreAccessible || !coreAccessible->wrapper())
- return NULL;
+ AtkObject* axWebView = atk_object_ref_accessible_child(ATK_OBJECT(axRoot), 0);
+ if (!axWebView || !ATK_IS_OBJECT(axWebView))
+ return 0;
- return coreAccessible->wrapper();
+ // We don't want the extra reference returned by ref_accessible_child.
+ g_object_unref(axWebView);
+ return axWebView;
}
static gdouble webViewGetDPI(WebKitWebView* webView)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list