AX: crash when accessing selectedTab in a tab list
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2011 19:08:03 +0000 (19:08 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2011 19:08:03 +0000 (19:08 +0000)
commit26f3dcb24113c14870ff17e5ff8daaced54171f6
tree51d7c8993b4fef404393d378b2eaf3e319ff2ade
parent896e8fb543d73517f5eb90db78baeb8a65406527
AX: crash when accessing selectedTab in a tab list
https://bugs.webkit.org/show_bug.cgi?id=70938

Reviewed by Beth Dakin.

Source/WebCore:

There were a few methods accessing m_children directly without first validating that those elements
needed to be updated (because the layout changed). Changing those to call children() ensures
that they will have the correct children.

Test: platform/mac/accessibility/selected-tab-crash.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isChecked):
(WebCore::AccessibilityRenderObject::selectedRadioButton):
(WebCore::AccessibilityRenderObject::selectedTabItem):
(WebCore::AccessibilityRenderObject::ariaListboxVisibleChildren):
(WebCore::AccessibilityRenderObject::tabChildren):

Tools:

Add the ability to retrieve an element through an arbitrary attribute.

* DumpRenderTree/AccessibilityUIElement.cpp:
(uiElementAttributeValueCallback):
(AccessibilityUIElement::uiElementAttributeValue):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::uiElementAttributeValue):

LayoutTests:

* platform/mac/accessibility/selected-tab-crash-expected.txt: Added.
* platform/mac/accessibility/selected-tab-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/accessibility/selected-tab-crash-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/accessibility/selected-tab-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityRenderObject.cpp
Tools/ChangeLog
Tools/DumpRenderTree/AccessibilityUIElement.cpp
Tools/DumpRenderTree/AccessibilityUIElement.h
Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm