{"push_id":984079958,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"965ba000de4c91156005af7e23235574f8c2cc93","before":"3497d2109613cf498736cea8e1330c0ac8c89a4d","commits":[{"sha":"965ba000de4c91156005af7e23235574f8c2cc93","author":{"email":"f1ba45afdaeae77f45548dbdc09644eb747dce38@chromium.org","name":"dmazzoni"},"message":"Keep track of accessibility focus across windows.\n\nPreviously we never kept track of accessibility focus; when a\nweb element or view got focus we'd fire an accessibility focus\nevent and leave it up to the client to keep track.\n\nThis worked fine when focus is only changing within a single\nwindow. However, this led to lots of subtle bugs and race\nconditions across windows, for example:\n\n1. If a View in a non-activatable window tried to get focus,\nwe'd fire a focus event even though the View didn't actually\nget keyboard focus.\n\n2. If the active element in a non-focused frame changed,\nwe'd fire a focus event even though that frame's window\ndid not have focus.\n\n3. Tabbing into or out of a cross-process iframe or\n<webview> element could fire a focus event on both\nthe outer and inner frame, another race condition.\n\nTo solve this, we this change makes the following\nchanges:\n\n1. Within a single accessibility tree, the focused node\nis now part of the tree data, rather than a state flag on\na node. That guarantees only one node within a tree\ncan be focused at once. This affects both the web\naccessibility tree and the views accessibility tree.\n\n2. Whenever we get an accessibility focus event, we\nstart at the root and figure out what node has focus,\nglobally. Then we only fire the accessibility focus event\non that new node if focus has changed.\n\nAs an example, suppose we open a Chrome app that\nembeds a <webview> that loads the google.com homepage,\nwhich focuses the input element. Initially the app window\nitself does not have focus, so we don't fire any focus events.\n\nLater the app window gets activated. We now follow the focus\nchain to the <webview> element and to the focused input\nelement, and fire a focus event on the input element\ndirectly.\n\nBUG=581910\n\nReview URL: https://codereview.chromium.org/1589623002\n\nCr-Commit-Position: refs/heads/master@{#376339}","distinct":true,"url":"https://api.github.com/repos/dstockwell/chromium/commits/965ba000de4c91156005af7e23235574f8c2cc93"}]}