Changeset 50134 in webkit


Ignore:
Timestamp:
Oct 27, 2009 2:20:21 AM (14 years ago)
Author:
xan@webkit.org
Message:

2009-10-26 Xan Lopez <xlopez@igalia.com>

Reviewed by Gustavo Noronha.

https://bugs.webkit.org/show_bug.cgi?id=27011
[Gtk] Implement support for get_index_in_parent

Implement atk_object_get_index_in_parent.

  • accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_get_index_in_parent):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r50133 r50134  
     12009-10-26  Xan Lopez  <xlopez@igalia.com>
     2
     3        Reviewed by Gustavo Noronha.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=27011
     6        [Gtk] Implement support for get_index_in_parent
     7
     8        Implement atk_object_get_index_in_parent.
     9
     10        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
     11        (webkit_accessible_get_index_in_parent):
     12
    1132009-10-27  Eric Seidel  <eric@webkit.org>
    214
  • trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp

    r50054 r50134  
    220220static gint webkit_accessible_get_index_in_parent(AtkObject* object)
    221221{
    222     // FIXME: This needs to be implemented.
    223     notImplemented();
     222    AccessibilityObject* coreObject = core(object);
     223    AccessibilityObject* parent = coreObject->parentObjectUnignored();
     224
     225    g_return_val_if_fail(parent, 0);
     226
     227    AccessibilityObject::AccessibilityChildrenVector children = parent->children();
     228    unsigned count = children.size();
     229    for (unsigned i = 0; i < count; ++i) {
     230        if (children[i] == coreObject)
     231            return i;
     232    }
     233
    224234    return 0;
    225235}
Note: See TracChangeset for help on using the changeset viewer.