Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Repair the widget size of the fullscreen permission request bubble
This regressed in r338796 which avoided adding borders to buttons that would immediately be replaced when the NativeTheme was set. However, ExclusiveAccessBubbleViews is not a WidgetDelegate[View] or a BubbleDelegate[View], so has custom preferred-sizing code. It also removes its layout manager during construction, preventing the usual auto-layout from being triggered when the NativeTheme is set. This means that it performs a single layout at construction time to determine a preferred size. Since it was doing this before adding the view to the widget, the size was being calculated without taking into account the NativeTheme-styled buttons. Before r338796 it would size based on Chrome-OS style buttons before replacing with (on Linux) GTK style buttons, which worked OK. After r338796 this changed to a layout based on no borders. To fix, add the view to the widget before calculating the preferred size. BUG=510724 Review URL: https://codereview.chromium.org/1235983005 Cr-Commit-Position: refs/heads/master@{#339351}
- Loading branch information