Move infobar separator drawing to InfoBarView.
This leaves InfoBarBackground drawing only the solid-color fill; a subsequent patch will remove InfoBarBackground entirely. This also changes how the separator size is computed. Previously, all infobars reported their preferred size including a separator, and InfoBarContainerView trimmed 1 DIP off the bottom infobar. However, this didn't actually prevent InfoBarBackground from drawing the separator on that infobar (I think). Now, separators are drawn at the top rather than the bottom, so it's the top infobar which may need to omit the separator. InfoBarView handles this omission directly when computing its desired height. InfoBarContainerView has to notify a newly-top infobar to get it to recompute the height after animation finishes. Additionally, since separators are 1 px, we only reserve 1 DIP when below DSF 2; otherwise we just use some of the space within the infobar, since the top and bottom are always padding anyway. I could have left separators drawn at the bottom of infobars rather than the top; at the time I thought through all this it seemed like doing things at the top made some parts easier, but in retrospect it'd probably be about the same either way. BUG=none TEST=none Change-Id: I682851f16cc4a6a764c13f3983f22c829e9b10bd Reviewed-on: https://chromium-review.googlesource.com/1000419Reviewed-by:Evan Stade <estade@chromium.org> Commit-Queue: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#549399}
Showing
Please register or sign in to comment