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

Issue 402443003: mac: [Yosemite] Fix bug where zoom button causes fullscreen mode. (Closed)

Created:
6 years, 5 months ago by erikchen
Modified:
6 years, 5 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

mac: [Yosemite] Fix bug where zoom button causes fullscreen mode. In Yosemite, holding down alt while clicking the fullscreen button is supposed to zoom the window. This doesn't work because Chrome violates unstated AppKit assumptions. The problem seems to lie in hit testing the location of the zoom button. Reordering the subviews by moving the tab strip and the content view behind the zoom button fixes the problem. BUG=393808 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284544

Patch Set 1 : #

Patch Set 2 : Complete rewrite. #

Total comments: 6

Patch Set 3 : Comments from andresantoso. #

Total comments: 2

Patch Set 4 : Comments from andresantoso, round 2. #

Total comments: 2

Patch Set 5 : Rebase against top of tree. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+39 lines, -6 lines) Patch
M chrome/browser/ui/cocoa/version_independent_window.mm View 1 2 3 4 3 chunks +39 lines, -6 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
erikchen
andresantoso: Please review.
6 years, 5 months ago (2014-07-16 20:31:19 UTC) #1
erikchen
andresantoso: Please Review.
6 years, 5 months ago (2014-07-17 17:25:23 UTC) #2
Andre
https://codereview.chromium.org/402443003/diff/40001/chrome/browser/ui/cocoa/version_independent_window.mm File chrome/browser/ui/cocoa/version_independent_window.mm (right): https://codereview.chromium.org/402443003/diff/40001/chrome/browser/ui/cocoa/version_independent_window.mm#newcode26 chrome/browser/ui/cocoa/version_independent_window.mm:26: if ([firstView isKindOfClass:[FullSizeContentView class]]) How about (firstView == [[firstView ...
6 years, 5 months ago (2014-07-17 17:56:17 UTC) #3
erikchen
andresantoso: PTAL https://codereview.chromium.org/402443003/diff/40001/chrome/browser/ui/cocoa/version_independent_window.mm File chrome/browser/ui/cocoa/version_independent_window.mm (right): https://codereview.chromium.org/402443003/diff/40001/chrome/browser/ui/cocoa/version_independent_window.mm#newcode26 chrome/browser/ui/cocoa/version_independent_window.mm:26: if ([firstView isKindOfClass:[FullSizeContentView class]]) On 2014/07/17 17:56:16, ...
6 years, 5 months ago (2014-07-17 18:22:45 UTC) #4
Andre
https://codereview.chromium.org/402443003/diff/80001/chrome/browser/ui/cocoa/version_independent_window.mm File chrome/browser/ui/cocoa/version_independent_window.mm (right): https://codereview.chromium.org/402443003/diff/80001/chrome/browser/ui/cocoa/version_independent_window.mm#newcode24 chrome/browser/ui/cocoa/version_independent_window.mm:24: NSWindow* contentView = [[firstView window] contentView]; NSView* contentView
6 years, 5 months ago (2014-07-17 18:25:36 UTC) #5
erikchen
https://codereview.chromium.org/402443003/diff/80001/chrome/browser/ui/cocoa/version_independent_window.mm File chrome/browser/ui/cocoa/version_independent_window.mm (right): https://codereview.chromium.org/402443003/diff/80001/chrome/browser/ui/cocoa/version_independent_window.mm#newcode24 chrome/browser/ui/cocoa/version_independent_window.mm:24: NSWindow* contentView = [[firstView window] contentView]; On 2014/07/17 18:25:36, ...
6 years, 5 months ago (2014-07-17 18:44:37 UTC) #6
Andre
lgtm
6 years, 5 months ago (2014-07-17 18:45:41 UTC) #7
Andre
lgtm
6 years, 5 months ago (2014-07-17 18:45:43 UTC) #8
erikchen
shess: Looking for an OWNER review of chrome/browser/ui/cocoa
6 years, 5 months ago (2014-07-17 18:48:36 UTC) #9
Scott Hess - ex-Googler
LGTM, your call as to whether you want to experiment with my suggestion. https://codereview.chromium.org/402443003/diff/100001/chrome/browser/ui/cocoa/version_independent_window.mm File ...
6 years, 5 months ago (2014-07-17 21:03:09 UTC) #10
erikchen
https://codereview.chromium.org/402443003/diff/100001/chrome/browser/ui/cocoa/version_independent_window.mm File chrome/browser/ui/cocoa/version_independent_window.mm (right): https://codereview.chromium.org/402443003/diff/100001/chrome/browser/ui/cocoa/version_independent_window.mm#newcode117 chrome/browser/ui/cocoa/version_independent_window.mm:117: context:subviews.get()]; On 2014/07/17 21:03:09, Scott Hess wrote: > Wow. ...
6 years, 5 months ago (2014-07-17 21:17:08 UTC) #11
Scott Hess - ex-Googler
On 2014/07/17 21:17:08, erikchen wrote: > https://codereview.chromium.org/402443003/diff/100001/chrome/browser/ui/cocoa/version_independent_window.mm > File chrome/browser/ui/cocoa/version_independent_window.mm (right): > > https://codereview.chromium.org/402443003/diff/100001/chrome/browser/ui/cocoa/version_independent_window.mm#newcode117 > ...
6 years, 5 months ago (2014-07-17 21:18:44 UTC) #12
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 5 months ago (2014-07-17 21:22:37 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/402443003/120001
6 years, 5 months ago (2014-07-17 21:26:22 UTC) #14
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-18 01:50:15 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-18 02:11:43 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered_tests/builds/172247)
6 years, 5 months ago (2014-07-18 02:11:43 UTC) #17
erikchen
The CQ bit was checked by erikchen@chromium.org
6 years, 5 months ago (2014-07-21 23:25:31 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/402443003/120001
6 years, 5 months ago (2014-07-21 23:28:02 UTC) #19
commit-bot: I haz the power
Change committed as 284544
6 years, 5 months ago (2014-07-22 00:06:56 UTC) #20
Kunihiko Sakamoto
A revert of this CL has been created in https://codereview.chromium.org/402323002/ by ksakamoto@chromium.org. The reason for ...
6 years, 5 months ago (2014-07-22 00:46:28 UTC) #21
Nico
6 years, 5 months ago (2014-07-22 01:17:15 UTC) #22
Message was sent while issue was closed.
A revert of this CL has been created in
https://codereview.chromium.org/408103003/ by thakis@chromium.org.

The reason for reverting is: Doesn't build on the mac asan builder (
http://build.chromium.org/p/chromium.memory/builders/Mac%20ASan%2064%20Builde...
):

../../chrome/browser/ui/cocoa/version_independent_window.mm:109:44: error:
cannot initialize a parameter of type 'NSComparisonResult (*)(id, id, void *)'
with an rvalue of type 'int (*)(id, id, void *)': different return type
('NSComparisonResult' (aka 'long') vs 'int')
      [superview sortSubviewsUsingFunction:&ReorderContentViewToBack
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:175:75:
note: passing argument to parameter 'compare' here
- (void)sortSubviewsUsingFunction:(NSComparisonResult (*)(id, id, void
*))compare context:(void *)context;
                                                                          ^.

Powered by Google App Engine
This is Rietveld 408576698