-
mjs@apple.com authored
Reviewed by Dan Bernstein. Links around blocks (e.g. divs) results in too many VoiceOver call outs https://bugs.webkit.org/show_bug.cgi?id=37079 The basic change is to modify the AccessibilityRenderObject tree traversal methods to account for inline continuations in the render tree and make the accessibility tree look as if continuations didn't exist - the same as if CSS blocks could just sit in CSS inlines. This is slightly tricky code but creates a much saner accessibility tree. Tests: accessibility/image-link-inline-cont.html accessibility/image-link.html accessibility/inline-continuations.html * accessibility/AccessibilityRenderObject.cpp: (WebCore::isInlineWithContinuation): Helper function for traversal functions to use in accounting for continuations. (WebCore::firstChildInContinuation): ditto (WebCore::firstChildConsideringContinuation): ditto (WebCore::lastChildConsideringContinuation): ditto (WebCore::startOfContinuations): ditto (WebCore::endOfContinuations): ditto (WebCore::childBeforeConsideringContinuations): ditto (WebCore::firstChildIsInlineContinuation): ditto (WebCore::lastChildHasContinuation): ditto (WebCore::AccessibilityRenderObject::firstChild): Account for inline continuations. (WebCore::AccessibilityRenderObject::lastChild): ditto (WebCore::AccessibilityRenderObject::previousSibling): Account for inline continuations and their anonymous block parents. (WebCore::AccessibilityRenderObject::nextSibling): ditto (WebCore::AccessibilityRenderObject::parentObjectIfExists): Account for inline continuations. (WebCore::AccessibilityRenderObject::parentObject): Account for inline continuations. * rendering/RenderInline.h: Make RenderInline::inlineContinuation public. 2010-04-22 Maciej Stachowiak <mjs@apple.com> Reviewed by Dan Bernstein. Links around blocks (e.g. divs) results in too many VoiceOver call outs https://bugs.webkit.org/show_bug.cgi?id=37079 The new test cases verify the accessibility tree created by an image inside a link, and verify that adding a div with role=presentation now has no effect on the accessibility tree (as expected). * accessibility/image-link-inline-cont-expected.txt: Added. * accessibility/image-link-inline-cont.html: Added. * accessibility/image-link.html: Added. * platform/gtk/Skipped: * platform/mac/accessibility/image-link-expected.txt: Added. * platform/win/Skipped: Test to check that accessibility tree doesn't get duplicate content in the presence of inline continuations (this was a bug in an earlier version of this patch). * accessibility/inline-continuations-expected.txt: Added. * accessibility/inline-continuations.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58150 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a37664ef