haikuwebkit/LayoutTests/accessibility/loading-iframe-updates-axtr...

68 lines
2.2 KiB
HTML
Raw Permalink Normal View History

New iframe content may not be reflected in the ax tree. https://bugs.webkit.org/show_bug.cgi?id=72100 Reviewed by Chris Fleizach. Source/WebCore: The core issue was that when childrenChanged was called on a web area from an iframe that was just detached, it wasn't calling childrenChanged on its parent scroll area, or that scroll area's parent iframe element. To fix this, now AccessibilityScrollView implements setNeedsToUpdateChildren and parentObjectIfExists, and childrenChanged calls setNeedsToUpdateChildren on every object in the parent chain, not just AccessibilityRenderObjects. Test: accessibility/loading-iframe-updates-axtree.html * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setNeedsToUpdateChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObjectIfExists): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::setNeedsToUpdateChildren): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::AccessibilityScrollView): (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::setNeedsToUpdateChildren): LayoutTests: Add new test that makes sure that if you explore the accessibility tree of an iframe and that iframe subsequently loads new content, the iframe AccessibilityObject's descendants are updated to point to the new content, not the old content. * accessibility/loading-iframe-updates-axtree-expected.txt: Added. * accessibility/loading-iframe-updates-axtree.html: Added. Canonical link: https://commits.webkit.org/88614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-12 02:23:09 +00:00
<html>
<head>
Many accessibility js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172372 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt: * accessibility/anonymous-render-block-in-continuation-causes-crash.html: * accessibility/aria-checkbox-sends-notification.html: * accessibility/aria-invalid.html: * accessibility/aria-switch-sends-notification.html: * accessibility/deleting-iframe-destroys-axcache.html: * accessibility/file-upload-button-with-axpress.html: * accessibility/frame-disconnect-textmarker-cache-crash-expected.txt: * accessibility/frame-disconnect-textmarker-cache-crash.html: * accessibility/gtk/aria-listbox-crash.html: * accessibility/heading-title-includes-links-expected.txt: * accessibility/heading-title-includes-links.html: * accessibility/image-map-update-parent-crash-expected.txt: * accessibility/image-map-update-parent-crash.html: * accessibility/insert-children-assert-expected.txt: * accessibility/insert-children-assert.html: * accessibility/ios-simulator/focus-change-notifications.html: * accessibility/label-element-press.html: * accessibility/loading-iframe-updates-axtree.html: * accessibility/mac/aria-expanded-notifications.html: * accessibility/mac/aria-listbox-selectedchildren-change.html: * accessibility/mac/aria-liveregion-on-image.html: * accessibility/mac/aria-liveregions-addedelement.html: * accessibility/mac/aria-liveregions-changedalt.html: * accessibility/mac/aria-liveregions-changedtext.html: * accessibility/mac/aria-liveregions-removedelement.html: * accessibility/mac/combobox-activedescendant-notifications-expected.txt: * accessibility/mac/combobox-activedescendant-notifications.html: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html: * accessibility/mac/html-slider-indicator.html: * accessibility/mac/input-replacevalue-userinfo-expected.txt: * accessibility/mac/input-replacevalue-userinfo.html: * accessibility/mac/ordered-textmarker-crash-expected.txt: * accessibility/mac/ordered-textmarker-crash.html: * accessibility/mac/search-with-frames-expected.txt: * accessibility/mac/search-with-frames.html: * accessibility/mac/selection-boundary-userinfo.html: * accessibility/mac/selection-change-userinfo.html: * accessibility/mac/selection-element-tabbing-to-link.html: * accessibility/mac/selection-value-changes-for-aria-textbox.html: * accessibility/mac/stale-textmarker-crash-expected.txt: * accessibility/mac/stale-textmarker-crash.html: * accessibility/mac/textbox-role-reports-notifications-expected.txt: * accessibility/mac/textbox-role-reports-notifications.html: * accessibility/mac/value-change/value-change-user-info-contenteditable.html: * accessibility/mac/value-change/value-change-user-info-textarea.html: * accessibility/mac/value-change/value-change-user-info-textfield.html: * accessibility/media-element.html: * accessibility/menu-list-sends-change-notification.html: * accessibility/multiselect-list-reports-active-option.html: * accessibility/paragraph-with-linebreaks.html: * accessibility/platform-name.html: * accessibility/radio-button-group-members.html: * accessibility/radio-button-title-label.html: * accessibility/selection-states-expected.txt: * accessibility/selection-states.html: * accessibility/spinbutton-value.html: * accessibility/svg-bounds.html: * accessibility/table-cell-for-column-and-row-crash.html: * accessibility/table-cells-roles.html: * accessibility/table-roles-hierarchy.html: * accessibility/table-with-aria-role.html: * accessibility/textarea-insertion-point-line-number.html: * accessibility/textbox-role-reports-selection.html: * accessibility/title-ui-element-correctness.html: * accessibility/unknown-roles-not-exposed-expected.txt: * accessibility/unknown-roles-not-exposed.html: * accessibility/win/bstr-elements-role.html: * accessibility/win/detached-object-notification-crash.html: * accessibility/win/heading-elements.html: * accessibility/win/img-alt-attribute.html: * accessibility/win/linked-elements.html: * accessibility/win/list-item-role.html: * accessibility/win/list-marker-role.html: * accessibility/win/list-role.html: * accessibility/win/multiple-select-element-role.html: * accessibility/win/option-element-position-and-size.html: * accessibility/win/parent-element.html: * accessibility/win/select-element-role.html: * accessibility/win/selection-and-focus.html: * accessibility/win/single-select-children-changed.html: * accessibility/win/single-select-children.html: * accessibility/win/text-role.html: * platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt: * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/media-element-expected.txt: * platform/mac/accessibility/table-cells-roles-expected.txt: * platform/mac/accessibility/table-roles-hierarchy-expected.txt: Canonical link: https://commits.webkit.org/189300@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 23:37:59 +00:00
<script src="../resources/js-test.js"></script>
New iframe content may not be reflected in the ax tree. https://bugs.webkit.org/show_bug.cgi?id=72100 Reviewed by Chris Fleizach. Source/WebCore: The core issue was that when childrenChanged was called on a web area from an iframe that was just detached, it wasn't calling childrenChanged on its parent scroll area, or that scroll area's parent iframe element. To fix this, now AccessibilityScrollView implements setNeedsToUpdateChildren and parentObjectIfExists, and childrenChanged calls setNeedsToUpdateChildren on every object in the parent chain, not just AccessibilityRenderObjects. Test: accessibility/loading-iframe-updates-axtree.html * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setNeedsToUpdateChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObjectIfExists): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::setNeedsToUpdateChildren): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::AccessibilityScrollView): (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::setNeedsToUpdateChildren): LayoutTests: Add new test that makes sure that if you explore the accessibility tree of an iframe and that iframe subsequently loads new content, the iframe AccessibilityObject's descendants are updated to point to the new content, not the old content. * accessibility/loading-iframe-updates-axtree-expected.txt: Added. * accessibility/loading-iframe-updates-axtree.html: Added. Canonical link: https://commits.webkit.org/88614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-12 02:23:09 +00:00
<script>
Many accessibility js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172372 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt: * accessibility/anonymous-render-block-in-continuation-causes-crash.html: * accessibility/aria-checkbox-sends-notification.html: * accessibility/aria-invalid.html: * accessibility/aria-switch-sends-notification.html: * accessibility/deleting-iframe-destroys-axcache.html: * accessibility/file-upload-button-with-axpress.html: * accessibility/frame-disconnect-textmarker-cache-crash-expected.txt: * accessibility/frame-disconnect-textmarker-cache-crash.html: * accessibility/gtk/aria-listbox-crash.html: * accessibility/heading-title-includes-links-expected.txt: * accessibility/heading-title-includes-links.html: * accessibility/image-map-update-parent-crash-expected.txt: * accessibility/image-map-update-parent-crash.html: * accessibility/insert-children-assert-expected.txt: * accessibility/insert-children-assert.html: * accessibility/ios-simulator/focus-change-notifications.html: * accessibility/label-element-press.html: * accessibility/loading-iframe-updates-axtree.html: * accessibility/mac/aria-expanded-notifications.html: * accessibility/mac/aria-listbox-selectedchildren-change.html: * accessibility/mac/aria-liveregion-on-image.html: * accessibility/mac/aria-liveregions-addedelement.html: * accessibility/mac/aria-liveregions-changedalt.html: * accessibility/mac/aria-liveregions-changedtext.html: * accessibility/mac/aria-liveregions-removedelement.html: * accessibility/mac/combobox-activedescendant-notifications-expected.txt: * accessibility/mac/combobox-activedescendant-notifications.html: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html: * accessibility/mac/html-slider-indicator.html: * accessibility/mac/input-replacevalue-userinfo-expected.txt: * accessibility/mac/input-replacevalue-userinfo.html: * accessibility/mac/ordered-textmarker-crash-expected.txt: * accessibility/mac/ordered-textmarker-crash.html: * accessibility/mac/search-with-frames-expected.txt: * accessibility/mac/search-with-frames.html: * accessibility/mac/selection-boundary-userinfo.html: * accessibility/mac/selection-change-userinfo.html: * accessibility/mac/selection-element-tabbing-to-link.html: * accessibility/mac/selection-value-changes-for-aria-textbox.html: * accessibility/mac/stale-textmarker-crash-expected.txt: * accessibility/mac/stale-textmarker-crash.html: * accessibility/mac/textbox-role-reports-notifications-expected.txt: * accessibility/mac/textbox-role-reports-notifications.html: * accessibility/mac/value-change/value-change-user-info-contenteditable.html: * accessibility/mac/value-change/value-change-user-info-textarea.html: * accessibility/mac/value-change/value-change-user-info-textfield.html: * accessibility/media-element.html: * accessibility/menu-list-sends-change-notification.html: * accessibility/multiselect-list-reports-active-option.html: * accessibility/paragraph-with-linebreaks.html: * accessibility/platform-name.html: * accessibility/radio-button-group-members.html: * accessibility/radio-button-title-label.html: * accessibility/selection-states-expected.txt: * accessibility/selection-states.html: * accessibility/spinbutton-value.html: * accessibility/svg-bounds.html: * accessibility/table-cell-for-column-and-row-crash.html: * accessibility/table-cells-roles.html: * accessibility/table-roles-hierarchy.html: * accessibility/table-with-aria-role.html: * accessibility/textarea-insertion-point-line-number.html: * accessibility/textbox-role-reports-selection.html: * accessibility/title-ui-element-correctness.html: * accessibility/unknown-roles-not-exposed-expected.txt: * accessibility/unknown-roles-not-exposed.html: * accessibility/win/bstr-elements-role.html: * accessibility/win/detached-object-notification-crash.html: * accessibility/win/heading-elements.html: * accessibility/win/img-alt-attribute.html: * accessibility/win/linked-elements.html: * accessibility/win/list-item-role.html: * accessibility/win/list-marker-role.html: * accessibility/win/list-role.html: * accessibility/win/multiple-select-element-role.html: * accessibility/win/option-element-position-and-size.html: * accessibility/win/parent-element.html: * accessibility/win/select-element-role.html: * accessibility/win/selection-and-focus.html: * accessibility/win/single-select-children-changed.html: * accessibility/win/single-select-children.html: * accessibility/win/text-role.html: * platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt: * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/media-element-expected.txt: * platform/mac/accessibility/table-cells-roles-expected.txt: * platform/mac/accessibility/table-roles-hierarchy-expected.txt: Canonical link: https://commits.webkit.org/189300@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 23:37:59 +00:00
jsTestIsAsync = true;
New iframe content may not be reflected in the ax tree. https://bugs.webkit.org/show_bug.cgi?id=72100 Reviewed by Chris Fleizach. Source/WebCore: The core issue was that when childrenChanged was called on a web area from an iframe that was just detached, it wasn't calling childrenChanged on its parent scroll area, or that scroll area's parent iframe element. To fix this, now AccessibilityScrollView implements setNeedsToUpdateChildren and parentObjectIfExists, and childrenChanged calls setNeedsToUpdateChildren on every object in the parent chain, not just AccessibilityRenderObjects. Test: accessibility/loading-iframe-updates-axtree.html * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setNeedsToUpdateChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObjectIfExists): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::setNeedsToUpdateChildren): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::AccessibilityScrollView): (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::setNeedsToUpdateChildren): LayoutTests: Add new test that makes sure that if you explore the accessibility tree of an iframe and that iframe subsequently loads new content, the iframe AccessibilityObject's descendants are updated to point to the new content, not the old content. * accessibility/loading-iframe-updates-axtree-expected.txt: Added. * accessibility/loading-iframe-updates-axtree.html: Added. Canonical link: https://commits.webkit.org/88614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-12 02:23:09 +00:00
function runTest()
{
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.iframe = accessibilityController.accessibleElementById('iframeContainer');
New iframe content may not be reflected in the ax tree. https://bugs.webkit.org/show_bug.cgi?id=72100 Reviewed by Chris Fleizach. Source/WebCore: The core issue was that when childrenChanged was called on a web area from an iframe that was just detached, it wasn't calling childrenChanged on its parent scroll area, or that scroll area's parent iframe element. To fix this, now AccessibilityScrollView implements setNeedsToUpdateChildren and parentObjectIfExists, and childrenChanged calls setNeedsToUpdateChildren on every object in the parent chain, not just AccessibilityRenderObjects. Test: accessibility/loading-iframe-updates-axtree.html * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setNeedsToUpdateChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObjectIfExists): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::setNeedsToUpdateChildren): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::AccessibilityScrollView): (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::setNeedsToUpdateChildren): LayoutTests: Add new test that makes sure that if you explore the accessibility tree of an iframe and that iframe subsequently loads new content, the iframe AccessibilityObject's descendants are updated to point to the new content, not the old content. * accessibility/loading-iframe-updates-axtree-expected.txt: Added. * accessibility/loading-iframe-updates-axtree.html: Added. Canonical link: https://commits.webkit.org/88614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-12 02:23:09 +00:00
window.scrollarea = iframe.childAtIndex(0);
window.subwebarea = scrollarea.childAtIndex(0);
}
window.iframeElement = document.getElementById("iframe");
iframeElement.addEventListener("load", function() {
if (window.accessibilityController) {
window.newIframe = accessibilityController.accessibleElementById('iframeContainer');
New iframe content may not be reflected in the ax tree. https://bugs.webkit.org/show_bug.cgi?id=72100 Reviewed by Chris Fleizach. Source/WebCore: The core issue was that when childrenChanged was called on a web area from an iframe that was just detached, it wasn't calling childrenChanged on its parent scroll area, or that scroll area's parent iframe element. To fix this, now AccessibilityScrollView implements setNeedsToUpdateChildren and parentObjectIfExists, and childrenChanged calls setNeedsToUpdateChildren on every object in the parent chain, not just AccessibilityRenderObjects. Test: accessibility/loading-iframe-updates-axtree.html * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setNeedsToUpdateChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObjectIfExists): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::setNeedsToUpdateChildren): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::AccessibilityScrollView): (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::setNeedsToUpdateChildren): LayoutTests: Add new test that makes sure that if you explore the accessibility tree of an iframe and that iframe subsequently loads new content, the iframe AccessibilityObject's descendants are updated to point to the new content, not the old content. * accessibility/loading-iframe-updates-axtree-expected.txt: Added. * accessibility/loading-iframe-updates-axtree.html: Added. Canonical link: https://commits.webkit.org/88614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-12 02:23:09 +00:00
window.newScrollarea = newIframe.childAtIndex(0);
window.newSubwebarea = newScrollarea.childAtIndex(0);
// for WK1, the scroll area does not change
var iframeEqual = iframe.isEqual(newIframe);
var scrollareaEqual = scrollarea.isEqual(newScrollarea);
var subwebareaEqual = subwebarea.isEqual(newSubwebarea);
debug("iframe.isEqual(newIframe): " + iframeEqual);
debug("scrollarea.isEqual(newScrollarea): " + scrollareaEqual);
debug("subwebarea.isEqual(newSubwebarea): " + subwebareaEqual);
New iframe content may not be reflected in the ax tree. https://bugs.webkit.org/show_bug.cgi?id=72100 Reviewed by Chris Fleizach. Source/WebCore: The core issue was that when childrenChanged was called on a web area from an iframe that was just detached, it wasn't calling childrenChanged on its parent scroll area, or that scroll area's parent iframe element. To fix this, now AccessibilityScrollView implements setNeedsToUpdateChildren and parentObjectIfExists, and childrenChanged calls setNeedsToUpdateChildren on every object in the parent chain, not just AccessibilityRenderObjects. Test: accessibility/loading-iframe-updates-axtree.html * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setNeedsToUpdateChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObjectIfExists): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::setNeedsToUpdateChildren): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::AccessibilityScrollView): (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::setNeedsToUpdateChildren): LayoutTests: Add new test that makes sure that if you explore the accessibility tree of an iframe and that iframe subsequently loads new content, the iframe AccessibilityObject's descendants are updated to point to the new content, not the old content. * accessibility/loading-iframe-updates-axtree-expected.txt: Added. * accessibility/loading-iframe-updates-axtree.html: Added. Canonical link: https://commits.webkit.org/88614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-12 02:23:09 +00:00
shouldBeTrue("newSubwebarea.childrenCount > 0");
}
Many accessibility js-tests use waitUntilDone https://bugs.webkit.org/show_bug.cgi?id=172372 Reviewed by Tim Horton. Corrected the use of js-test harness, updated the tests to use js-test.js instead of js-test-pre.js where possible. * accessibility/anonymous-render-block-in-continuation-causes-crash-expected.txt: * accessibility/anonymous-render-block-in-continuation-causes-crash.html: * accessibility/aria-checkbox-sends-notification.html: * accessibility/aria-invalid.html: * accessibility/aria-switch-sends-notification.html: * accessibility/deleting-iframe-destroys-axcache.html: * accessibility/file-upload-button-with-axpress.html: * accessibility/frame-disconnect-textmarker-cache-crash-expected.txt: * accessibility/frame-disconnect-textmarker-cache-crash.html: * accessibility/gtk/aria-listbox-crash.html: * accessibility/heading-title-includes-links-expected.txt: * accessibility/heading-title-includes-links.html: * accessibility/image-map-update-parent-crash-expected.txt: * accessibility/image-map-update-parent-crash.html: * accessibility/insert-children-assert-expected.txt: * accessibility/insert-children-assert.html: * accessibility/ios-simulator/focus-change-notifications.html: * accessibility/label-element-press.html: * accessibility/loading-iframe-updates-axtree.html: * accessibility/mac/aria-expanded-notifications.html: * accessibility/mac/aria-listbox-selectedchildren-change.html: * accessibility/mac/aria-liveregion-on-image.html: * accessibility/mac/aria-liveregions-addedelement.html: * accessibility/mac/aria-liveregions-changedalt.html: * accessibility/mac/aria-liveregions-changedtext.html: * accessibility/mac/aria-liveregions-removedelement.html: * accessibility/mac/combobox-activedescendant-notifications-expected.txt: * accessibility/mac/combobox-activedescendant-notifications.html: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing-expected.txt: * accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html: * accessibility/mac/html-slider-indicator.html: * accessibility/mac/input-replacevalue-userinfo-expected.txt: * accessibility/mac/input-replacevalue-userinfo.html: * accessibility/mac/ordered-textmarker-crash-expected.txt: * accessibility/mac/ordered-textmarker-crash.html: * accessibility/mac/search-with-frames-expected.txt: * accessibility/mac/search-with-frames.html: * accessibility/mac/selection-boundary-userinfo.html: * accessibility/mac/selection-change-userinfo.html: * accessibility/mac/selection-element-tabbing-to-link.html: * accessibility/mac/selection-value-changes-for-aria-textbox.html: * accessibility/mac/stale-textmarker-crash-expected.txt: * accessibility/mac/stale-textmarker-crash.html: * accessibility/mac/textbox-role-reports-notifications-expected.txt: * accessibility/mac/textbox-role-reports-notifications.html: * accessibility/mac/value-change/value-change-user-info-contenteditable.html: * accessibility/mac/value-change/value-change-user-info-textarea.html: * accessibility/mac/value-change/value-change-user-info-textfield.html: * accessibility/media-element.html: * accessibility/menu-list-sends-change-notification.html: * accessibility/multiselect-list-reports-active-option.html: * accessibility/paragraph-with-linebreaks.html: * accessibility/platform-name.html: * accessibility/radio-button-group-members.html: * accessibility/radio-button-title-label.html: * accessibility/selection-states-expected.txt: * accessibility/selection-states.html: * accessibility/spinbutton-value.html: * accessibility/svg-bounds.html: * accessibility/table-cell-for-column-and-row-crash.html: * accessibility/table-cells-roles.html: * accessibility/table-roles-hierarchy.html: * accessibility/table-with-aria-role.html: * accessibility/textarea-insertion-point-line-number.html: * accessibility/textbox-role-reports-selection.html: * accessibility/title-ui-element-correctness.html: * accessibility/unknown-roles-not-exposed-expected.txt: * accessibility/unknown-roles-not-exposed.html: * accessibility/win/bstr-elements-role.html: * accessibility/win/detached-object-notification-crash.html: * accessibility/win/heading-elements.html: * accessibility/win/img-alt-attribute.html: * accessibility/win/linked-elements.html: * accessibility/win/list-item-role.html: * accessibility/win/list-marker-role.html: * accessibility/win/list-role.html: * accessibility/win/multiple-select-element-role.html: * accessibility/win/option-element-position-and-size.html: * accessibility/win/parent-element.html: * accessibility/win/select-element-role.html: * accessibility/win/selection-and-focus.html: * accessibility/win/single-select-children-changed.html: * accessibility/win/single-select-children.html: * accessibility/win/text-role.html: * platform/mac-wk1/accessibility/loading-iframe-updates-axtree-expected.txt: * platform/mac-wk2/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/deleting-iframe-destroys-axcache-expected.txt: * platform/mac/accessibility/media-element-expected.txt: * platform/mac/accessibility/table-cells-roles-expected.txt: * platform/mac/accessibility/table-roles-hierarchy-expected.txt: Canonical link: https://commits.webkit.org/189300@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-05-19 23:37:59 +00:00
finishJSTest();
New iframe content may not be reflected in the ax tree. https://bugs.webkit.org/show_bug.cgi?id=72100 Reviewed by Chris Fleizach. Source/WebCore: The core issue was that when childrenChanged was called on a web area from an iframe that was just detached, it wasn't calling childrenChanged on its parent scroll area, or that scroll area's parent iframe element. To fix this, now AccessibilityScrollView implements setNeedsToUpdateChildren and parentObjectIfExists, and childrenChanged calls setNeedsToUpdateChildren on every object in the parent chain, not just AccessibilityRenderObjects. Test: accessibility/loading-iframe-updates-axtree.html * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setNeedsToUpdateChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObjectIfExists): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::setNeedsToUpdateChildren): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::AccessibilityScrollView): (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::setNeedsToUpdateChildren): LayoutTests: Add new test that makes sure that if you explore the accessibility tree of an iframe and that iframe subsequently loads new content, the iframe AccessibilityObject's descendants are updated to point to the new content, not the old content. * accessibility/loading-iframe-updates-axtree-expected.txt: Added. * accessibility/loading-iframe-updates-axtree.html: Added. Canonical link: https://commits.webkit.org/88614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-12 02:23:09 +00:00
}, false);
// Load content into the iframe. This will trigger the event
// handler above, which will check that the accessibility tree
// was updated with new content.
window.iframeElement.src = "data:text/html,<body><button>Click me</button></body>";
}
window.addEventListener('load', function() {
setTimeout(runTest, 10);
}, false);
</script>
</head>
<body>
<p>Before</p>
<div id="iframeContainer">
<iframe id="iframe"></iframe>
</div>
New iframe content may not be reflected in the ax tree. https://bugs.webkit.org/show_bug.cgi?id=72100 Reviewed by Chris Fleizach. Source/WebCore: The core issue was that when childrenChanged was called on a web area from an iframe that was just detached, it wasn't calling childrenChanged on its parent scroll area, or that scroll area's parent iframe element. To fix this, now AccessibilityScrollView implements setNeedsToUpdateChildren and parentObjectIfExists, and childrenChanged calls setNeedsToUpdateChildren on every object in the parent chain, not just AccessibilityRenderObjects. Test: accessibility/loading-iframe-updates-axtree.html * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.h: (WebCore::AccessibilityObject::setNeedsToUpdateChildren): * accessibility/AccessibilityRenderObject.cpp: (WebCore::AccessibilityRenderObject::parentObjectIfExists): (WebCore::AccessibilityRenderObject::childrenChanged): * accessibility/AccessibilityRenderObject.h: (WebCore::AccessibilityRenderObject::setNeedsToUpdateChildren): * accessibility/AccessibilityScrollView.cpp: (WebCore::AccessibilityScrollView::AccessibilityScrollView): (WebCore::AccessibilityScrollView::updateChildrenIfNecessary): (WebCore::AccessibilityScrollView::parentObject): (WebCore::AccessibilityScrollView::parentObjectIfExists): * accessibility/AccessibilityScrollView.h: (WebCore::AccessibilityScrollView::setNeedsToUpdateChildren): LayoutTests: Add new test that makes sure that if you explore the accessibility tree of an iframe and that iframe subsequently loads new content, the iframe AccessibilityObject's descendants are updated to point to the new content, not the old content. * accessibility/loading-iframe-updates-axtree-expected.txt: Added. * accessibility/loading-iframe-updates-axtree.html: Added. Canonical link: https://commits.webkit.org/88614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@100057 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2011-11-12 02:23:09 +00:00
<p>After</p>
<p>End of test</p>
<p id="description"></p>
<div id="console"></div>
</body>
</html>