Changeset 157221 in webkit


Ignore:
Timestamp:
Oct 10, 2013 6:42:48 AM (10 years ago)
Author:
Chris Fleizach
Message:

AX: Crash at WebCore::accessibleNameForNode when visiting Facebook
https://bugs.webkit.org/show_bug.cgi?id=122572

Reviewed by Mario Sanchez Prada.

Source/WebCore:

Test: accessibility/aria-labeled-with-hidden-node.html

Handle the case where aria-labelledby references a non-rendered node.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::accessibleNameForNode):

LayoutTests:

  • accessibility/aria-labeled-with-hidden-node-expected.txt: Added.
  • accessibility/aria-labeled-with-hidden-node.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r157220 r157221  
     12013-10-10  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Crash at WebCore::accessibleNameForNode when visiting Facebook
     4        https://bugs.webkit.org/show_bug.cgi?id=122572
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        * accessibility/aria-labeled-with-hidden-node-expected.txt: Added.
     9        * accessibility/aria-labeled-with-hidden-node.html: Added.
     10
    1112013-10-10  Alberto Garcia  <berto@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r157219 r157221  
     12013-10-10  Chris Fleizach  <cfleizach@apple.com>
     2
     3        AX: Crash at WebCore::accessibleNameForNode when visiting Facebook
     4        https://bugs.webkit.org/show_bug.cgi?id=122572
     5
     6        Reviewed by Mario Sanchez Prada.
     7
     8        Test: accessibility/aria-labeled-with-hidden-node.html
     9
     10        Handle the case where aria-labelledby references a non-rendered node.
     11
     12        * accessibility/AccessibilityNodeObject.cpp:
     13        (WebCore::accessibleNameForNode):
     14
    1152013-10-10  Zan Dobersek  <zdobersek@igalia.com>
    216
  • trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp

    r157183 r157221  
    18041804        return toHTMLInputElement(node)->value();
    18051805   
    1806     String text = node->document().axObjectCache()->getOrCreate(node)->textUnderElement();
     1806    // If the node can be turned into an AX object, we can use standard name computation rules.
     1807    // If however, the node cannot (because there's no renderer e.g.) fallback to using the basic text underneath.
     1808    AccessibilityObject* axObject = node->document().axObjectCache()->getOrCreate(node);
     1809    String text;
     1810    if (axObject)
     1811        text = axObject->textUnderElement();
     1812    else if (node->isElementNode())
     1813        text = toElement(node)->innerText();
     1814   
    18071815    if (!text.isEmpty())
    18081816        return text;
Note: See TracChangeset for help on using the changeset viewer.