| Index: ui/base/cocoa/underlay_opengl_hosting_window.mm
|
| diff --git a/ui/base/cocoa/underlay_opengl_hosting_window.mm b/ui/base/cocoa/underlay_opengl_hosting_window.mm
|
| index 6ed0624a6a3652537d10205c4d4b5240d1c53604..b82decd98d7e9b238c680e1317e24c51a08b038e 100644
|
| --- a/ui/base/cocoa/underlay_opengl_hosting_window.mm
|
| +++ b/ui/base/cocoa/underlay_opengl_hosting_window.mm
|
| @@ -87,6 +87,20 @@ void RootDidAddSubview(id self, SEL _cmd, NSView* subview) {
|
| styleMask:(NSUInteger)windowStyle
|
| backing:(NSBackingStoreType)bufferingType
|
| defer:(BOOL)deferCreation {
|
| + // It is invalid to create windows with zero width or height. It screws things
|
| + // up royally:
|
| + // - It causes console spew: <http://crbug.com/78973>
|
| + // - It breaks Expose: <http://sourceforge.net/projects/heat-meteo/forums/forum/268087/topic/4582610>
|
| + //
|
| + // This is a banned practice
|
| + // <http://www.chromium.org/developers/coding-style/cocoa-dos-and-donts>. Do
|
| + // not do this. Use kWindowSizeDeterminedLater in
|
| + // ui/base/cocoa/window_size_constants.h instead.
|
| + //
|
| + // (This is checked here because UnderlayOpenGLHostingWindow is the base of
|
| + // most Chromium windows, not because this is related to its functionality.)
|
| + DCHECK(contentRect.size.width > 0 &&
|
| + contentRect.size.height > 0);
|
| if ((self = [super initWithContentRect:contentRect
|
| styleMask:windowStyle
|
| backing:bufferingType
|
|
|