What if a html page uses a iframe for images?

Koos Vriezen koos.vriezen at xs4all.nl
Wed Jul 28 19:50:11 BST 2004


On Wed, Jul 28, 2004 at 02:27:00PM +0200, Koos Vriezen wrote:
> On Tue, Jul 27, 2004 at 04:26:19PM -0400, Zack Rusin wrote:
> > Yeah, check the bug:84332. We become way too trigger happy on any kind 
> > of hiding of the iframe and destroy the khtmlview/part on even setting 
> > the display:none of it.
> > I'm also not sure what would be the best way to solve it. If KDE 3.3 
> > would get awfully close we could always just bump the reference count 
> > of the renderwidget in htmliframeelementimpl so that for as long as an 
> > element is an iframe we just hide it and never delete the 
> > khtmlview/khtmlpart combo for it.
> 
> I don't think this would really help here though..
> 
> Throwing in another idea is to make KJS::Window an overloaded
> KJS::Frame. Where KJS::Frame has all the frame only and location stuff.
> As replaced iframes stay in the parent part's frames list, a
> openURLRequest from their browserextension (which are public signals)
> should replace the same frame yet again.
> Not sure if ids change from ID_IFRAME to ID_OBJECT, but detecting if
> it's a ROPart with browserextenstion and returning a KJS::Frame then,
> should be doable I think..

Hmm, bad idea from me. We simply should keep the Window object indeed.
Was playing with this on current:
<html><head><script>
            var frame;
            function changeToImage (lnk) {
                frame=frames[0];
                frame.location = "image.jpg";
                func = changeToImage2;
                alert ("done1");
            }
            function changeToImage2 (lnk) {
                frame.location = "simple.html";
                func = changeToImage;
                alert ("done2");
            }
            var func = changeToImage;
    </script></head>
    <body>
        <div onClick="javascript:func (this)">click me</div>
        <iframe src="simple.html"</iframe>
    </body>
</html>

with mozilla it simply works but with konqueror after second click:
[KCrash handler]
#4  0x4155826f in QString::operator= ()
   from /mnt/hda7/local/koos/kde/cvsup/qt-copy/lib/libqt-mt.so.3
#5  0x4076483c in KURL::operator= () from /opt/kde-cvs/kde3/lib/libkdecore.so.4
#6  0x40764997 in KURL::KURL () from /opt/kde-cvs/kde3/lib/libkdecore.so.4
#7  0x41aaee7c in KJS::Window::goURL ()
   from /opt/kde-cvs/kde3/lib/libkhtml.so.4
#8  0x41ab1378 in KJS::Window::put () from /opt/kde-cvs/kde3/lib/libkhtml.so.4
#9  0x41bcbc4b in KJS::Reference::putValue ()
   from /opt/kde-cvs/kde3/lib/libkjs.so.1
#10 0x41bcd328 in KJS::AssignNode::evaluate ()
   from /opt/kde-cvs/kde3/lib/libkjs.so.1
...

So, its even worse than not functional.

> 
> Koos




More information about the kfm-devel mailing list