Account for bookmark bar height when calculating preview image size.
Previously, the target tab preview size for the tablet (Mohnstrudel) tabstrip was determined by the size of the web viewport. However, the size of the viewport can be affected by the visibility of the bookmark bar, which is dependent on a number of factors including whether the user has opted to enable the bar, whether the current page is the NTP, whether the current page is crashed, etc. That resulted in a situation where the size of the thumbnails in the tabstrip could change as the user switched between tabs. This CL standardizes the thumbnail size to be based on the size of the viewport if the bookmark bar were completely visible, regardless of the current bookmark bar state. The result is that in the event the user has disabled the bookmark bar, the resulting thumbnail may be slightly shorter than it would otherwise be, which can result in a couple of pixels being trimmed off the right and left when the thumbnail is displayed. However, it's extremely hard to notice this slight reduction in fidelity compared to the benefit of having the thumbnail size constantly changing. Bug: 1066652 Change-Id: I05fc47ac6f99e1323ebe682a636151fb81360229 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2462492 Auto-Submit: Dana Fried <dfried@chromium.org> Commit-Queue: Collin Baker <collinbaker@chromium.org> Reviewed-by:Collin Baker <collinbaker@chromium.org> Cr-Commit-Position: refs/heads/master@{#815895}
Showing
Please register or sign in to comment