[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Wed Apr 7 23:22:13 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 1f5f7fe5bdb39836c539c3123746f348004adfe3
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 4 10:35:56 2009 +0000

    2009-11-04  Joanmarie Diggs  <joanmarie.diggs at gmail.com>
    
            Reviewed by Jan Alonzo.
    
            https://bugs.webkit.org/show_bug.cgi?id=31044
            [Gtk] assertion when webkit_accessible_get_index_in_parent attempts to get parent of the web view
    
            * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
            (atkParentOfWebView):
            (webkit_accessible_get_index_in_parent):
            (webkit_accessible_get_parent):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50509 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cfb89bc..7f51667 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-11-04  Joanmarie Diggs  <joanmarie.diggs at gmail.com>
+
+        Reviewed by Jan Alonzo.
+
+        https://bugs.webkit.org/show_bug.cgi?id=31044
+        [Gtk] assertion when webkit_accessible_get_index_in_parent attempts to get parent of the web view
+
+        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
+        (atkParentOfWebView):
+        (webkit_accessible_get_index_in_parent):
+        (webkit_accessible_get_parent):
+
 2009-11-04  Dominik Röttsches  <dominik.roettsches at access-company.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
index 0d2f4ec..f053a1a 100644
--- a/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
+++ b/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
@@ -201,7 +201,7 @@ static void setAtkRelationSetFromCoreObject(AccessibilityObject* coreObject, Atk
 
 static gpointer webkit_accessible_parent_class = NULL;
 
-static AtkObject* webkit_accessible_get_parent(AtkObject* object)
+static AtkObject* atkParentOfWebView(AtkObject* object)
 {
     AccessibilityObject* coreParent = core(object)->parentObjectUnignored();
 
@@ -221,7 +221,19 @@ static AtkObject* webkit_accessible_get_parent(AtkObject* object)
     }
 
     if (!coreParent)
-        return NULL;
+        return 0;
+
+    return coreParent->wrapper();
+}
+
+static AtkObject* webkit_accessible_get_parent(AtkObject* object)
+{
+    AccessibilityObject* coreParent = core(object)->parentObjectUnignored();
+    if (!coreParent && core(object)->isWebArea())
+        return atkParentOfWebView(object);
+
+    if (!coreParent)
+        return 0;
 
     return coreParent->wrapper();
 }
@@ -255,7 +267,20 @@ static gint webkit_accessible_get_index_in_parent(AtkObject* object)
     AccessibilityObject* coreObject = core(object);
     AccessibilityObject* parent = coreObject->parentObjectUnignored();
 
-    g_return_val_if_fail(parent, 0);
+    if (!parent && core(object)->isWebArea()) {
+        AtkObject* atkParent = atkParentOfWebView(object);
+        if (!atkParent)
+            return -1;
+
+        unsigned count = atk_object_get_n_accessible_children(atkParent);
+        for (unsigned i = 0; i < count; ++i) {
+            AtkObject* child = atk_object_ref_accessible_child(atkParent, i);
+            bool childIsObject = child == object;
+            g_object_unref(child);
+            if (childIsObject)
+                return i;
+        }
+    }
 
     AccessibilityObject::AccessibilityChildrenVector children = parent->children();
     unsigned count = children.size();
@@ -264,7 +289,7 @@ static gint webkit_accessible_get_index_in_parent(AtkObject* object)
             return i;
     }
 
-    return 0;
+    return -1;
 }
 
 static AtkAttributeSet* addAttributeToSet(AtkAttributeSet* attributeSet, const char* name, const char* value)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list