Commit feb3dd73 authored by eric@webkit.org's avatar eric@webkit.org
Browse files

2010-05-27 Hans Wennborg <hans@chromium.org>

        Reviewed by Jeremy Orlow.

        [Chromium] Default popup window size should not depend on zoom level
        https://bugs.webkit.org/show_bug.cgi?id=39835

        V8DOMWindow::openCallback should not set width and height of new
        window unless specified in the function's arguments.

        There is already code to reset the new window's origin coordinates,
        but the same thing should be done to its dimensions as well. Otherwise,
        a new popup with unspecified size will have its size depending on the
        parent's zoom level, which is not desirable.

        This is the same as what is done in
        bindings/js/JSDOMWindowCustom.cpp:826.

        * bindings/v8/custom/V8DOMWindowCustom.cpp:
        (WebCore::V8DOMWindow::openCallback):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@60324 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cf361d76
2010-05-27 Hans Wennborg <hans@chromium.org>
Reviewed by Jeremy Orlow.
[Chromium] Default popup window size should not depend on zoom level
https://bugs.webkit.org/show_bug.cgi?id=39835
V8DOMWindow::openCallback should not set width and height of new
window unless specified in the function's arguments.
There is already code to reset the new window's origin coordinates,
but the same thing should be done to its dimensions as well. Otherwise,
a new popup with unspecified size will have its size depending on the
parent's zoom level, which is not desirable.
This is the same as what is done in
bindings/js/JSDOMWindowCustom.cpp:826.
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::openCallback):
2010-05-27 Anders Bakken <agbakken@gmail.com>
Reviewed by David Levin.
......
......@@ -686,7 +686,7 @@ v8::Handle<v8::Value> V8DOMWindow::openCallback(const v8::Arguments& args)
windowFeatures.height = windowRect.height();
windowFeatures.width = windowRect.width();
// If either of the origin coordinates weren't set in the original
// If either of the origin coordinates or dimensions weren't set in the original
// string, make sure they aren't set now.
if (!rawFeatures.xSet) {
windowFeatures.x = 0;
......@@ -696,6 +696,14 @@ v8::Handle<v8::Value> V8DOMWindow::openCallback(const v8::Arguments& args)
windowFeatures.y = 0;
windowFeatures.ySet = false;
}
if (!rawFeatures.widthSet) {
windowFeatures.width = 0;
windowFeatures.widthSet = false;
}
if (!rawFeatures.heightSet) {
windowFeatures.height = 0;
windowFeatures.heightSet = false;
}
frame = V8BindingDOMWindow::createWindow(V8BindingState::Only(), callingFrame, enteredFrame, frame, urlString, frameName, windowFeatures, v8::Local<v8::Value>());
......
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