Bug 150240 - iframes refreshed when style.display set to '' from 'none's
Summary: iframes refreshed when style.display set to '' from 'none's
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
Depends on:
Reported: 2007-09-26 22:55 UTC by Dhaval Patel
Modified: 2008-01-14 03:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:

Patch (60.11 KB, patch)
2007-09-26 23:30 UTC, Maksim Orlovich

Note You need to log in before you can comment on or make changes to this bug.
Description Dhaval Patel 2007-09-26 22:55:16 UTC
Version:           Konqueror 3.5.7 (same as KDE) (using KDE KDE 3.5.7)
Installed from:    Ubuntu Packages
OS:                Linux

What I am doing is setting the style.display property of an iframe to '' and 'none' depending on what the user is chooses.

What Konqueror does when setting the display to '' is refresh the iframe. I see the iframe being refreshed in the web server logs.

I have put together a page which displays this behavior.


1. go to http://jwblack.patel.sh/test/iframebug.php
2. click "Add Frame"
3. change text in the input to something else
4. click the "Add Frame" button which is still just underneath the bottom left corner even though it is invisible (this is another bug)
5. click "Show Frame 1"

You will notice that the input text in the first frame is back to the default value. It would be the value you set in step 3 if the iframe did not refresh.
Comment 1 Maksim Orlovich 2007-09-26 23:05:02 UTC
Heh, this is fixed in my work tree. (But not 4.0 development tree, for a change)
Comment 2 Dhaval Patel 2007-09-26 23:08:19 UTC
You guys are awesome. I think I am going to have to make Konqueror my default browser. :)

Is this a problem with Konqueror or KHTML which would include Safari?
When do you think we will get to see this change?
Comment 3 Maksim Orlovich 2007-09-26 23:29:43 UTC
It's in KHTML, but Safari's version of KHTML is a fork, so they probably don't have this bug any more (in particular since they surely aren't using KParts). As for when to get to see it... Well, the code is done, I need to do testcases to make sure it really works, though (which is a pain since this also affects horror shows like object/embed/applet). It's definitely a 4.x only change though -- too big for 3.5.x.. 

And honestly, we're not that great at fixing stuff as my responses today would suggest. You just happened to file things that by some coincidence will all be fixed in 4.0. Chances are, the next bug you file won't be, and will sit at the end of someone's TODO list forever :(
Comment 4 Maksim Orlovich 2007-09-26 23:30:29 UTC
Created attachment 21699 [details]

May be I should upload this here. Don't want to have a large patch like this
w/o a backup..
Comment 5 Maksim Orlovich 2008-01-14 03:26:35 UTC
SVN commit 761089 by orlovich:

Move object loading to the DOM from the renderer, fixing the long-standing
major bug that hidden iframes couldn't be interacted with.

The basic overview here is that a new DOM base class, HTMLPartContainerElementImpl
is created, that manages the interaction with KHTMLPart when it
comes to loading child parts. KHTMLPart now keeps tracks of those
per ChildFrame (along the way removing the confusion of having 2 m_frames
in close quarters talking about different things); and the DOM
objects for iframe/object/embed/frame/etc. request the loading themselves
as needed. The renderer "just" displays the part widget set from the DOM

BUG: 71809
BUG: 150240
(and probably others)

 M  +1 -1      ecma/kjs_html.cpp  
 M  +4 -4      ecma/kjs_window.cpp  
 M  +92 -69    html/html_baseimpl.cpp  
 M  +8 -4      html/html_baseimpl.h  
 M  +351 -51   html/html_objectimpl.cpp  
 M  +70 -8     html/html_objectimpl.h  
 M  +33 -33    khtml_part.cpp  
 M  +7 -6      khtml_part.h  
 M  +2 -1      khtmlpart_p.h  
 M  +8 -252    rendering/render_frames.cpp  
 M  +0 -17     rendering/render_frames.h  
 M  +2 -4      xml/dom_docimpl.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=761089
Comment 6 Maksim Orlovich 2008-01-14 03:53:30 UTC
SVN commit 761099 by orlovich:

Regression test for 71809/150240 + some baseline updates

 M             baseline/css21/t0801-c412-hz-box-00-b-a.html-dump.png  
 M  +8 -20     baseline/css21/t0801-c412-hz-box-00-b-a.html-render  
 A             baseline/frames/iframe-hidden.html-dom  
 AM            baseline/frames/iframe-hidden.html-dump.png  
 A             baseline/frames/iframe-hidden.html-render  
 M             baseline/mozilla/dom/dom-html/helmobj.html-dump.png  
 M  +4 -11     baseline/mozilla/dom/dom-html/helmobj.html-render  
 M  +1 -1      baseline/mozilla/dom/dom-html/hisi000.html-dom  
 M             baseline/mozilla/dom/dom-html/hisi000.html-dump.png  
 M  +19 -19    baseline/mozilla/dom/dom-html/hisi000.html-render  
 M  +23 -0     baseline/mozilla/dom/dom-html/hobj028.html-dom  
 M             baseline/mozilla/dom/dom-html/hobj028.html-dump.png  
 M  +9 -16     baseline/mozilla/dom/dom-html/hobj028.html-render  
 M             baseline/mozilla/dom/dom-html/htbl032.html-dump.png  
 M  +38 -38    baseline/mozilla/dom/dom-html/htbl032.html-render  
 M             baseline/mozilla/dom/dom-html/htbl033.html-dump.png  
 M  +27 -27    baseline/mozilla/dom/dom-html/htbl033.html-render  
 M             baseline/mozilla/dom/dom-html/htbl034.html-dump.png  
 M  +27 -27    baseline/mozilla/dom/dom-html/htbl034.html-render  
 M             baseline/mozilla/dom/dom-html/htbl035.html-dump.png  
 M  +21 -21    baseline/mozilla/dom/dom-html/htbl035.html-render  
 M             baseline/mozilla/dom/dom-html/htbl051.html-dump.png  
 M  +21 -21    baseline/mozilla/dom/dom-html/htbl051.html-render  
 M  +1 -1      baseline/mozilla/dom/dom-html/htcl009.html-dom  
 M             baseline/mozilla/dom/dom-html/htcl009.html-dump.png  
 M  +2 -2      baseline/mozilla/dom/dom-html/htcl009.html-render  
 M             baseline/mozilla/html_401/table_rules_all.html-dump.png  
 M  +23 -23    baseline/mozilla/html_401/table_rules_all.html-render  
 M             baseline/mozilla/html_401/table_rules_cols.html-dump.png  
 M  +32 -32    baseline/mozilla/html_401/table_rules_cols.html-render  
 M             baseline/mozilla/html_401/table_rules_groups.html-dump.png  
 M  +45 -45    baseline/mozilla/html_401/table_rules_groups.html-render  
 M             baseline/mozilla/html_401/table_rules_rows.html-dump.png  
 M  +31 -31    baseline/mozilla/html_401/table_rules_rows.html-render  
 M             baseline/webcore/fast/css/ZeroOpacityLayers.html-dump.png  
 M  +1 -1      baseline/webcore/fast/dom/client-width-height-quirks.html-dom  
 M             baseline/webcore/fast/dom/client-width-height-quirks.html-dump.png  
 M  +1 -1      baseline/webcore/fast/dom/client-width-height-quirks.html-render  
 A             tests/frames/iframe-hidden.html  
 M  +2 -0      tests/webcore/fast/frames/ignore  

WebSVN link: http://websvn.kde.org/?view=rev&revision=761099