Changeset 142385 in webkit


Ignore:
Timestamp:
Feb 9, 2013 10:11:14 PM (11 years ago)
Author:
dmazzoni@google.com
Message:

fast/encoding/parser-tests-*.html tests sometimes crash
https://bugs.webkit.org/show_bug.cgi?id=108058

Reviewed by Chris Fleizach.

Source/WebCore:

To avoid calling accessibilityIsIgnored while the render
tree is unstable, call accessibilityIsIgnored in the
notification timer handler, only for childrenChanged
notifications.

This exposed a problem where notifications queued on
objects can fire after the object has been deleted; fix that
by checking the object's id, which is always set to 0 when
removed from the tree.

Covered by existing tests.

  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::childrenChanged):
(WebCore::AXObjectCache::notificationPostTimerFired):

LayoutTests:

Make test less brittle by (1) giving the iframe an aria-role so
it's never ignored, and (2) using accessibilityElementById instead
of assuming an element is in a specific place in the AX tree.

  • accessibility/loading-iframe-updates-axtree.html:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r142380 r142385  
     12013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
     2
     3        fast/encoding/parser-tests-*.html tests sometimes crash
     4        https://bugs.webkit.org/show_bug.cgi?id=108058
     5
     6        Reviewed by Chris Fleizach.
     7
     8        Make test less brittle by (1) giving the iframe an aria-role so
     9        it's never ignored, and (2) using accessibilityElementById instead
     10        of assuming an element is in a specific place in the AX tree.
     11
     12        * accessibility/loading-iframe-updates-axtree.html:
     13
    1142013-02-09  Stephen Chenney  <schenney@chromium.org>
    215
  • trunk/LayoutTests/accessibility/loading-iframe-updates-axtree.html

    r120111 r142385  
    1212
    1313        if (window.accessibilityController) {
    14             window.root = accessibilityController.rootElement;
    15             window.body = root.childAtIndex(0);
    16             window.iframe = body.childAtIndex(1).childAtIndex(0);
     14            window.iframe = accessibilityController.accessibleElementById('iframe');
    1715            window.scrollarea = iframe.childAtIndex(0);
    1816            window.subwebarea = scrollarea.childAtIndex(0);
     
    2220        iframeElement.addEventListener("load", function() {
    2321            if (window.accessibilityController) {
    24                 window.newIframe = body.childAtIndex(1).childAtIndex(0);
     22                window.newIframe = accessibilityController.accessibleElementById('iframe');
    2523                window.newScrollarea = newIframe.childAtIndex(0);
    2624                window.newSubwebarea = newScrollarea.childAtIndex(0);
     
    5452<p>Before</p>
    5553
    56 <iframe id="iframe"></iframe>
     54<iframe id="iframe" role="group"></iframe>
    5755
    5856<p>After</p>
  • trunk/Source/WebCore/ChangeLog

    r142383 r142385  
     12013-02-09  Dominic Mazzoni  <dmazzoni@google.com>
     2
     3        fast/encoding/parser-tests-*.html tests sometimes crash
     4        https://bugs.webkit.org/show_bug.cgi?id=108058
     5
     6        Reviewed by Chris Fleizach.
     7
     8        To avoid calling accessibilityIsIgnored while the render
     9        tree is unstable, call accessibilityIsIgnored in the
     10        notification timer handler, only for childrenChanged
     11        notifications.
     12
     13        This exposed a problem where notifications queued on
     14        objects can fire after the object has been deleted; fix that
     15        by checking the object's id, which is always set to 0 when
     16        removed from the tree.
     17
     18        Covered by existing tests.
     19
     20        * accessibility/AXObjectCache.cpp:
     21        (WebCore::AXObjectCache::childrenChanged):
     22        (WebCore::AXObjectCache::notificationPostTimerFired):
     23
    1242013-02-09  Eric Carlson  <eric.carlson@apple.com>
    225
  • trunk/Source/WebCore/accessibility/AXObjectCache.cpp

    r142368 r142385  
    617617
    618618    obj->childrenChanged();
    619 
    620     if (obj->parentObjectIfExists() && obj->lastKnownIsIgnoredValue() != obj->accessibilityIsIgnored())
    621         childrenChanged(obj->parentObject());
    622619}
    623620   
     
    631628    for (i = 0; i < count; ++i) {
    632629        AccessibilityObject* obj = m_notificationsToPost[i].first.get();
     630        if (!obj->axObjectID())
     631            continue;
     632
    633633#ifndef NDEBUG
    634634        // Make sure none of the render views are in the process of being layed out.
     
    642642#endif
    643643       
    644         postPlatformNotification(obj, m_notificationsToPost[i].second);
     644        AXNotification notification = m_notificationsToPost[i].second;
     645        postPlatformNotification(obj, notification);
     646
     647        if (notification == AXChildrenChanged && obj->parentObjectIfExists() && obj->lastKnownIsIgnoredValue() != obj->accessibilityIsIgnored())
     648            childrenChanged(obj->parentObject());
    645649    }
    646650   
Note: See TracChangeset for help on using the changeset viewer.