[webkit-changes] cvs commit: WebCore/manual-tests
close-on-closedWindow.html
Vicki
vicki at opensource.apple.com
Mon Aug 15 21:42:45 PDT 2005
vicki 05/08/15 21:42:44
Modified: . ChangeLog
khtml/ecma kjs_window.cpp
Added: manual-tests close-on-closedWindow.html
Log:
Reviewed by Maciej.
- fixed <rdar://problem/4094363> Can't re-open a window at capripalace.com website because
"close" fails on already-closed window
Test cases added: (NONE)
* manual-tests/close-on-closedWindow.html: Added.
* khtml/ecma/kjs_window.cpp:
(KJS::Window::getOwnPropertySlot): allow close calls on windows that have already been closed
Revision Changes Path
1.4581 +13 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4580
retrieving revision 1.4581
diff -u -r1.4580 -r1.4581
--- ChangeLog 16 Aug 2005 00:47:29 -0000 1.4580
+++ ChangeLog 16 Aug 2005 04:42:40 -0000 1.4581
@@ -1,3 +1,16 @@
+2005-08-15 Vicki Murley <vicki at apple.com>
+
+ Reviewed by Maciej.
+
+ - fixed <rdar://problem/4094363> Can't re-open a window at capripalace.com website because
+ "close" fails on already-closed window
+
+ Test cases added: (NONE)
+ * manual-tests/close-on-closedWindow.html: Added.
+
+ * khtml/ecma/kjs_window.cpp:
+ (KJS::Window::getOwnPropertySlot): allow close calls on windows that have already been closed
+
2005-08-15 Darin Adler <darin at apple.com>
Reviewed by Geoff.
1.172 +5 -0 WebCore/khtml/ecma/kjs_window.cpp
Index: kjs_window.cpp
===================================================================
RCS file: /cvs/root/WebCore/khtml/ecma/kjs_window.cpp,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- kjs_window.cpp 16 Aug 2005 00:47:45 -0000 1.171
+++ kjs_window.cpp 16 Aug 2005 04:42:44 -0000 1.172
@@ -993,6 +993,11 @@
slot.setStaticEntry(this, Lookup::findEntry(&WindowTable, "closed"), staticValueGetter<Window>);
return true;
}
+ if (propertyName == "close") {
+ const HashEntry* entry = Lookup::findEntry(&WindowTable, propertyName);
+ slot.setStaticEntry(this, entry, staticFunctionGetter<WindowFunc>);
+ return true;
+ }
slot.setUndefined(this);
return true;
1.1 WebCore/manual-tests/close-on-closedWindow.html
Index: close-on-closedWindow.html
===================================================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
</head>
<body>
<p><b>BUG ID:</b> <a href="rdar://problem/4094363"> Can't re-open a window at capripalace.com website because "close" fails on already-closed iwndow">4094363</a> Can't re-open a window at capripalace.com website because "close" fails on already-closed iwndow</p>
<p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b>
<ol>
<li>Click the link below </li>
<li>Close the window that opens </li>
<li>Click the link again </li>
</ol>
</p>
<p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b>
If the bug is fixed, a window WILL OPEN after Step #3.
</p>
<p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>
If the bug is not fixed, a window WILL NOT OPEN after Step #3.
</p>
<script language="JavaScript">
win = null;
function win_open() {
if (win != null) {
win.close();
}
win = window.open('about:blank');
}
</script>
<a href="javascript:win_open();">Click this link</a>
</body>
</html>
More information about the webkit-changes
mailing list