Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(773)

Unified Diff: content/browser/accessibility/browser_accessibility_gtk.cc

Issue 25943003: Support accessible inline text boxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..acab43b86e144ce191a4829a8d946931c685ed0d 100644
--- a/content/browser/accessibility/browser_accessibility_gtk.cc
+++ b/content/browser/accessibility/browser_accessibility_gtk.cc
@@ -208,7 +208,8 @@ static gint browser_accessibility_get_n_children(AtkObject* atk_object) {
BrowserAccessibilityGtk* obj = ToBrowserAccessibilityGtk(atk_object);
if (!obj)
return 0;
- return obj->children().size();
+
+ return obj->PlatformChildCount();
}
static AtkObject* browser_accessibility_ref_child(
@@ -216,6 +217,10 @@ static AtkObject* browser_accessibility_ref_child(
BrowserAccessibilityGtk* obj = ToBrowserAccessibilityGtk(atk_object);
if (!obj)
return NULL;
+
+ if (index < 0 || index >= static_cast<gint>(obj->PlatformChildCount()))
+ return NULL;
+
AtkObject* result =
obj->children()[index]->ToBrowserAccessibilityGtk()->GetAtkObject();
g_object_ref(result);

Powered by Google App Engine
This is Rietveld 408576698