Title: [202841] trunk
- Revision
- 202841
- Author
- [email protected]
- Date
- 2016-07-05 17:41:46 -0700 (Tue, 05 Jul 2016)
Log Message
AX: Image attachment in email does not show up in AX tree
https://bugs.webkit.org/show_bug.cgi?id=159422
Reviewed by Joanmarie Diggs.
Source/WebCore:
When an image loads after the accessibility tree has already been created, the ignored status
of that image does not get updated.
Test: accessibility/image-load-on-delay.html
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageChanged):
LayoutTests:
* accessibility/image-load-on-delay-expected.txt: Added.
* accessibility/image-load-on-delay.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (202840 => 202841)
--- trunk/LayoutTests/ChangeLog 2016-07-05 23:42:59 UTC (rev 202840)
+++ trunk/LayoutTests/ChangeLog 2016-07-06 00:41:46 UTC (rev 202841)
@@ -1,3 +1,13 @@
+2016-07-05 Chris Fleizach <[email protected]>
+
+ AX: Image attachment in email does not show up in AX tree
+ https://bugs.webkit.org/show_bug.cgi?id=159422
+
+ Reviewed by Joanmarie Diggs.
+
+ * accessibility/image-load-on-delay-expected.txt: Added.
+ * accessibility/image-load-on-delay.html: Added.
+
2016-07-05 Ryan Haddad <[email protected]>
Land test expectations for rdar://problem/27182687.
Added: trunk/LayoutTests/accessibility/image-load-on-delay-expected.txt (0 => 202841)
--- trunk/LayoutTests/accessibility/image-load-on-delay-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/image-load-on-delay-expected.txt 2016-07-06 00:41:46 UTC (rev 202841)
@@ -0,0 +1,12 @@
+1 2
+This verifies that when an image loads its resource late, the AX tree is updated to re-add the image.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+BEFORE: Group count: 2
+AFTER: Group count: 3
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/image-load-on-delay.html (0 => 202841)
--- trunk/LayoutTests/accessibility/image-load-on-delay.html (rev 0)
+++ trunk/LayoutTests/accessibility/image-load-on-delay.html 2016-07-06 00:41:46 UTC (rev 202841)
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body id="body">
+
+<div id="content">
+<button>1</button>
+<img src="" 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) {
+ window.jsTestIsAsync = true;
+ var content = accessibilityController.accessibleElementById("content");
+ debug("BEFORE: Group count: " + content.childrenCount);
+
+ document.getElementById("image")._onload_ = function() {
+ debug("AFTER: Group count: " + content.childrenCount);
+ finishJSTest();
+ };
+
+ setTimeout(function() {
+ document.getElementById("image").src = ""
+ }, 1000);
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (202840 => 202841)
--- trunk/Source/WebCore/ChangeLog 2016-07-05 23:42:59 UTC (rev 202840)
+++ trunk/Source/WebCore/ChangeLog 2016-07-06 00:41:46 UTC (rev 202841)
@@ -1,3 +1,18 @@
+2016-07-05 Chris Fleizach <[email protected]>
+
+ AX: Image attachment in email does not show up in AX tree
+ https://bugs.webkit.org/show_bug.cgi?id=159422
+
+ Reviewed by Joanmarie Diggs.
+
+ When an image loads after the accessibility tree has already been created, the ignored status
+ of that image does not get updated.
+
+ Test: accessibility/image-load-on-delay.html
+
+ * rendering/RenderImage.cpp:
+ (WebCore::RenderImage::imageChanged):
+
2016-07-05 Alex Christensen <[email protected]>
Fix Windows build.
Modified: trunk/Source/WebCore/rendering/RenderImage.cpp (202840 => 202841)
--- trunk/Source/WebCore/rendering/RenderImage.cpp 2016-07-05 23:42:59 UTC (rev 202840)
+++ trunk/Source/WebCore/rendering/RenderImage.cpp 2016-07-06 00:41:46 UTC (rev 202841)
@@ -28,6 +28,7 @@
#include "config.h"
#include "RenderImage.h"
+#include "AXObjectCache.h"
#include "BitmapImage.h"
#include "CachedImage.h"
#include "FocusController.h"
@@ -252,6 +253,11 @@
imageSizeChange = setImageSizeForAltText(imageResource().cachedImage());
}
+ if (UNLIKELY(AXObjectCache::accessibilityEnabled())) {
+ if (AXObjectCache* cache = document().existingAXObjectCache())
+ cache->recomputeIsIgnored(this);
+ }
+
repaintOrMarkForLayout(imageSizeChange, rect);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes