Reviewed by Adam Roben.
http://bugs.webkit.org/show_bug.cgi?id=16128
Ignore resizable=no for window.open().
* bindings/js/kjs_window.cpp:
(KJS::setWindowFeature):
(KJS::parseWindowFeatures):
* manual-tests/window-open-features-parsing.html:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28300
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-12-01 Rahul Abrol <ra5ul@comcast.net>
+
+ Reviewed by Adam Roben.
+
+ http://bugs.webkit.org/show_bug.cgi?id=16128
+ Ignore resizable=no for window.open().
+
+ * bindings/js/kjs_window.cpp:
+ (KJS::setWindowFeature):
+ (KJS::parseWindowFeatures):
+ * manual-tests/window-open-features-parsing.html:
+
2007-12-01 Dan Bernstein <mitz@apple.com>
Reviewed by Darin Adler.
value = 1;
else
value = valueString.toInt();
-
+
+ // We ignore a keyString of "resizable", which is consistent with Firefox.
if (keyString == "left" || keyString == "screenx") {
windowFeatures.xSet = true;
windowFeatures.x = value;
windowFeatures.locationBarVisible = value;
else if (keyString == "status")
windowFeatures.statusBarVisible = value;
- else if (keyString == "resizable")
- windowFeatures.resizable = value;
else if (keyString == "fullscreen")
windowFeatures.fullscreen = value;
else if (keyString == "scrollbars")
standard that applies to this method.)
<http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp>
+ We always allow a window to be resized, which is consistent with Firefox.
*/
windowFeatures.dialog = false;
windowFeatures.toolBarVisible = false;
windowFeatures.locationBarVisible = false;
windowFeatures.scrollbarsVisible = false;
- windowFeatures.resizable = false;
+ windowFeatures.resizable = true;
// Tread lightly in this code -- it was specifically designed to mimic Win IE's parsing behavior.
int keyBegin, keyEnd;
- 1width: reads as key:1width, an invalid key, so it doesn't override the previous width
- left: reads as key:left value:no, which means 0, which means aligned to the left side of the screen
- \ntoolBAR: reads as key:toolbar value:yes
- - resizable: reads as key:resizable value:yess, which is invalid, which means no
- \rstatus: reads as key:status value:"", which means yes
- the trailing comma catches a previous mistake i made reading past the end of the string
*/
- var sFeatures = " ,=\twidth == = = 0200px|0=height 400,1width=400,left=nO \ntoolBAR=yeS,resizable=yess, \rstatus= ,";
+ var sFeatures = " ,=\twidth == = = 0200px|0=height 400,1width=400,left=nO \ntoolBAR=yeS, \rstatus= ,";
var w = window.open("resources/popup200x100.html", undefined, sFeatures);
w.focus();
}
</script></head>
<body>
-<p>This test checks whether parsing of the 'features' argument to window.open matches Win IE's behavior.</p>
+<p>This test checks whether parsing of the 'features' argument to window.open
+ matches Win IE's behavior (excepting resizable).</p>
<p>The link below should open a window with the following attributes:</p>
<ul>
<li> A WebView exactly 200x100, such that you can see a red 1 pixel border along each edge of the WebView.
<li> A window aligned to the left hand side of the screen.
<li> Toolbar visible.
<li> Statusbar visible.
-<li> Not resizable.
+<li> Resizable (always).
</ul>
<a href="" onclick="test(); return false;">Click to test</a>
<hr>