REGRESSION (r142755): window.open creates an invisible window when width and height...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Aug 2013 23:25:11 +0000 (23:25 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Aug 2013 23:25:11 +0000 (23:25 +0000)
commitb3f2fbc1c6df2fb417d8c528aab212b5a2b0e037
tree326d5db02d87f84dc7fa3696aa4982ebbd5db2ee
parentcc84fb3cb3d5cc1f24d072205b536ea95cd9184e
REGRESSION (r142755): window.open creates an invisible window when width and height are 0
https://bugs.webkit.org/show_bug.cgi?id=119633

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/dom/Window/open-zero-size-as-default.html

Relying on each WebKit to refuse setting size to zero was fragile - because this
required each one to have the check, and because by the time the client was called,
the initially zero size was not necessarily zero.

* loader/FrameLoader.cpp: (WebCore::createWindow): When sizes are zero, keep the
size the window was created with, because that's the default one by definition.

* page/DOMWindow.cpp: (WebCore::DOMWindow::adjustWindowRect): It's too late to
check for zero size now, it's been mangled to adjust for the difference between
window and viewport size.

Source/WebKit/efl:

* WebCoreSupport/ChromeClientEfl.cpp: (WebCore::ChromeClientEfl::setWindowRect):
Once again, the passed rect cannot be empty.

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp: (WebKit::ChromeClient::setWindowRect):
Once again, the passed rect cannot be empty.

LayoutTests:

* fast/dom/Window/open-zero-size-as-default-expected.txt: Added.
* fast/dom/Window/open-zero-size-as-default.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/open-zero-size-as-default-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/open-zero-size-as-default.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp