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

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

Created:
3 years, 11 months ago by estark
Modified:
3 years, 11 months ago
Reviewers:
CC:
chromium-reviews
Target Ref:
refs/pending/branch-heads/2987
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} (cherry picked from commit f24aa8ad5db849c114c91cddcc297475b8ead2c8) Review-Url: https://codereview.chromium.org/2647173002 . Cr-Commit-Position: refs/branch-heads/2987@{#11} Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943} Committed: https://chromium.googlesource.com/chromium/src/+/85df4fc55cf9dd7200d6ef94914dd8c553e747bc

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: 2 (1 generated)
estark
3 years, 11 months ago (2017-01-21 16:29:47 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
85df4fc55cf9dd7200d6ef94914dd8c553e747bc.

Powered by Google App Engine
This is Rietveld 408576698