Changeset 50342 in webkit


Ignore:
Timestamp:
Oct 30, 2009 10:35:12 AM (15 years ago)
Author:
eric@webkit.org
Message:

2009-10-30 Alexander Pavlov <apavlov@chromium.org>

Reviewed by Timothy Hatcher.

Fix Web Inspector crash on the errors/warnings counter click

RenderObject::createVisiblePosition(const Position& position)
understands "null Positions", so we can construct such a Position manually.

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

  • rendering/RenderBox.cpp: (WebCore::RenderBox::positionForPoint):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r50341 r50342  
    1212        * rendering/RenderBox.cpp:
    1313        (WebCore::RenderBox::positionForPoint):
     14
     152009-10-30  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
     16
     17        Reviewed by Xan Lopez.
     18
     19        https://bugs.webkit.org/show_bug.cgi?id=25534
     20        [GTK] Objects of ROLE_TABLE should implement the accessible table interface
     21
     22        Third part of the implementation of AtkTable.
     23
     24        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
     25        (nameFromChildren):
     26        (webkit_accessible_get_name):
     27        New convenience function to construct an object's name using the name(s) of
     28        any children it has.
     29
     30        (atk_table_interface_init):
     31        (webkit_accessible_table_get_column_description):
     32        (webkit_accessible_table_get_row_description):
     33        Implemented.
     34
     35        (webkit_accessible_table_get_column_header):
     36        Stub function added so that webkit_accessible_table_get_column_description
     37        could be implemented in the meantime.
    1438
    15392009-10-30  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
  • trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp

    r50339 r50342  
    138138}
    139139
     140static const gchar* nameFromChildren(AccessibilityObject* object)
     141{
     142    if (!object)
     143        return 0;
     144
     145    AccessibilityRenderObject::AccessibilityChildrenVector children = object->children();
     146    // Currently, object->stringValue() should be an empty String. This might not be the case down the road.
     147    String name = object->stringValue();
     148    for (unsigned i = 0; i < children.size(); ++i)
     149        name += children.at(i).get()->stringValue();
     150    return returnString(name);
     151}
     152
    140153static const gchar* webkit_accessible_get_name(AtkObject* object)
    141154{
     
    144157        AccessibilityRenderObject* renderObject = static_cast<AccessibilityRenderObject*>(coreObject);
    145158        AccessibilityObject* label = renderObject->correspondingLabelForControlElement();
    146         if (label) {
    147             AccessibilityRenderObject::AccessibilityChildrenVector children = label->children();
    148             // Currently, label->stringValue() should be an empty String. This
    149             // might not be the case down the road.
    150             String name = label->stringValue();
    151             for (unsigned i = 0; i < children.size(); ++i)
    152                 name += children.at(i).get()->stringValue();
    153             return returnString(name);
    154         }
     159        if (label)
     160            return returnString(nameFromChildren(label));
    155161    }
    156162    return returnString(coreObject->stringValue());
     
    13281334}
    13291335
     1336static AtkObject* webkit_accessible_table_get_column_header(AtkTable* table, gint column)
     1337{
     1338    // FIXME: This needs to be implemented.
     1339    notImplemented();
     1340    return 0;
     1341}
     1342
    13301343static AtkObject* webkit_accessible_table_get_row_header(AtkTable* table, gint row)
    13311344{
     
    13591372}
    13601373
     1374static const gchar* webkit_accessible_table_get_column_description(AtkTable* table, gint column)
     1375{
     1376    AtkObject* columnHeader = atk_table_get_column_header(table, column);
     1377    if (columnHeader)
     1378        return returnString(nameFromChildren(core(columnHeader)));
     1379
     1380    return 0;
     1381}
     1382
     1383static const gchar* webkit_accessible_table_get_row_description(AtkTable* table, gint row)
     1384{
     1385    AtkObject* rowHeader = atk_table_get_row_header(table, row);
     1386    if (rowHeader)
     1387        return returnString(nameFromChildren(core(rowHeader)));
     1388
     1389    return 0;
     1390}
     1391
    13611392static void atk_table_interface_init(AtkTableIface* iface)
    13621393{
     
    13691400    iface->get_column_extent_at = webkit_accessible_table_get_column_extent_at;
    13701401    iface->get_row_extent_at = webkit_accessible_table_get_row_extent_at;
     1402    iface->get_column_header = webkit_accessible_table_get_column_header;
    13711403    iface->get_row_header = webkit_accessible_table_get_row_header;
    13721404    iface->get_caption = webkit_accessible_table_get_caption;
     1405    iface->get_column_description = webkit_accessible_table_get_column_description;
     1406    iface->get_row_description = webkit_accessible_table_get_row_description;
    13731407}
    13741408
Note: See TracChangeset for help on using the changeset viewer.