Commit 5f65a093 authored by rjw's avatar rjw

Fix for 3138425. Don't open a new window when document.open() is called

        with < 2 parameters.

        Reviewed by darin.

        * khtml/ecma/kjs_html.cpp:
        (KJS::HTMLDocFunction::tryCall):
        * khtml/ecma/kjs_window.cpp:
        (WindowFunc::tryCall):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3251 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b026936c
2003-01-03 Richard Williamson <rjw@apple.com>
Fix for 3138425. Don't open a new window when document.open() is called
with < 2 parameters.
Reviewed by darin.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocFunction::tryCall):
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
2003-01-03 Richard Williamson <rjw@apple.com>
Fixed 3138743, 3138678, and 3138854. Removed the RenderText
......
2003-01-03 Richard Williamson <rjw@apple.com>
Fix for 3138425. Don't open a new window when document.open() is called
with < 2 parameters.
Reviewed by darin.
* khtml/ecma/kjs_html.cpp:
(KJS::HTMLDocFunction::tryCall):
* khtml/ecma/kjs_window.cpp:
(WindowFunc::tryCall):
2003-01-03 Richard Williamson <rjw@apple.com>
Fixed 3138743, 3138678, and 3138854. Removed the RenderText
......
......@@ -64,7 +64,7 @@ Value KJS::HTMLDocFunction::tryCall(ExecState *exec, Object &thisObj, const List
return Undefined();
case HTMLDocument::Open:
// For compatibility with other browsers, pass open calls with parameters to the window.
if (args.size() != 0) {
if (args.size() > 1) {
KHTMLView *view = static_cast<DOM::DocumentImpl *>(doc.handle())->view();
if (view) {
KHTMLPart *part = view->part();
......
......@@ -1065,6 +1065,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
return Null();
case Window::Open:
{
printf ("window.open\n");
KConfig *config = new KConfig("konquerorrc");
config->setGroup("Java/JavaScript Settings");
int policy = config->readUnsignedNumEntry( "WindowOpenPolicy", 0 ); // 0=allow, 1=ask, 2=deny, 3=smart
......
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