[Webkit-unassigned] [Bug 37079] Links around blocks (e.g. divs) results in too many VoiceOver call outs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 5 15:36:27 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37079





--- Comment #3 from mitz at webkit.org  2010-04-05 15:36:27 PST ---
(From update of attachment 52520)
Beth and I looked at the patch, and we suspect the logic for Case 3 below may
be wrong:

> @@ -158,8 +272,31 @@ AccessibilityObject* AccessibilityRender
>  {
>      if (!m_renderer)
>          return 0;
> +
> +    RenderObject* nextSibling = 0;
> +
> +    // Case 1: node is a block and has an inline continuation. Next sibling is the inline continuation's
> +    // first child.
> +    RenderInline* inlineContinuation;
> +    if (m_renderer->isRenderBlock() && (inlineContinuation = toRenderBlock(m_renderer)->inlineContinuation()))
> +        nextSibling = firstChildConsideringContinuation(inlineContinuation);
> +
> +    // Case 2: node has an actual next sibling
> +    else if (RenderObject* ns = m_renderer->nextSibling())
> +        nextSibling = ns;
> +
> +    // Case 3: node has no next sibling, and its parent is an inline with a continuation.
> +    else if (isInlineWithContinuation(m_renderer->parent())) {
> +        RenderObject* continuation = toRenderInline(m_renderer->parent())->continuation();
> +        
> +        // Case 3a: continuation is a block - in this case the block itself is the next sibling.
> +        if (continuation->isRenderBlock())
> +            nextSibling = continuation;
> +        // Case 3b: continuation is an inline - in this case the inline's first child is the next sibling
> +        else
> +            nextSibling = firstChildConsideringContinuation(continuation);
> +    }

Considering a case like <span id="span1">a<div>b</div></span>c<span
id="span2">d</span>, if asked for the next sibling of the first RenderInline
for span1, the above code will hit case 3 (because that inline doesn’t have a
next sibling in its parent anonymous block), but then it will fail the
condition for that case, because its parent is not an inline. Instead,
shouldn’t we return the RenderInline for span2? Perhaps the way to do this is
to follow the inlineContinuation chain and return the next sibling of the last
renderer on the chain?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list