| Index: content/browser/web_contents/web_contents_view_mac.mm
|
| diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
|
| index 5a1368d92f5c03a7beb97094210eefededd29a75..b1521f554aec3020804d917ca21a8bc22e3ac4c4 100644
|
| --- a/content/browser/web_contents/web_contents_view_mac.mm
|
| +++ b/content/browser/web_contents/web_contents_view_mac.mm
|
| @@ -656,13 +656,20 @@ void WebContentsViewMac::CloseTab() {
|
| webContents->UpdateWebContentsVisibility(viewVisible);
|
| }
|
|
|
| -// When the subviews require a layout, their size should be reset to the size
|
| -// of this view. (It is possible for the size to get out of sync as an
|
| -// optimization in preparation for an upcoming WebContentsView resize.
|
| -// http://crbug.com/264207)
|
| - (void)resizeSubviewsWithOldSize:(NSSize)oldBoundsSize {
|
| - for (NSView* subview in self.subviews)
|
| - [subview setFrame:self.bounds];
|
| + // Subviews do not participate in auto layout unless the the size this view
|
| + // changes. This allows RenderWidgetHostViewMac::SetBounds(..) to select a
|
| + // size of the subview that differs from its superview in preparation for an
|
| + // upcoming WebContentsView resize.
|
| + // See http://crbug.com/264207 and http://crbug.com/655112.
|
| +}
|
| +
|
| +- (void)setFrameSize:(NSSize)newSize {
|
| + [super setFrameSize:newSize];
|
| +
|
| + // Perform manual layout of subviews, e.g., when the window size changes.
|
| + for (NSView* subview in [self subviews])
|
| + [subview setFrame:[self bounds]];
|
| }
|
|
|
| - (void)viewWillMoveToWindow:(NSWindow*)newWindow {
|
|
|