| Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
| diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
| index cf15d6dd1d0e6dbf307d6ffaf2fd2589d005ffde..c654d6be30177c1b2ac4bedb8d36b8f2f446c579 100644
|
| --- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
| +++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
|
| @@ -331,12 +331,19 @@ void updatePolicyForEvent(const WebInputEvent* inputEvent,
|
| }
|
|
|
| WebNavigationPolicy getNavigationPolicy(const WindowFeatures& features) {
|
| - // If our default configuration was modified by a script or wasn't
|
| - // created by a user gesture, then show as a popup. Else, let this
|
| - // new window be opened as a toplevel window.
|
| - bool asPopup = !features.toolBarVisible || !features.statusBarVisible ||
|
| - !features.scrollbarsVisible || !features.menuBarVisible ||
|
| - !features.resizable;
|
| + // If the window features didn't enable the toolbar, or this window wasn't
|
| + // created by a user gesture, show as a popup instead of a new tab.
|
| + //
|
| + // Note: this previously also checked that menubar, resizable, scrollbar, and
|
| + // statusbar are enabled too. When no feature string is specified, these
|
| + // features default to enabled (and the window opens as a new tab). However,
|
| + // when a feature string is specified, any *unspecified* features default to
|
| + // disabled, often causing the window to open as a popup instead.
|
| + //
|
| + // As specifying menubar, resizable, scrollbar, and statusbar have no effect
|
| + // on the UI, just ignore them and only consider whether or not the toolbar is
|
| + // enabled, which matches Firefox's behavior.
|
| + bool asPopup = !features.toolBarVisible;
|
|
|
| NavigationPolicy policy = NavigationPolicyNewForegroundTab;
|
| if (asPopup)
|
|
|