[Webkit-unassigned] [Bug 136150] [ATK] Changing the mapping of aria rowheader and columnheader into respective ATK roles.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 8 11:47:12 PDT 2014


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





--- Comment #26 from Darin Adler <darin at apple.com>  2014-10-08 11:47:07 PST ---
(From update of attachment 239337)
View in context: https://bugs.webkit.org/attachment.cgi?id=239337&action=review

> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2567
> +    if (node && (node->hasTagName(thTag))) {

Instead of hasTagName(thTag) we should consider:

    if (is<HTMLTableHeaderElement>(node))

>> Source/WebCore/accessibility/AccessibilityRenderObject.cpp:2568
>> +        for (node = node->parentNode(); node; node = node->parentNode()) {
> 
> I think you should use a different variable for node, since you're using it it everywhere else to reference the current node, but
> then you're in this for loop, changing it to parent nodes.
> I see that you don't leave this block, so there's probably not a logic problem, but for readability it might be good to use
> 
> for (Node* parentNode = node->parentNode(); parentNode; parentNode = parentNode->parentNode())

This is much better:

    for (auto& ancestor : ancestorsOfType<HTMLElement>(downcast<HTMLTableHeaderElement>(*node))

All the hasTagName checks below will be more efficient if we already know it’s an HTML element.

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