Changeset 140095 in webkit


Ignore:
Timestamp:
Jan 17, 2013 7:46:37 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

REGRESSION (r139444): Crashes in three accessibility tests on GTK
https://bugs.webkit.org/show_bug.cgi?id=106922

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2013-01-17
Reviewed by Chris Fleizach.

Source/WebCore:

r139444 exposed an infinite loop that was just waiting to happen.
Currently, getting the role value of an ARIA table row involves
getting the parent table via parentObjectUnignored() which in turn
can lead to the role value of the table row being checked. Moving
the roleValue() logic to determineAccessibilityRole() avoids this.

This fix, however, introduced a regression when an accessible row
was examined without having first examined the parent table for
non-ARIA tables. Now that it is safe to call parentObjectUnignored(),
the parentTable() method used for ARIA table rows can also be used
by non-ARIA table rows.

No new tests; instead unskipped the three crashing tests.

  • accessibility/AccessibilityTableRow.cpp:

(WebCore::AccessibilityTableRow::determineAccessibilityRole):

  • accessibility/AccessibilityTableRow.h:

(AccessibilityTableRow):

LayoutTests:

  • platform/gtk/TestExpectations: Unskipped the three failing tests
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140090 r140095  
     12013-01-17  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        REGRESSION (r139444): Crashes in three accessibility tests on GTK
     4        https://bugs.webkit.org/show_bug.cgi?id=106922
     5
     6        Reviewed by Chris Fleizach.
     7
     8        * platform/gtk/TestExpectations: Unskipped the three failing tests
     9
    1102013-01-17  Elliott Sprehn  <esprehn@chromium.org>
    211
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r140006 r140095  
    484484webkit.org/b/105689 [ Debug ] plugins/npruntime/embed-property-iframe-equality.html [ Crash ]
    485485
    486 webkit.org/b/106922 accessibility/aria-tables.html [ Crash ]
    487 webkit.org/b/106922 accessibility/aria-hidden-with-elements.html [ Crash ]
    488 webkit.org/b/106922 platform/gtk/accessibility/aria-table-hierarchy.html [ Crash ]
    489486
    490487#////////////////////////////////////////////////////////////////////////////////////////
  • trunk/Source/WebCore/ChangeLog

    r140094 r140095  
     12013-01-17  Joanmarie Diggs  <jdiggs@igalia.com>
     2
     3        REGRESSION (r139444): Crashes in three accessibility tests on GTK
     4        https://bugs.webkit.org/show_bug.cgi?id=106922
     5
     6        Reviewed by Chris Fleizach.
     7
     8        r139444 exposed an infinite loop that was just waiting to happen.
     9        Currently, getting the role value of an ARIA table row involves
     10        getting the parent table via parentObjectUnignored() which in turn
     11        can lead to the role value of the table row being checked. Moving
     12        the roleValue() logic to determineAccessibilityRole() avoids this.
     13
     14        This fix, however, introduced a regression when an accessible row
     15        was examined without having first examined the parent table for
     16        non-ARIA tables. Now that it is safe to call parentObjectUnignored(),
     17        the parentTable() method used for ARIA table rows can also be used
     18        by non-ARIA table rows.
     19
     20        No new tests; instead unskipped the three crashing tests.
     21
     22        * accessibility/AccessibilityTableRow.cpp:
     23        (WebCore::AccessibilityTableRow::determineAccessibilityRole):
     24        * accessibility/AccessibilityTableRow.h:
     25        (AccessibilityTableRow):
     26
    1272013-01-17  Rik Cabanier  <cabanier@adobe.com>
    228
  • trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.cpp

    r123428 r140095  
    119119}
    120120   
    121 AccessibilityObject* AccessibilityARIAGridRow::parentTable() const
    122 {
    123     AccessibilityObject* parent = parentObjectUnignored();
    124     if (!parent->isAccessibilityTable())
    125         return 0;
    126    
    127     return parent;
    128 }
    129 
    130121AccessibilityObject* AccessibilityARIAGridRow::headerObject()
    131122{
  • trunk/Source/WebCore/accessibility/AccessibilityARIAGridRow.h

    r124582 r140095  
    4646   
    4747    virtual AccessibilityObject* headerObject();
    48     virtual AccessibilityObject* parentTable() const;   
    4948   
    5049private:
  • trunk/Source/WebCore/accessibility/AccessibilityTableRow.cpp

    r123428 r140095  
    6060}
    6161
    62 AccessibilityRole AccessibilityTableRow::roleValue() const
     62AccessibilityRole AccessibilityTableRow::determineAccessibilityRole()
    6363{
    6464    if (!isTableRow())
    65         return AccessibilityRenderObject::roleValue();
    66    
     65        return AccessibilityRenderObject::determineAccessibilityRole();
     66
     67    m_ariaRole = determineAriaRoleAttribute();
     68
     69    AccessibilityRole ariaRole = ariaRoleAttribute();
     70    if (ariaRole != UnknownRole)
     71        return ariaRole;
     72
    6773    return RowRole;
    6874}
     
    99105AccessibilityObject* AccessibilityTableRow::parentTable() const
    100106{
    101     if (!m_renderer || !m_renderer->isTableRow())
     107    AccessibilityObject* parent = parentObjectUnignored();
     108    if (!parent || !parent->isAccessibilityTable())
    102109        return 0;
    103110   
    104     // Do not use getOrCreate. parentTable() can be called while the render tree is being modified.
    105     return axObjectCache()->get(toRenderTableRow(m_renderer)->table());
     111    return parent;
    106112}
    107113   
  • trunk/Source/WebCore/accessibility/AccessibilityTableRow.h

    r124582 r140095  
    4343   
    4444    virtual bool isTableRow() const;
    45     virtual AccessibilityRole roleValue() const;
    4645    virtual bool accessibilityIsIgnored() const;
    4746
     
    5756    void appendChild(AccessibilityObject*);
    5857   
     58protected:
     59    virtual AccessibilityRole determineAccessibilityRole();
     60
    5961private:
    6062    int m_rowIndex;
Note: See TracChangeset for help on using the changeset viewer.