Commit 4c4772da authored by beidson's avatar beidson

LayoutTests:

        Reviewed by Anders

        <rdar://problem/5061826> and
        http://bugs.webkit.org/show_bug.cgi?id=12863
        Implement window.stop()

        * http/tests/misc/window-dot-stop-expected.txt: Added.
        * http/tests/misc/window-dot-stop.html: Added.

WebCore:

        Reviewed by Anders

        <rdar://problem/5061826> and
        http://bugs.webkit.org/show_bug.cgi?id=12863
        Implement window.stop()

        * bindings/js/kjs_window.cpp:
        (KJS::WindowFunc::callAsFunction): Add case Window::Stop
        * bindings/js/kjs_window.h:
        (KJS::Window::): Add "Stop"



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20253 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent da97667a
2007-03-16 Brady Eidson <beidson@apple.com>
Reviewed by Anders
<rdar://problem/5061826> and
http://bugs.webkit.org/show_bug.cgi?id=12863
Implement window.stop()
* http/tests/misc/window-dot-stop-expected.txt: Added.
* http/tests/misc/window-dot-stop.html: Added.
2007-03-15 Justin Garcia <justin.garcia@apple.com>
Reviewed by john
http://127.0.0.1:8000/incremental/slow-utf8-text.pl - willSendRequest <NSURLRequest http://127.0.0.1:8000/incremental/slow-utf8-text.pl> redirectResponse (null)
http://127.0.0.1:8000/incremental/slow-utf8-text.pl - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -999, failing URL "http://127.0.0.1:8000/incremental/slow-utf8-text.pl">
<unknown> - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -999, failing URL "http://127.0.0.1:8000/misc/window-dot-stop.html">
This tests for the successful use of window.stop()
<html>
<script>
if (window.layoutTestController) {
layoutTestController.dumpResourceLoadCallbacks();
layoutTestController.waitUntilDone();
}
</script>
<body>
This tests for the successful use of window.stop()<br>
<iframe src="http://127.0.0.1:8000/incremental/slow-utf8-text.pl"></iframe><br>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
setTimeout("layoutTestController.notifyDone()", 0);
}
window.stop();
</script>
TEST FAILED: If window.stop() works, you shouldn't be able to see this and the above iframe should not have loaded.
</body>
</html>
2007-03-16 Brady Eidson <beidson@apple.com>
Reviewed by Anders
<rdar://problem/5061826> and
http://bugs.webkit.org/show_bug.cgi?id=12863
Implement window.stop()
* bindings/js/kjs_window.cpp:
(KJS::WindowFunc::callAsFunction): Add case Window::Stop
* bindings/js/kjs_window.h:
(KJS::Window::): Add "Stop"
2007-03-16 Geoffrey Garen <ggaren@apple.com>
Reviewed by Brady Eidson.
......
......@@ -11245,7 +11245,6 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
knownRegions = (
English,
......@@ -11260,7 +11259,6 @@
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
shouldCheckCompatibility = 1;
targets = (
93F198A508245E59001E9ABC /* WebCore */,
DD041FBE09D9DDBE0010AF2A /* Derived Sources */,
......@@ -323,7 +323,8 @@ const ClassInfo Window::info = { "Window", 0, &WindowTable, 0 };
onbeforeunload Window::Onbeforeunload DontDelete
frameElement Window::FrameElement DontDelete|ReadOnly
showModalDialog Window::ShowModalDialog DontDelete|Function 1
find Window::Find DontDelete|Function 7
find Window::Find DontDelete|Function 7
stop Window::Stop DontDelete|Function 0
@end
*/
KJS_IMPLEMENT_PROTOTYPE_FUNCTION(WindowFunc)
......@@ -1831,6 +1832,9 @@ JSValue *WindowFunc::callAsFunction(ExecState *exec, JSObject *thisObj, const Li
JSValue* result = showModalDialog(exec, window, args);
return result;
}
case Window::Stop:
frame->loader()->stopAllLoaders();
return jsUndefined();
case Window::Find:
if (!window->isSafeScript(exec))
return jsUndefined();
......
......@@ -180,7 +180,7 @@ namespace KJS {
Onfocus, Onkeydown, Onkeypress, Onkeyup, Onload, Onmousedown, Onmousemove,
Onmouseout, Onmouseover, Onmouseup, OnWindowMouseWheel, Onreset, Onresize, Onscroll, Onsearch,
Onselect, Onsubmit, Onunload, Onbeforeunload,
Statusbar, Toolbar, FrameElement, ShowModalDialog, Find };
Statusbar, Toolbar, FrameElement, ShowModalDialog, Find, Stop };
private:
JSValue* getListener(ExecState*, const WebCore::AtomicString& eventType) const;
......
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