|
|
Chromium Code Reviews
Description[Mac] Don't show tooltip when zoom decoration is hidden.
In Material Design the zoom decoration is hidden when the zoom factor is
100%. When the zoom decoration's tooltip should only be visible when the
decoration is visible.
R=avi@chromium.org, dbeam@chromium.org
BUG=635480
Committed: https://crrev.com/c12fa88b187817e55ad6ccfc0416aec46cfd8314
Cr-Commit-Position: refs/heads/master@{#425389}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Address review feedback. #Patch Set 3 : Address test issue. #Patch Set 4 : Fix tests. #
Total comments: 1
Patch Set 5 : More fixes. #
Messages
Total messages: 28 (11 generated)
PTAL
LGTM with fix. https://codereview.chromium.org/2415453004/diff/1/chrome/browser/ui/cocoa/loc... File chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm (right): https://codereview.chromium.org/2415453004/diff/1/chrome/browser/ui/cocoa/loc... chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm:107: tooltip_.reset(vector_icon_id_ == gfx::VectorIconId::VECTOR_ICON_NONE It's equivalent, but it feels better to do: tooltip_.reset(relative_zoom == zoom::ZoomController::ZOOM_AT_DEFAULT_ZOOM ? @"" : [tooltip_string retain]); where we're gating on the zoom controller's response rather than an id interpretation of it.
https://codereview.chromium.org/2415453004/diff/1/chrome/browser/ui/cocoa/loc... File chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm (right): https://codereview.chromium.org/2415453004/diff/1/chrome/browser/ui/cocoa/loc... chrome/browser/ui/cocoa/location_bar/zoom_decoration.mm:107: tooltip_.reset(vector_icon_id_ == gfx::VectorIconId::VECTOR_ICON_NONE On 2016/10/12 19:40:10, Avi wrote: > It's equivalent, but it feels better to do: > > tooltip_.reset(relative_zoom == zoom::ZoomController::ZOOM_AT_DEFAULT_ZOOM > ? @"" > : [tooltip_string retain]); > > where we're gating on the zoom controller's response rather than an id > interpretation of it. I like checking the icon id because it's explicit that no vector icon means no tool tip either, but I'm fine to change it.
The CQ bit was checked by shrike@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from avi@chromium.org Link to the patchset: https://codereview.chromium.org/2415453004/#ps20001 (title: "Address review feedback.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
UpdateIfNecessary() only calls ShowAndUpdateUI() if necessary, and part of how it figures this out is by checking the current tooltip string. In the previous patchset, UpdateIfNecessary() called ShowAndUpdateUI() with a tooltip string for 100% zoom, but ShowAndUpdateUI() set the tooltip string to @"". As a result, UpdateIfNecessary() called ShowAndUpdateUI() when it didn't really need to, which broke a test. To fix this, UpdateIfNecessary() needs to determine the final tooltip string and pass that to ShowAndUpdateUI(), rather than have ShowAndUpdateUI() compute that string. PTAL
lgtm
The CQ bit was checked by shrike@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
Description was changed from ========== [Mac] Don't show tooltip when zoom decoration is hidden. In Material Design the zoom decoration is hidden when the zoom factor is 100%. When the zoom decoration's tooltip should only be visible when the decoration is visible. R=avi@chromium.org BUG=635480 ========== to ========== [Mac] Don't show tooltip when zoom decoration is hidden. In Material Design the zoom decoration is hidden when the zoom factor is 100%. When the zoom decoration's tooltip should only be visible when the decoration is visible. R=avi@chromium.org, dbeam@chromium.org BUG=635480 ==========
shrike@chromium.org changed reviewers: + dbeam@chromium.org
avi@ - please take one more look at my changes to get the test to pass. +dbeam@ for components/zoom/zoom_controller.h PTAL
lgtm w/suggestion https://codereview.chromium.org/2415453004/diff/60001/chrome/browser/ui/cocoa... File chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm (right): https://codereview.chromium.org/2415453004/diff/60001/chrome/browser/ui/cocoa... chrome/browser/ui/cocoa/location_bar/zoom_decoration_unittest.mm:38: bool IsAtDefaultZoom() const override { return zoom_percent_ == 100; } nit: you could just make zoom_percent_ = 80/100 into at_default_zoom_ = true/false
avi@ - hold off on reviewing anything. I need to make more changes.
OK, PTAL
lgtm
The CQ bit was checked by shrike@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dbeam@chromium.org Link to the patchset: https://codereview.chromium.org/2415453004/#ps80001 (title: "More fixes.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== [Mac] Don't show tooltip when zoom decoration is hidden. In Material Design the zoom decoration is hidden when the zoom factor is 100%. When the zoom decoration's tooltip should only be visible when the decoration is visible. R=avi@chromium.org, dbeam@chromium.org BUG=635480 ========== to ========== [Mac] Don't show tooltip when zoom decoration is hidden. In Material Design the zoom decoration is hidden when the zoom factor is 100%. When the zoom decoration's tooltip should only be visible when the decoration is visible. R=avi@chromium.org, dbeam@chromium.org BUG=635480 ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== [Mac] Don't show tooltip when zoom decoration is hidden. In Material Design the zoom decoration is hidden when the zoom factor is 100%. When the zoom decoration's tooltip should only be visible when the decoration is visible. R=avi@chromium.org, dbeam@chromium.org BUG=635480 ========== to ========== [Mac] Don't show tooltip when zoom decoration is hidden. In Material Design the zoom decoration is hidden when the zoom factor is 100%. When the zoom decoration's tooltip should only be visible when the decoration is visible. R=avi@chromium.org, dbeam@chromium.org BUG=635480 Committed: https://crrev.com/c12fa88b187817e55ad6ccfc0416aec46cfd8314 Cr-Commit-Position: refs/heads/master@{#425389} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/c12fa88b187817e55ad6ccfc0416aec46cfd8314 Cr-Commit-Position: refs/heads/master@{#425389} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
