[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Url of an about:blank document
From: Koos Vriezen <koos.vriezen () xs4all ! nl>
Date: 2002-12-01 16:00:33
[Download RAW message or body]
Hi,
The KJSDebugWin get its source by setSourceFile and appendSourceFile
interface. The key for source files is its URL. This doesn't work of
course for about:blank documents. I made this patch:
--- khtml_part.cpp 2002/11/29 21:51:06 1.772
+++ khtml_part.cpp 2002/12/01 15:43:41
@@ -3192,6 +3192,11 @@ bool KHTMLPart::processObjectRequest( kh
if (!url.url().startsWith("about:")) {
p->write(url.path());
} else {
+ if (d->m_doc && p->d->m_doc) {
+ static int count = 0;
+ url = d->m_doc->URL() + "_" + url.url() + "_" + QString::number(count++);
+ p->d->m_doc->setURL(url.url());
+ }
p->m_url = url;
// we need a body element. testcase: <iframe \
id="a"></iframe><script>alert(a.document.body);</script> \
p->write("<HTML><BODY></BODY></HTML>");
which makes the url unique again (eg http:/www/index.html_about:blank_23).
Do you see any problems here?
Note that before, p->m_url and p->d->m_doc->m_url were different, which
made them turn up twice in the debugger.
Koos
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic