Skip to content

Commit

Permalink
Merge r243864 - [ATK] Wrong index passed to AtkObject::children-chang…
Browse files Browse the repository at this point in the history
…ed::add signal in AXObjectCache::attachWrapper()

https://bugs.webkit.org/show_bug.cgi?id=196538

Reviewed by Michael Catanzaro.

In most of the cases the parent is not found, probably because the child is not a direct descendant of the
parent returned by parentObjectUnignored(). We need to handle the case of find() returning notFound.

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::attachWrapper): Use -1 as the index when find() returns notFound.
  • Loading branch information
carlosgcampos committed May 9, 2019
1 parent 4ff3d26 commit ba4aa54
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
2019-04-03 Carlos Garcia Campos <cgarcia@igalia.com>

[ATK] Wrong index passed to AtkObject::children-changed::add signal in AXObjectCache::attachWrapper()
https://bugs.webkit.org/show_bug.cgi?id=196538

Reviewed by Michael Catanzaro.

In most of the cases the parent is not found, probably because the child is not a direct descendant of the
parent returned by parentObjectUnignored(). We need to handle the case of find() returning notFound.

* accessibility/atk/AXObjectCacheAtk.cpp:
(WebCore::AXObjectCache::attachWrapper): Use -1 as the index when find() returns notFound.

2019-04-03 Myles C. Maxfield <mmaxfield@apple.com>

Documents can be destroyed before their CSSFontFaceSet is destroyed
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp
Expand Up @@ -99,7 +99,7 @@ void AXObjectCache::attachWrapper(AccessibilityObject* obj)
return;

size_t index = coreParent->children(false).find(obj);
g_signal_emit_by_name(atkParent, "children-changed::add", index, atkObj);
g_signal_emit_by_name(atkParent, "children-changed::add", index != notFound ? index : -1, atkObj);
}

static AccessibilityObject* getListObject(AccessibilityObject* object)
Expand Down

0 comments on commit ba4aa54

Please sign in to comment.