[WebLayer] Fix initial top controls positioning
This is a followup to crrev.com/c/2412810, which fixed the controls positioning during page loads in every case except the one we were supposed to fix in the original bug. The issue with that CL was that it always set the controls height to be the same as the previous height, or 0 if there weren't controls before. However, the renderer defaults the controls to expanded initially, so collapsing them on first load wasn't the right behavior. To fix this I make onLayout position new controls so that the same amount of them is showing as *the last time a view was set*, and defaults to an expanded view. This is the behavior the renderer follows. Bug: 1128391 Change-Id: I6a2c65629a8d24476e7c2e07158295574cac0c37 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2423007Reviewed-by:Bo <boliu@chromium.org> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org> Cr-Commit-Position: refs/heads/master@{#809496}
Showing
Please register or sign in to comment