COMMIT_MESSAGE

 1Fix for bug 72811 - part 2
 2

LayoutTests/ChangeLog

 12012-08-27 Joanmarie Diggs <jdiggs@igalia.com>
 2
 3 [Gtk] No accessible caret-moved events found in certain content
 4 https://bugs.webkit.org/show_bug.cgi?id=72811
 5
 6 Part of the bug was due to extraneous accessible objects resulting
 7 from unignored inline and block spans.
 8
 9 Reviewed by NOBODY (OOPS!).
 10
 11 Added new test, updated the results of one test to reflect the fix,
 12 corrected a test with a mismatched element tag.
 13
 14 * platform/gtk/accessibility/aria-roles-unignored-expected.txt: Corrected results having fixed tag.
 15 * platform/gtk/accessibility/aria-roles-unignored.html: Fixed mismatched element tag.
 16 * platform/gtk/accessibility/media-element-expected.txt: Updated to reflect removal of extraneous object.
 17 * platform/gtk/accessibility/spans-expected.txt: Added.
 18 * platform/gtk/accessibility/spans.html: Added.
 19
1202012-08-24 Florin Malita <fmalita@chromium.org>
221
322 ASSERTION FAILED: !attached() in WebCore::Node::attach()

LayoutTests/platform/gtk/accessibility/aria-roles-unignored-expected.txt

@@PASS element.role is 'AXRole: label'
1818PASS element.role is 'AXRole: heading'
1919PASS element.role is 'AXRole: form'
2020PASS element.role is 'AXRole: push button'
21 PASS element.role is 'AXRole: panel'
 21PASS element.role is 'AXRole: section'
2222PASS element.role is 'AXRole: entry'
2323PASS successfullyParsed is true
2424

LayoutTests/platform/gtk/accessibility/aria-roles-unignored.html

1414<form>A form with a button <button name="button" value="Button">Click me!</button></form>
1515<form role="button">Just a button <button name="button" value="Button">Click me!</button></form>
1616
17 <div>Just some text inside a div</form>
 17<div>Just some text inside a div</div>
1818<div role="textbox">This div is contains a textbox (an entry)</div>
1919
2020<p id="description"></p>

@@if (window.accessibilityController) {
5151
5252 // Divs
5353 element = webArea.childAtIndex(5);
54  shouldBe("element.role", "'AXRole: panel'");
 54 shouldBe("element.role", "'AXRole: section'");
5555 element = webArea.childAtIndex(6);
5656 shouldBe("element.role", "'AXRole: entry'");
5757}

LayoutTests/platform/gtk/accessibility/media-element-expected.txt

@@State at 'canplaythrough' event:
1313
1414
1515 description: AXDescription:
16  role: AXRole: panel
17 
18 
19  description: AXDescription:
2016 role: AXRole: slider
2117
2218

LayoutTests/platform/gtk/accessibility/spans-expected.txt

 1first block span
 2inline span
 3second block span
 4first block span
 5inline span
 6second block span
 7
 8first block span
 9inline span
 10second block span
 11first block span
 12inline span
 13second block span
 14This tests that both block spans and inline spans get folded into the parent object
 15
 16On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 17
 18
 19PASS element.role is 'AXRole: heading'
 20PASS element.childrenCount is 0
 21PASS element.role is 'AXRole: heading'
 22PASS element.childrenCount is 1
 23PASS link.role is 'AXRole: link'
 24PASS link.childrenCount is 0
 25PASS element.role is 'AXRole: list'
 26PASS element.childrenCount is 2
 27PASS item.role is 'AXRole: list item'
 28PASS item.childrenCount is 0
 29PASS item.role is 'AXRole: list item'
 30PASS item.childrenCount is 1
 31PASS link.role is 'AXRole: link'
 32PASS link.childrenCount is 0
 33PASS successfullyParsed is true
 34
 35TEST COMPLETE
 36

LayoutTests/platform/gtk/accessibility/spans.html

 1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 2<html>
 3<head>
 4<script src="../../../fast/js/resources/js-test-pre.js"></script>
 5</head>
 6<body id="body">
 7<h4>
 8 <span style="display:block;">first block span</span>
 9 <span>inline span</span>
 10 <span style="display:block;">second block span</span>
 11</h4>
 12<h4>
 13 <a href="foo">
 14 <span style="display:block;">first block span</span>
 15 <span>inline span</span>
 16 <span style="display:block;">second block span</span>
 17 </a>
 18</h4>
 19<ol>
 20 <li>
 21 <span style="display:block;">first block span</span>
 22 <span>inline span</span>
 23 <span style="display:block;">second block span</span>
 24 </li>
 25 <li>
 26 <a href="foo">
 27 <span style="display:block;">first block span</span>
 28 <span>inline span</span>
 29 <span style="display:block;">second block span</span>
 30 </a>
 31 </li>
 32</ol>
 33<p id="description"></p>
 34<div id="console"></div>
 35<script>
 36description("This tests that both block spans and inline spans get folded into the parent object");
 37
 38if (window.layoutController) {
 39 testRunner.dumpAsText();
 40}
 41
 42if (window.accessibilityController) {
 43 document.getElementById("body").focus();
 44 var webArea = accessibilityController.focusedElement;
 45
 46 var element = webArea.childAtIndex(0);
 47 shouldBe("element.role", "'AXRole: heading'");
 48 shouldBe("element.childrenCount", "0");
 49
 50 element = webArea.childAtIndex(1);
 51 shouldBe("element.role", "'AXRole: heading'");
 52 shouldBe("element.childrenCount", "1");
 53
 54 var link = element.childAtIndex(0);
 55 shouldBe("link.role", "'AXRole: link'");
 56 shouldBe("link.childrenCount", "0");
 57
 58 element = webArea.childAtIndex(2);
 59 shouldBe("element.role", "'AXRole: list'");
 60 shouldBe("element.childrenCount", "2");
 61
 62 var item = element.childAtIndex(0);
 63 shouldBe("item.role", "'AXRole: list item'");
 64 shouldBe("item.childrenCount", "0");
 65
 66 item = element.childAtIndex(1);
 67 shouldBe("item.role", "'AXRole: list item'");
 68 shouldBe("item.childrenCount", "1");
 69
 70 link = item.childAtIndex(0);
 71 shouldBe("link.role", "'AXRole: link'");
 72 shouldBe("link.childrenCount", "0");
 73}
 74
 75</script>
 76<script src="../../../fast/js/resources/js-test-post.js"></script>
 77</body>
 78</html>

Source/WebCore/ChangeLog

 12012-08-27 Joanmarie Diggs <jdiggs@igalia.com>
 2
 3 [Gtk] No accessible caret-moved events found in certain content
 4 https://bugs.webkit.org/show_bug.cgi?id=72811
 5
 6 Part of the bug was due to extraneous accessible objects resulting
 7 from unignored inline and block spans.
 8
 9 Reviewed by NOBODY (OOPS!).
 10
 11 Test: platform/gtk/accessibility/spans.html
 12
 13 * accessibility/AccessibilityRenderObject.cpp:
 14 (WebCore::AccessibilityRenderObject::accessibilityIsIgnored): Ignore objects that have spanTag tag name.
 15 * accessibility/gtk/AccessibilityObjectAtk.cpp:
 16 (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): Ignore most anonymous blocks.
 17 * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
 18 (roleIsTextType): Add ListItem to the roles which should implement AtkText.
 19
1202012-08-24 Helder Correia <helder.correia@nokia.com>
221
322 [Texmap] Move TextureMapperGL to use GraphicsContext3D

Source/WebCore/accessibility/AccessibilityRenderObject.cpp

@@bool AccessibilityRenderObject::accessibilityIsIgnored() const
19531953 if (supportsARIAAttributes())
19541954 return false;
19551955
 1956 // Content inside span tags gets included in the parent text object.
 1957 if (node && node->hasTagName(spanTag))
 1958 return true;
 1959
19561960 if (m_renderer->isBlockFlow() && m_renderer->childrenInline())
19571961 return !toRenderBlock(m_renderer)->firstLineBox() && !mouseButtonListener();
19581962

Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp

@@AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesO
7878 if (role == UnknownRole)
7979 return IgnoreObject;
8080
 81 // Block spans result in extraneous objects of ATK_ROLE_PANEL.
 82 if (renderer()->isAnonymousBlock() && !parent->renderer()->isBody()
 83 && parent->ariaRoleAttribute() == UnknownRole)
 84 return IgnoreObject;
 85
8186 return DefaultBehavior;
8287}
8388

Source/WebCore/accessibility/gtk/WebKitAccessibleWrapperAtk.cpp

@@static GType GetAtkInterfaceTypeFromWAIType(WAIType type)
819819
820820static bool roleIsTextType(AccessibilityRole role)
821821{
822  return role == ParagraphRole || role == HeadingRole || role == DivRole || role == CellRole;
 822 return role == ParagraphRole || role == HeadingRole || role == DivRole || role == CellRole || role == ListItemRole;
823823}
824824
825825static guint16 getInterfaceMaskFromObject(AccessibilityObject* coreObject)