[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
Thu Apr 22 11:28:52 PDT 2010


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


mitz at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #54047|review?                     |review+
               Flag|                            |




--- Comment #7 from mitz at webkit.org  2010-04-22 11:28:52 PST ---
(From update of attachment 54047)
> +static inline RenderObject* lastChildConsideringContinuation(RenderObject* renderer)
> +{
> +    RenderObject* lastChild = renderer->lastChild();
> +    RenderObject* prev = renderer;

prev is unused (you just assign to it).

> +    RenderObject* cur = renderer;
> +
> +    while (cur) {
> +        prev = cur;
> +
> +        if (RenderObject* lc = cur->lastChild())
> +            lastChild = lc;
> +
> +        if (cur->isRenderInline()) {
> +            cur = toRenderInline(cur)->continuation();
> +            if (cur && cur->isRenderBlock()) 
> +                cur = toRenderBlock(cur)->inlineContinuation();
> +        } else
> +            cur = toRenderBlock(cur)->inlineContinuation();

I can’t think of a case where you couldn’t just do cur =
cur->inlineContinuation() (assuming cur is a block or an inline). In other
words, the first branch seems needlessly complicated. What am I missing?

>  AccessibilityObject* AccessibilityRenderObject::firstChild() const
>  {
>      if (!m_renderer)
>          return 0;
>      
>      RenderObject* firstChild = m_renderer->firstChild();
> +
> +    if (!firstChild && isInlineWithContinuation(m_renderer))
> +        firstChild = firstChildConsideringContinuation(m_renderer);

You can just use firstChildConsideringContinuation(), because it includes the
above (getting firstChild() and checking if it’s 0 etc.).

> +static inline RenderObject* endOfContinuations(RenderObject* renderer)
> +{
> +    RenderObject* prev = renderer;
> +    RenderObject* cur = renderer;
> +
> +    while (cur) {
> +        prev = cur;
> +        if (cur->isRenderInline()) {
> +            cur = toRenderInline(cur)->continuation();
> +            if (cur && cur->isRenderBlock()) 
> +                cur = toRenderBlock(cur)->inlineContinuation();
> +        } else
> +            cur = toRenderBlock(cur)->inlineContinuation();

Like in lastChildConsideringContinuations, I don’t understand why the inline
case can’t just use inlineContinuation().

r=beth and me

-- 
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