Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Issue 2647633002: Do not size PermissionSelectorRow to preferred size (Closed)

Created:
3 years, 11 months ago by estark
Modified:
3 years, 11 months ago
Reviewers:
lgarron, msw
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org, tfarina
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -6 lines) Patch
M chrome/browser/ui/views/website_settings/permission_selector_row.cc View 1 chunk +1 line, -6 lines 0 comments Download

Messages

Total messages: 14 (9 generated)
estark
lgarron: have only tested on Linux so far (not Mac), but lmk if you think ...
3 years, 11 months ago (2017-01-19 06:46:02 UTC) #4
lgarron
LGTM, since it works on Mac and I don't think there are any horrible performance ...
3 years, 11 months ago (2017-01-19 22:02:20 UTC) #8
msw
nice! lgtm
3 years, 11 months ago (2017-01-20 07:34:16 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2647633002/1
3 years, 11 months ago (2017-01-20 07:45:22 UTC) #11
commit-bot: I haz the power
3 years, 11 months ago (2017-01-20 08:46:23 UTC) #14
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/f24aa8ad5db849c114c91cddcc29...

Powered by Google App Engine
This is Rietveld 408576698