• Victor Fei's avatar
    Stablizing Mac autofill accessibility when popup show/hides · 0297659d
    Victor Fei authored
    This is a follow up change of CL:1667787, which introduced
    AutofillPopupControllerImpl::FireControlsChangedEvent for autofill
    popup accessibility.
    
    On Mac and potentially other platforms, when accessibility is
    enabled, upon invoking autofill popup and FireControlsChangedEvent
    we end up dereferencing a nullptr of AxPlatformNode due to
    Mac does not have a complete implementation of AxPlatformNode yet.
    
    This CL fixes the above by adding a check for AxPlatformNode in
    FireControlsChangedEvent.
    
    Changes:
     1. Introduced a check for invalid AxPlatformNode in
        AutofillPopupControllerImpl::FireControlsChangedEvent to return
        early from firing event.
     2. Added associated unit tests for FireControlsChangedEvent.
     3. Exposed GetWebContentsPopupControllerAxId virtual to
        AutofillPopupDelegate..
    
    Bug: 986587
    Change-Id: I9a6ed49330a9ea9d7d4e5483c3ee06d5675919ee
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1714297
    Commit-Queue: Victor Fei <vicfei@microsoft.com>
    Reviewed-by: default avatarEvan Stade <estade@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Reviewed-by: default avatarIan Prest <iapres@microsoft.com>
    Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#686461}
    0297659d
autofill_popup_controller_impl.h 7.71 KB