Title: [142385] trunk
Revision
142385
Author
[email protected]
Date
2013-02-09 22:11:14 -0800 (Sat, 09 Feb 2013)

Log 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:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (142384 => 142385)


--- trunk/LayoutTests/ChangeLog	2013-02-10 03:48:27 UTC (rev 142384)
+++ trunk/LayoutTests/ChangeLog	2013-02-10 06:11:14 UTC (rev 142385)
@@ -1,3 +1,16 @@
+2013-02-09  Dominic Mazzoni  <[email protected]>
+
+        fast/encoding/parser-tests-*.html tests sometimes crash
+        https://bugs.webkit.org/show_bug.cgi?id=108058
+
+        Reviewed by Chris Fleizach.
+
+        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:
+
 2013-02-09  Stephen Chenney  <[email protected]>
 
         [Chromium] Reverting earlier change now

Modified: trunk/LayoutTests/accessibility/loading-iframe-updates-axtree.html (142384 => 142385)


--- trunk/LayoutTests/accessibility/loading-iframe-updates-axtree.html	2013-02-10 03:48:27 UTC (rev 142384)
+++ trunk/LayoutTests/accessibility/loading-iframe-updates-axtree.html	2013-02-10 06:11:14 UTC (rev 142385)
@@ -11,9 +11,7 @@
         description("This tests that if an iframe loads new content after its accessibility object has already been accessed, the iframe accessibility object's descendants are the new scroll area and web area, not the old deleted ones.");
 
         if (window.accessibilityController) {
-            window.root = accessibilityController.rootElement;
-            window.body = root.childAtIndex(0);
-            window.iframe = body.childAtIndex(1).childAtIndex(0);
+            window.iframe = accessibilityController.accessibleElementById('iframe');
             window.scrollarea = iframe.childAtIndex(0);
             window.subwebarea = scrollarea.childAtIndex(0);
         }
@@ -21,7 +19,7 @@
         window.iframeElement = document.getElementById("iframe");
         iframeElement.addEventListener("load", function() {
             if (window.accessibilityController) {
-                window.newIframe = body.childAtIndex(1).childAtIndex(0);
+                window.newIframe = accessibilityController.accessibleElementById('iframe');
                 window.newScrollarea = newIframe.childAtIndex(0);
                 window.newSubwebarea = newScrollarea.childAtIndex(0);
 
@@ -53,7 +51,7 @@
 
 <p>Before</p>
 
-<iframe id="iframe"></iframe>
+<iframe id="iframe" role="group"></iframe>
 
 <p>After</p>
 

Modified: trunk/Source/WebCore/ChangeLog (142384 => 142385)


--- trunk/Source/WebCore/ChangeLog	2013-02-10 03:48:27 UTC (rev 142384)
+++ trunk/Source/WebCore/ChangeLog	2013-02-10 06:11:14 UTC (rev 142385)
@@ -1,3 +1,26 @@
+2013-02-09  Dominic Mazzoni  <[email protected]>
+
+        fast/encoding/parser-tests-*.html tests sometimes crash
+        https://bugs.webkit.org/show_bug.cgi?id=108058
+
+        Reviewed by Chris Fleizach.
+
+        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):
+
 2013-02-09  Eric Carlson  <[email protected]>
 
         [Mac] Do not assume MediaAccessibility framework is installed

Modified: trunk/Source/WebCore/accessibility/AXObjectCache.cpp (142384 => 142385)


--- trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2013-02-10 03:48:27 UTC (rev 142384)
+++ trunk/Source/WebCore/accessibility/AXObjectCache.cpp	2013-02-10 06:11:14 UTC (rev 142385)
@@ -616,9 +616,6 @@
         return;
 
     obj->childrenChanged();
-
-    if (obj->parentObjectIfExists() && obj->lastKnownIsIgnoredValue() != obj->accessibilityIsIgnored())
-        childrenChanged(obj->parentObject());
 }
     
 void AXObjectCache::notificationPostTimerFired(Timer<AXObjectCache>*)
@@ -630,6 +627,9 @@
     unsigned i = 0, count = m_notificationsToPost.size();
     for (i = 0; i < count; ++i) {
         AccessibilityObject* obj = m_notificationsToPost[i].first.get();
+        if (!obj->axObjectID())
+            continue;
+
 #ifndef NDEBUG
         // Make sure none of the render views are in the process of being layed out.
         // Notifications should only be sent after the renderer has finished
@@ -641,7 +641,11 @@
         }
 #endif
         
-        postPlatformNotification(obj, m_notificationsToPost[i].second);
+        AXNotification notification = m_notificationsToPost[i].second;
+        postPlatformNotification(obj, notification);
+
+        if (notification == AXChildrenChanged && obj->parentObjectIfExists() && obj->lastKnownIsIgnoredValue() != obj->accessibilityIsIgnored())
+            childrenChanged(obj->parentObject());
     }
     
     m_notificationsToPost.clear();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to