[GTK] accessibility/aria-labelledby-overrides-label.html requires a proper baseline
https://bugs.webkit.org/show_bug.cgi?id=105638

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2013-01-09
Reviewed by Martin Robinson.

The test was failing for two reasons:
- AccessibilityRenderObject::correspondingLabelForControlElement() was
  not ignoring the ARIA labelled-by property
- AccessibilityController::accessibleElementById() was not implemented

Because getting an element by ID cannot be done in the UIProcess, the
decision was made to expose the element's ID as an accessible attribute
of the object.

In addition, fixing the bug in AccessibilityRenderObject made it possible
to eliminate the Gtk platform-specific expectations for another test.

Source/WebCore:

No new tests; instead, the failing test was unskipped and a proper baseline
provided.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
Return null for objects where hasTextAlternative() is true.
* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes): Expose the element's ID as an accessible
attribute.

Tools:

* DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
(childElementById): Added. Walks the tree looking for the AtkObject
Attribute which exposes the HTML element's ID.
(AccessibilityController::accessibleElementById): Implemented.
* DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
(AccessibilityUIElement::title): Modified to print out "AXTitle: " even
when there is no title, as is done with the Mac port.
* WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
(WTR):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
(WTR::childElementById): Added. Walks the tree looking for the AtkObject
Attribute which exposes the HTML element's ID.
(WTR):
(WTR::AccessibilityController::accessibleElementById): Implemented.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::title): Modified to print out "AXTitle: "
even when there is no title, as is done with the Mac port.

LayoutTests:

* accessibility/aria-labelledby-overrides-label-expected.txt: Added.
* accessibility/radio-button-title-label-expected.txt: Modified based on
null check which was added and which gets included in the test output.
* accessibility/radio-button-title-label.html: Check to see that we have
a titleUIElement before attempting to get its title.
* platform/gtk/TestExpectations: Unskipped the previously failing test.
* platform/gtk/accessibility/radio-button-title-label-expected.txt: Removed.

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