Changeset 158757 in webkit


Ignore:
Timestamp:
Nov 6, 2013 10:17:03 AM (11 years ago)
Author:
Michał Pakuła vel Rutka
Message:

[ATK] accessibility/title-ui-element-correctness.html fails
https://bugs.webkit.org/show_bug.cgi?id=99825

Reviewed by Mario Sanchez Prada.

Source/WebCore:

When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
is added, adding proper label element as a relation. When the document structure
has been changed and a different label should be linked as a relation, current ATK
implementation adds it as a next target on relation's target list, while
WTR/DumpRenderTree implementation takes only first one into account.
This patch adds a new function removing current relations before adding new ones.

Covered by existing tests.

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(removeAtkRelationFromRelationSetByType):
(setAtkRelationSetFromCoreObject):

LayoutTests:

Remove failure test expectation for the test fixed by this patch.

  • platform/efl-wk1/TestExpectations:
  • platform/efl-wk2/TestExpectations:
  • platform/gtk/TestExpectations:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r158755 r158757  
     12013-11-06  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
     2
     3        [ATK] accessibility/title-ui-element-correctness.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=99825
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Remove failure test expectation for the test fixed by this patch.
     9
     10        * platform/efl-wk1/TestExpectations:
     11        * platform/efl-wk2/TestExpectations:
     12        * platform/gtk/TestExpectations:
     13
    1142013-11-06  Mario Sanchez Prada  <mario.prada@samsung.com>
    215
  • trunk/LayoutTests/platform/efl-wk1/TestExpectations

    r158754 r158757  
    132132webkit.org/b/112014 accessibility/textarea-insertion-point-line-number.html [ Failure ]
    133133webkit.org/b/112018 accessibility/th-as-title-ui.html [ Failure ]
    134 webkit.org/b/112019 accessibility/title-ui-element-correctness.html [ Failure ]
    135134webkit.org/b/112021 accessibility/visible-elements.html [ Failure Crash ]
    136135
  • trunk/LayoutTests/platform/efl-wk2/TestExpectations

    r158754 r158757  
    164164webkit.org/b/112014 accessibility/textarea-insertion-point-line-number.html [ Failure ]
    165165webkit.org/b/112018 accessibility/th-as-title-ui.html [ Failure ]
    166 webkit.org/b/112019 accessibility/title-ui-element-correctness.html [ Failure ]
    167166webkit.org/b/112021 accessibility/visible-elements.html [ Failure Crash ]
    168167
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r158755 r158757  
    12231223webkit.org/b/98950 transitions/blendmode-transitions.html [ Failure ]
    12241224
    1225 webkit.org/b/99825 accessibility/title-ui-element-correctness.html [ Failure ]
    1226 
    12271225webkit.org/b/98718 svg/animations/animate-css-xml-attributeType.html [ Failure ]
    12281226
  • trunk/Source/WebCore/ChangeLog

    r158750 r158757  
     12013-11-06  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
     2
     3        [ATK] accessibility/title-ui-element-correctness.html fails
     4        https://bugs.webkit.org/show_bug.cgi?id=99825
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        When calling setAtkRelationSetFromCoreObject a new ATK_LABELLED_BY_RELATION
     9        is added, adding proper label element as a relation. When the document structure
     10        has been changed and a different label should be linked as a relation, current ATK
     11        implementation adds it as a next target on relation's target list, while
     12        WTR/DumpRenderTree implementation takes only first one into account.
     13        This patch adds a new function removing current relations before adding new ones.
     14
     15        Covered by existing tests.
     16
     17        * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
     18        (removeAtkRelationFromRelationSetByType):
     19        (setAtkRelationSetFromCoreObject):
     20
    1212013-11-06  Daniel Bates  <dabates@apple.com>
    222
  • trunk/Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp

    r157857 r158757  
    192192}
    193193
     194static void removeAtkRelationByType(AtkRelationSet* relationSet, AtkRelationType relationType)
     195{
     196    int count = atk_relation_set_get_n_relations(relationSet);
     197    for (int i = 0; i < count; i++) {
     198        AtkRelation* relation = atk_relation_set_get_relation(relationSet, i);
     199        if (atk_relation_get_relation_type(relation) == relationType) {
     200            atk_relation_set_remove(relationSet, relation);
     201            break;
     202        }
     203    }
     204}
     205
    194206static void setAtkRelationSetFromCoreObject(AccessibilityObject* coreObject, AtkRelationSet* relationSet)
    195207{
    196208    if (coreObject->isFieldset()) {
    197209        AccessibilityObject* label = coreObject->titleUIElement();
    198         if (label)
     210        if (label) {
     211            removeAtkRelationByType(relationSet, ATK_RELATION_LABELLED_BY);
    199212            atk_relation_set_add_relation_by_type(relationSet, ATK_RELATION_LABELLED_BY, label->wrapper());
     213        }
    200214        return;
    201215    }
     
    213227    if (coreObject->isControl()) {
    214228        AccessibilityObject* label = coreObject->correspondingLabelForControlElement();
    215         if (label)
     229        if (label) {
     230            removeAtkRelationByType(relationSet, ATK_RELATION_LABELLED_BY);
    216231            atk_relation_set_add_relation_by_type(relationSet, ATK_RELATION_LABELLED_BY, label->wrapper());
     232        }
    217233    } else {
    218234        AccessibilityObject* control = coreObject->correspondingControlForLabelElement();
Note: See TracChangeset for help on using the changeset viewer.