• Dominic Mazzoni's avatar
    Separate sending AX events from updating dirty nodes, remove duplicates. · 44a35d4f
    Dominic Mazzoni authored
    Splits code that loops over accessibility events from the code that
    loops over dirty nodes that need to be serialized. Keeps track of
    duplicate ids and avoids serializing the same node twice.
    
    This is a different approach than crrev.com/c/1063007
    "Avoid serializing the same accessibility node twice in the
    same message" which tried to put all of the nodes in
    the same AXTreeUpdate. That approach could fail in rare cases when
    multiple updates both tried to set node_id_to_clear.
    Now we've refactored the event message so that it can
    contain multiple AXTreeUpdates, so it's safe to just skip
    an entire update if it's a node we've already serialized
    in this event bundle.
    
    Bug: 651614, 845778
    
    Change-Id: I3cc859e7a63d9c8b8beeb930d96aa53898940485
    Reviewed-on: https://chromium-review.googlesource.com/1097423
    Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
    Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#568195}
    44a35d4f
render_accessibility_impl.cc 28.3 KB