Commit 92af67fd authored by andresantoso's avatar andresantoso Committed by Commit bot

Revert of Mac: Update sheet position when bookmark bar is shown or hidden....

Revert of Mac: Update sheet position when bookmark bar is shown or hidden. (patchset #1 id:1 of https://codereview.chromium.org/502413004/)

Reason for revert:
Broke certificate info positioning when switching tabs (http://crbug.com/419371).
I will need to come up with a better fix for this, but it looks complicated and that bug is a M39 stable blocker so reverting this first.

Original issue's description:
> Mac: Update sheet position when bookmark bar is shown or hidden.
>
> In r272421, I changed sheet repositioning on window resize to be based on
> NSWindowDidResizeNotification instead of NSViewFrameDidChangeNotification
> because it tracks window resizing much more smoothly.
>
> That caused this problem where if the browser window is vertically maximized
> (or is in fullscreen), the window size does not change when the bookmark bar
> is shown or hidden.
>
> The old code has a different bug however. If the browser window is not
> vertically maximized, showing or hiding the bookmark bar does not change the
> browser content view's frame. It moves up or down to follow the window resize
> but its frame relative to its superview remains the same.
>
> I settled for adding code to explicitly update the sheet's position when the
> bookmark bar is shown or hidden.
>
> BUG=407509
>
> Committed: https://crrev.com/5648b809d1c50e3de754b96abe7cf2b60150ff4d
> Cr-Commit-Position: refs/heads/master@{#292421}

TBR=avi@chromium.org
BUG=407509

Review URL: https://codereview.chromium.org/653733002

Cr-Commit-Position: refs/heads/master@{#299391}
parent c3888bee
......@@ -45,7 +45,6 @@
#import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
#import "chrome/browser/ui/cocoa/browser_window_layout.h"
#import "chrome/browser/ui/cocoa/browser_window_utils.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h"
#import "chrome/browser/ui/cocoa/dev_tools_controller.h"
#import "chrome/browser/ui/cocoa/download/download_shelf_controller.h"
#include "chrome/browser/ui/cocoa/extensions/extension_keybinding_registry_cocoa.h"
......@@ -1975,9 +1974,6 @@ using content::WebContents;
[toolbarController_ setDividerOpacity:[self toolbarDividerOpacity]];
[self adjustToolbarAndBookmarkBarForCompression:
[controller getDesiredToolbarHeightCompression]];
[[ConstrainedWindowSheetController controllerForParentWindow:[self window]]
updateSheetPosition];
}
// (Needed for |BookmarkBarControllerDelegate| protocol.)
......
......@@ -59,10 +59,6 @@
// Gets the number of sheets attached to the controller's window.
- (int)sheetCount;
// Update the sheet's position, for example when the bookmark bar was shown or
// hidden.
- (void)updateSheetPosition;
@end
#endif // CHROME_BROWSER_UI_COCOA_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_SHEET_CONTROLLER_H_
......@@ -192,10 +192,6 @@ NSValue* GetKeyForParentWindow(NSWindow* parent_window) {
return [sheets_ count];
}
- (void)updateSheetPosition {
[self updateSheetPosition:activeView_];
}
- (ConstrainedWindowSheetInfo*)findSheetInfoForParentView:(NSView*)parentView {
for (ConstrainedWindowSheetInfo* info in sheets_.get()) {
if ([parentView isEqual:[info parentView]])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment