Chromium Code Reviews
DescriptionDo not size PermissionSelectorRow to preferred size
PermissionSelectorRow's preferred size is smaller than the width of the Page
Info Bubble, so when a permission changes, resizing to the preferred size means
that the row shrinks smaller than the other rows and the dropdown jumps around.
Instead, simply call Layout() to do a fresh layout of the row.
The parent()->SizeToPreferredSize() call is no longer necessary because
WebsiteSettingsPopupView calls SizeToContents() when a permission is
changed. Note that bug 655880 may want to reintroduce the
PermissionSelectorRow::ChildPreferredSizeChanged override and propagate the
change to WebsiteSettingsPopupView that way instead of via OnPermissionChanged,
but it's not needed now -- and I'm guessing that, for that bug,
PermissionSelectorRow::ChildPreferredSizeChanged may want to call
parent()->PreferredSizeChanged(), rather than calling SizeToPreferredSize()
(which assumes that the parent ought to be at its preferred size).
BUG=657286
TEST=On Windows/Linux, visit https://google.com (or any other site) and open
Page Info by clicking on the security indicator in the omnibox. Change a
permission, change it again. Observe that the dropdown does not jump to the left
of where it started.
Review-Url: https://codereview.chromium.org/2647633002
Cr-Commit-Position: refs/heads/master@{#445017}
Committed: https://chromium.googlesource.com/chromium/src/+/f24aa8ad5db849c114c91cddcc297475b8ead2c8
Patch Set 1 #
Messages
Total messages: 14 (9 generated)
|
|||||||||||||||||||