|
|
Chromium Code Reviews|
Created:
4 years, 6 months ago by Matt Giuca Modified:
4 years, 6 months ago CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@mac-new-back-shortcut-bubble Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFixed overlapping subtle notifications on Mac.
Can happen when a fullscreen/pointer-lock bubble and a new-back-shortcut
bubble are visible at the same time. Now the new bubble will dismiss the
old bubble (which is the behaviour on Views platforms).
BUG=615971
Committed: https://crrev.com/e1ec367efc1eeae3ba9fcb7309d4e0be44e6c44f
Cr-Commit-Position: refs/heads/master@{#397973}
Patch Set 1 #
Messages
Total messages: 18 (6 generated)
mgiuca@chromium.org changed reviewers: + tapted@chromium.org
lgtm
The CQ bit was checked by mgiuca@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028963002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2028963002/1
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Patchset #2 (id:20001) has been deleted
The CQ bit was checked by mgiuca@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028963002/1
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Description was changed from ========== Fixed overlapping subtle notifications on Mac. Can happen when a fullscreen/pointer-lock bubble and a new-back-shortcut bubble are visible at the same time. Now the new bubble will dismiss the old bubble (which is the behaviour on Views platforms). BUG=615971 ========== to ========== Fixed overlapping subtle notifications on Mac. Can happen when a fullscreen/pointer-lock bubble and a new-back-shortcut bubble are visible at the same time. Now the new bubble will dismiss the old bubble (which is the behaviour on Views platforms). BUG=615971 Committed: https://crrev.com/e1ec367efc1eeae3ba9fcb7309d4e0be44e6c44f Cr-Commit-Position: refs/heads/master@{#397973} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/e1ec367efc1eeae3ba9fcb7309d4e0be44e6c44f Cr-Commit-Position: refs/heads/master@{#397973}
Message was sent while issue was closed.
Drive-by: Does ShowNewBackShortcutBubble() need to do the other stuff in Destroy() (or maybe should call that method)? Or is resetting that other state incorrect?
Message was sent while issue was closed.
Hmm, this is a bit messy but I think it's fine to not destroy the NBSB in Destroy: https://cs.chromium.org/chromium/src/chrome/browser/ui/cocoa/browser_window_c... Destroy is only called when we want to hide the fullscreen bubble. That probably shouldn't close the NBSB. It's an unfortunate effect of repurposing the ExclusiveAccessController for the new back bubble.
Message was sent while issue was closed.
On 2016/06/07 07:37:20, Matt Giuca wrote: > Hmm, this is a bit messy but I think it's fine to not destroy the NBSB in > Destroy: > > https://cs.chromium.org/chromium/src/chrome/browser/ui/cocoa/browser_window_c... > > Destroy is only called when we want to hide the fullscreen bubble. That probably > shouldn't close the NBSB. It's an unfortunate effect of repurposing the > ExclusiveAccessController for the new back bubble. I think you got my question reversed. I didn't mean "should Destroy() also close the NBSB". I meant "should the code that closes the fullscreen bubble when we show the NBSB being doing all the things Destroy() does, not just deleting the fullscreen bubble".
Message was sent while issue was closed.
On 2016/06/07 21:40:21, Peter Kasting wrote: > On 2016/06/07 07:37:20, Matt Giuca wrote: > > Hmm, this is a bit messy but I think it's fine to not destroy the NBSB in > > Destroy: > > > > > https://cs.chromium.org/chromium/src/chrome/browser/ui/cocoa/browser_window_c... > > > > Destroy is only called when we want to hide the fullscreen bubble. That > probably > > shouldn't close the NBSB. It's an unfortunate effect of repurposing the > > ExclusiveAccessController for the new back bubble. > > I think you got my question reversed. I didn't mean "should Destroy() also > close the NBSB". I meant "should the code that closes the fullscreen bubble > when we show the NBSB being doing all the things Destroy() does, not just > deleting the fullscreen bubble". I noticed this in review, and I had a quick peek at the Destroy stuff. Apart from tearing down the window, the only other stuff in Destroy deals with things specifically for fullscreen -- and the codepaths for fullscreen that used to call Destroy will still call Destroy. Calling Destroy() multiple times is fine, so ShowNewBackShortcutBubble() could call Destroy instead, but it's not required to hide the window, so I didn't have strong feelings about it. Looking deeper, there is a side-effect of not calling Destroy(), but I think it's the one we want. Fullscreen on Mac takes a ~second or so and is asynchronous, the fullscreen bubble is configured at the start and shown at the end. If Destroy() were to be called _during_ that transition due to backspace to go back then the call to [BrowserWindowController showFullscreenExitBubbleIfNecessary] at the end of the fullscreen transition wouldn't show anything and wouldn't update the location of the backspace-to-go-back bubble. Skipping the other stuff in Destroy ensures that the bubble will be the fullscreen one, but also ensures it will be shown at the right place. There's also probably dead code in Destroy() that can be removed -- E.g. I don't think url_ is used for anything any more -- it's never displayed on the simplified fullscreen bubble.
Message was sent while issue was closed.
On 2016/06/08 00:54:45, tapted wrote: > On 2016/06/07 21:40:21, Peter Kasting wrote: > > On 2016/06/07 07:37:20, Matt Giuca wrote: > > > Hmm, this is a bit messy but I think it's fine to not destroy the NBSB in > > > Destroy: > > > > > > > > > https://cs.chromium.org/chromium/src/chrome/browser/ui/cocoa/browser_window_c... > > > > > > Destroy is only called when we want to hide the fullscreen bubble. That > > probably > > > shouldn't close the NBSB. It's an unfortunate effect of repurposing the > > > ExclusiveAccessController for the new back bubble. > > > > I think you got my question reversed. I didn't mean "should Destroy() also > > close the NBSB". I meant "should the code that closes the fullscreen bubble > > when we show the NBSB being doing all the things Destroy() does, not just > > deleting the fullscreen bubble". > > I noticed this in review, and I had a quick peek at the Destroy stuff. Apart > from tearing down the window, the only other stuff in Destroy deals with things > specifically for fullscreen -- and the codepaths for fullscreen that used to > call Destroy will still call Destroy. Calling Destroy() multiple times is fine, > so ShowNewBackShortcutBubble() could call Destroy instead, but it's not required > to hide the window, so I didn't have strong feelings about it. > > Looking deeper, there is a side-effect of not calling Destroy(), but I think > it's the one we want. Fullscreen on Mac takes a ~second or so and is > asynchronous, the fullscreen bubble is configured at the start and shown at the > end. If Destroy() were to be called _during_ that transition due to backspace to > go back then the call to [BrowserWindowController > showFullscreenExitBubbleIfNecessary] at the end of the fullscreen transition > wouldn't show anything and wouldn't update the location of the > backspace-to-go-back bubble. Skipping the other stuff in Destroy ensures that > the bubble will be the fullscreen one, but also ensures it will be shown at the > right place. > > There's also probably dead code in Destroy() that can be removed -- E.g. I don't > think url_ is used for anything any more -- it's never displayed on the > simplified fullscreen bubble. OK thanks for clarifying Trent. It sounds like this code is a bit unclear but is probably doing the right thing. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
