[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Bug#5441: Konqueror: Empty page with http://www.alternate.de
From:       Harri Porten <porten () tu-harburg ! de>
Date:       2000-06-23 15:25:51
[Download RAW message or body]

Lars Knoll wrote:
> 
> > <html>
> > <head>
> > <noscript>
> > <meta http-equiv="refresh" content="1;
> > URL=http://www.alternate.de/cgi-bin/start
> > .pl?js=0">
> > </noscript>
> > <script language=javascript>
> > document.location.href="/cgi-bin/start.pl?js=1";
> > </script>
> > </head>
> > <body></body>
> > </html>
> >
> > I plead guilty: 'location.href' isn't implemented yet but the "js=0"
> > page should have show up otherwise, right ?
> 
> Not really. I'm not sure if <noscript> is implemented correctly, and
> should anyway only be used is jscript is turned of. Otherwise the contents
> of <noscript> will be ignored.

Oops. Oversaw the tag. He tried JS disabled as well, though :P

I just implemented a read-only version of window.location (forgot about
document.location but will do that later). The results are visible at

http://devel-home.kde.org:80/~kppp/test/location.html#myhash?a=b

Now to the problem: how should *writing* work, e.g.
window.location.href="http://www.kde.org" ?

I tried simply calling KHTMLPart::urlSelected(). This works when called
after the page has been rendered completely. If called earlier inside of
<script> tags there's a crash:

Program received signal SIGSEGV, Segmentation fault.
0x40e1277d in __libc_free (mem=0x804d3c4) at malloc.c:2866
2866    malloc.c: Datei oder Verzeichnis nicht gefunden.
Current language:  auto; currently c
(gdb) bt
#0  0x40e1277d in __libc_free (mem=0x804d3c4) at malloc.c:2866
#1  0x4024f2a4 in __builtin_vec_delete (ptr=0x804d3c4)
    at ../../gcc-2.95.2/gcc/cp/new2.cc:62
#2  0x4010e2c8 in HTMLTokenizer::parseListing (this=0x80b5a38,
src=@0x80b5af4)
    at /home/hp/cvs/kdelibs/khtml/html/htmltokenizer.cpp:288
#3  0x4010e7a8 in HTMLTokenizer::parseScript (this=0x80b5a38,
src=@0x80b5af4)
    at /home/hp/cvs/kdelibs/khtml/html/htmltokenizer.cpp:339
#4  0x4011081b in HTMLTokenizer::parseTag (this=0x80b5a38,
src=@0x80b5af4)
    at /home/hp/cvs/kdelibs/khtml/html/htmltokenizer.cpp:949
#5  0x40111497 in HTMLTokenizer::write (this=0x80b5a38, str=@0xbfffed54)
    at /home/hp/cvs/kdelibs/khtml/html/htmltokenizer.cpp:1177
#6  0x4011bebf in DOM::HTMLDocumentImpl::write (this=0x80a8cf0, 
    text=@0xbfffed54)
    at /home/hp/cvs/kdelibs/khtml/html/html_documentimpl.cpp:182

The same holds true for window.open() which Lars implemeted a while ago:

<html>
<body>
<script>
window.open("http://www.kde.org");
</script>
</body>
</html>

Is there any way to solve this re-entrance(?) problem ? A request queue
for example ?

Harri.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic