[Webkit-unassigned] [Bug 50126] Fallback content in canvas element not focusable

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 11 15:43:17 PST 2011


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





--- Comment #8 from Dominic Mazzoni <dmazzoni at google.com>  2011-02-11 15:43:17 PST ---
(From update of attachment 81856)
View in context: https://bugs.webkit.org/attachment.cgi?id=81856&action=review

>> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:3283
>>      
> 
> The default for allowing children is true. I don't think canvas fits any of the roles that don't allow children, so it seems this is not necessary

The layout test doesn't pass without this line. A canvas has a roleValue of ImageRole, so the switch statement immediately below this causes it to return false (that it's not allowed to have children).

Is there a better role for canvas? Should we create a new role (internally) but then map it to Image at the platform-specific accessibility API level?

>> Source/WebCore/html/HTMLFormControlElement.cpp:243
>>          return false;
> 
> Instead of removing the size check, which may be valid in other contexts, should you just add another check to determine if its size is empty and it's not a child of a canvas area.

Good idea, done.

>> Source/WebCore/rendering/RenderObject.cpp:1317
>>  }
> 
> Might be a good idea to have a comment why this changed

The issue is that clippedOverflowRectForRepaint(repaintContainer) tries to access the containing block and crashes if it doesn't exist. A child of a RenderHTMLCanvas doesn't necessarily have a containing block. Luckily repainting isn't needed for that case, either, so it suffices to just check whether containingBlock() exists.

I restructured it slightly and added a comment, how's this?

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