haikuwebkit/LayoutTests/accessibility/image-load-on-delay.html

44 lines
1.2 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body id="body">
<div id="content">
<button>1</button>
<img src="resources/___.png" width=100 height=100 id="image">
<button>2</button>
</div>
<p id="description"></p>
<div id="console"></div>
<script>
description("This verifies that when an image loads its resource late, the AX tree is updated to re-add the image.");
if (window.accessibilityController) {
document.body.offsetHeight;
window.jsTestIsAsync = true;
var content = accessibilityController.accessibleElementById("content");
debug("BEFORE: Group count: " + content.childrenCount);
document.getElementById("image").onload = function() {
document.body.offsetHeight;
AXObjectCache::childrenChanged shouldn't update layout or style during another style recalc https://bugs.webkit.org/show_bug.cgi?id=182280 <rdar://problem/37018386> Reviewed by Alan Bujtas. Source/WebCore: Remove the possibility that changing children calls back into updating layout by handling children changes in a deferred manner. This follows the same architecture as many other deferred changes, but also requires us to check deferred changes in updateBackingStore, because things like aria-hidden changes won't trigger a layout, but will require us to update children. A few tests had to be modified to no longer change the tree and then check the children immediately. * accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::remove): (WebCore::AXObjectCache::childrenChanged): (WebCore::AXObjectCache::prepareForDocumentDestruction): (WebCore::AXObjectCache::performDeferredCacheUpdate): * accessibility/AXObjectCache.h: * accessibility/AccessibilityObject.cpp: (WebCore::AccessibilityObject::updateBackingStore): * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: (convertToNSArray): (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]): LayoutTests: * accessibility/aria-hidden-update.html: * accessibility/aria-hidden-updates-alldescendants.html: * accessibility/image-load-on-delay.html: * accessibility/mac/aria-hidden-changes-for-non-ignored-elements.html: * accessibility/removed-anonymous-block-child-causes-crash.html: Canonical link: https://commits.webkit.org/208948@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241289 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-02-12 09:28:44 +00:00
setTimeout(function() {
debug("AFTER: Group count: " + content.childrenCount);
finishJSTest();
}, 0);
};
setTimeout(function() {
document.getElementById("image").src = "resources/cake.png";
}, 100);
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>