[Scrollable Shelf] Fix crash under extremely small display
As reported by Clusterfuzz, hotseat widget may not have enough space to fully show even one shelf icon. Under that edge case, the end of the last shelf icon will be outside the scrollable shelf. Based on the current code, |last_visible_view_index| will be -1. This CL fixes the issue. Bug: 1094363 Change-Id: Ib4a49267c82a54e3c66f88df9702dddb216eca89 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2250706 Commit-Queue: Andrew Xu <andrewxu@chromium.org> Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#779561}
Showing
Please register or sign in to comment