Changeset 127370 in webkit
- Timestamp:
- Sep 1, 2012 3:51:25 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r127369 r127370 1 2012-09-01 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 expected accessible objects of DivRole 7 and ParagraphRole being ignored, in favor of including child blocks. 8 9 Reviewed by Chris Fleizach. 10 11 Added new test to verify that paragraphs and divs which contain anonymous 12 blocks are included in the accessible object hierarchy and have the correct 13 number of children with the expected role. 14 15 * platform/gtk/accessibility/spans-paragraphs-and-divs-expected.txt: Added. 16 * platform/gtk/accessibility/spans-paragraphs-and-divs.html: Added. 17 1 18 2012-09-01 Zan Dobersek <zandobersek@gmail.com> 2 19 -
trunk/Source/WebCore/ChangeLog
r127368 r127370 1 2012-09-01 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 expected accessible objects of DivRole 7 and ParagraphRole being ignored, in favor of including child blocks. 8 9 Reviewed by Chris Fleizach. 10 11 Test: platform/gtk/accessibility/spans-paragraphs-and-divs.html 12 13 * accessibility/AccessibilityObject.cpp: 14 (WebCore::AccessibilityObject::firstAnonymousBlockChild): 15 (WebCore): 16 * accessibility/AccessibilityObject.h: 17 (AccessibilityObject): 18 New method to return the first child which is an anonymous block. 19 * accessibility/gtk/AccessibilityObjectAtk.cpp: 20 (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject): 21 Include paragraphs and divs which contain a non-nested anonymous block. 22 1 23 2012-09-01 Joanmarie Diggs <jdiggs@igalia.com> 2 24 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r126970 r127370 1352 1352 1353 1353 return this == axObject || axObject->isDescendantOfObject(this); 1354 } 1355 1356 AccessibilityObject* AccessibilityObject::firstAnonymousBlockChild() const 1357 { 1358 for (AccessibilityObject* child = firstChild(); child; child = child->nextSibling()) { 1359 if (child->renderer() && child->renderer()->isAnonymousBlock()) 1360 return child; 1361 } 1362 return 0; 1354 1363 } 1355 1364 -
trunk/Source/WebCore/accessibility/AccessibilityObject.h
r127084 r127370 587 587 bool isDescendantOfObject(const AccessibilityObject*) const; 588 588 bool isAncestorOfObject(const AccessibilityObject*) const; 589 AccessibilityObject* firstAnonymousBlockChild() const; 589 590 590 591 static AccessibilityRole ariaRoleToWebCoreRole(const String&); -
trunk/Source/WebCore/accessibility/gtk/AccessibilityObjectAtk.cpp
r127368 r127370 79 79 return IgnoreObject; 80 80 81 // Given a paragraph or div containing a non-nested anonymous block, WebCore 82 // ignores the paragraph or div and includes the block. We want the opposite: 83 // ATs are expecting accessible objects associated with textual elements. They 84 // usually have no need for the anonymous block. And when the wrong objects 85 // get included or ignored, needed accessibility signals do not get emitted. 86 if (role == ParagraphRole || role == DivRole) { 87 AccessibilityObject* child = firstAnonymousBlockChild(); 88 if (!child) 89 return DefaultBehavior; 90 91 child = child->firstChild(); 92 if (child->isLink() || !child->firstAnonymousBlockChild()) 93 return IncludeObject; 94 } 95 81 96 // Block spans result in objects of ATK_ROLE_PANEL which are almost always unwanted. 82 97 // However, if we ignore block spans whose parent is the body, the child controls
Note: See TracChangeset
for help on using the changeset viewer.