Allow device chooser table to handle clicks.
Originally, when the table was visible, the device chooser had three children: a scroll view containiner the table, and two invisible centered labels. In https://chromium-review.googlesource.com/c/chromium/src/+/1837079 I reworked this to center the labels using anonymous views with layout managers. This meant that the device chooser now contained three visible full-size children (which, in two cases, just contained an invisible centered child). As a result the last child (which was highest in Z order) became the event handler at all times, and while it would bubble events to its parent, there was no way for them to get over to the sibling scroll view. The solution is to toggle the visibility of these centering views, rather than toggling the visibility of their contained labels. This causes event targeting to select the scroll view again. Also does various additional cleanup I noticed while working on this. Bug: 1011536 Change-Id: I27c496ebf4899b94bd442a1eaeb5e6ddbca387a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1843294 Commit-Queue: Peter Boström <pbos@chromium.org> Reviewed-by:Reilly Grant <reillyg@chromium.org> Reviewed-by:
Peter Boström <pbos@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#703497}
Showing
Please register or sign in to comment