2009-10-07 Xan Lopez <xlopez@igalia.com>
authorxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Oct 2009 10:36:44 +0000 (10:36 +0000)
committerxan@webkit.org <xan@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Oct 2009 10:36:44 +0000 (10:36 +0000)
        Reviewed by Gustavo Noronha.

        getChildrenWithRange expects as last parameter the end index, not
        the length of the range. Correct this and clarify the variable
        names to reflect how the code works.

        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
        (AccessibilityUIElement::getChildrenWithRange):
        (AccessibilityUIElement::getChildAtIndex):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@49235 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp

index c33303a..43554f4 100644 (file)
@@ -1,3 +1,15 @@
+2009-10-07  Xan Lopez  <xlopez@igalia.com>
+
+        Reviewed by Gustavo Noronha.
+
+        getChildrenWithRange expects as last parameter the end index, not
+        the length of the range. Correct this and clarify the variable
+        names to reflect how the code works.
+
+        * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+        (AccessibilityUIElement::getChildrenWithRange):
+        (AccessibilityUIElement::getChildAtIndex):
+
 2009-10-06  Mark Rowe  <mrowe@apple.com>
 
         Reviewed by Simon Fraser.
index c35299c..9aa31a8 100644 (file)
@@ -67,9 +67,9 @@ void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& childre
     }
 }
 
-void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned location, unsigned length)
+void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned start, unsigned end)
 {
-    for (unsigned i = location; i < length; i++) {
+    for (unsigned i = start; i < end; i++) {
         AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
         elementVector.append(AccessibilityUIElement(child));
     }
@@ -94,7 +94,7 @@ AccessibilityUIElement AccessibilityUIElement::elementAtPoint(int x, int y)
 AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
 {
     Vector<AccessibilityUIElement> children;
-    getChildrenWithRange(children, index, 1);
+    getChildrenWithRange(children, index, index + 1);
 
     if (children.size() == 1)
         return children.at(0);