| Index: content/browser/accessibility/browser_accessibility_gtk.cc
|
| diff --git a/content/browser/accessibility/browser_accessibility_gtk.cc b/content/browser/accessibility/browser_accessibility_gtk.cc
|
| index faf4c82e307830f3f42715050b7f2a43271b6887..f1266c4b8ef22974a997accc06332135c50f00e0 100644
|
| --- a/content/browser/accessibility/browser_accessibility_gtk.cc
|
| +++ b/content/browser/accessibility/browser_accessibility_gtk.cc
|
| @@ -208,6 +208,10 @@ static gint browser_accessibility_get_n_children(AtkObject* atk_object) {
|
| BrowserAccessibilityGtk* obj = ToBrowserAccessibilityGtk(atk_object);
|
| if (!obj)
|
| return 0;
|
| +
|
| + if (obj->IsLeaf())
|
| + return 0;
|
| +
|
| return obj->children().size();
|
| }
|
|
|
| @@ -216,6 +220,13 @@ static AtkObject* browser_accessibility_ref_child(
|
| BrowserAccessibilityGtk* obj = ToBrowserAccessibilityGtk(atk_object);
|
| if (!obj)
|
| return NULL;
|
| +
|
| + if (obj->IsLeaf())
|
| + return NULL;
|
| +
|
| + if (index < 0 || index >= static_cast<gint>(obj->children().size()))
|
| + return NULL;
|
| +
|
| AtkObject* result =
|
| obj->children()[index]->ToBrowserAccessibilityGtk()->GetAtkObject();
|
| g_object_ref(result);
|
|
|