[Webkit-unassigned] [Bug 163419] AX: [Mac] roleDescription for AXTextField input types

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 15 18:27:11 PDT 2016


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

Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #291556|review?                     |review+
              Flags|                            |

--- Comment #10 from Darin Adler <darin at apple.com> ---
Comment on attachment 291556
  --> https://bugs.webkit.org/attachment.cgi?id=291556
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=291556&action=review

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2520
> +        Node* node = m_object->node();

Slightly better to use auto:

    auto* node = m_object->node();

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2521
> +        if (node && is<HTMLInputElement>(*node)) {

The is<> function handles null checks if you pass it a pointer:

    if (is<HTMLInputElement>(node)) {

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2522
> +            HTMLInputElement& input = downcast<HTMLInputElement>(*node);

Best style is to not repeat the type:

    auto& input = downcast<HTMLInputElement>(*node);

> Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2531
> +            const AtomicString& type = m_object->getAttribute(typeAttr);

Should write:

    auto& type = input.attributeWithoutSynchronization(typeAttr);

Instead of going back to the accessibility object, now that we know this is an input element.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161016/da15f12f/attachment-0001.html>


More information about the webkit-unassigned mailing list