| commit | 89ae702eba4230d70d37f311cd83663a83c64d6e | [log] [tgz] |
|---|---|---|
| author | Peter Kasting <pkasting@chromium.org> | Mon Dec 09 21:28:44 2019 |
| committer | Commit Bot <commit-bot@chromium.org> | Mon Dec 09 21:28:44 2019 |
| tree | 51522a7367c42f435187a4d7dd9d1a1e7801199d | |
| parent | 867688930f8c99fcd1bdbb9f5077f7bfcbeff326 [diff] |
Avoid updating remove suggestion button visibility in Invalidate(). Invalidate() runs more often than necessary, though since the code to update visibility only conditionally calls InvalidateLayout() this doesn't really matter. Slightly more problematic is that updating in Invalidate() makes it harder to see which events can and cannot affect visibility. Most importantly, Invalidate() expects remove button visibility to already be up-to-date on entry. Instead, factor out remove button visibility updates to a helper, then call this in the cases where the state can change. This requires some plumbing changes to notify a result view when it's losing selection. Bug: none Change-Id: I5d5bdec3dce9d22d4bc5d9cbe62eed9d60fb243a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940563 Auto-Submit: Peter Kasting <pkasting@chromium.org> Reviewed-by: Tommy Li <tommycli@chromium.org> Reviewed-by: Justin Donnelly <jdonnelly@chromium.org> Commit-Queue: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#723089}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .