AX: Recursive crash at WebCore::accessibleNameForNode
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Dec 2014 23:51:26 +0000 (23:51 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Dec 2014 23:51:26 +0000 (23:51 +0000)
commitacb64a47037a83a3f8d9b5d80296109719117c90
tree02e38ebd43c3e351c453f9e5f2ddc62f70dc91f6
parentd0352e1a6cc901e294f36012586197d84470826a
AX: Recursive crash at WebCore::accessibleNameForNode
https://bugs.webkit.org/show_bug.cgi?id=139616

Reviewed by Mario Sanchez Prada.

Source/WebCore:

An image that uses aria-labelledby to reference its own parent can lead to a recursion crash.
There needs to be some information we can pass through these methods to ensure we don't hit this case.

Test: accessibility/accessibility-description-crash.html

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::alternativeText):
(WebCore::AccessibilityNodeObject::textUnderElement):
(WebCore::accessibleNameForNode):
(WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):

LayoutTests:

* accessibility/accessibility-description-crash-expected.txt: Added.
* accessibility/accessibility-description-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@177537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/accessibility/AccessibilityNodeObject.cpp
Source/WebCore/accessibility/AccessibilityObject.h