Closed Bug 124427 Opened 23 years ago Closed 22 years ago

targets are mixed if IFRAME in a FRAMESET loads source by JavaScript

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla0.9.9

People

(Reporter: mk, Assigned: radha)

References

()

Details

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.8+) Gecko/20020208
BuildID:    2002020803

I made a very simple test case to show this bug:

- there's a frameset with two frames, upper and bottom.
- inside one frame is an iframe.
- the iframe's src is loaded by JavaScript onLoad of the frame.

First thing that's strange is that the browser doesn't stop loading.

Second, if you hit reload now, the iframe's content is loaded in the upper frame
(top.frames[0]) instead of the iframe (top.frames[1].frames[0]).

Reproducible: Always
Steps to Reproduce:
1. load test case http://www.rpgstudies.net/mozilla/
2. hit reload.


Actual Results:  iframe's content is reloaded into a frame.

Expected Results:  iframe's content should be reloaded into the iframe, frame
content into the frame.

If you go to another page and hit "back", the same happens. That makes me think
it's a problem with history.

Also after reloading once it takes ages to reload again.
session history.  Seeing this on Linux too.
Assignee: blaker → radha
Status: UNCONFIRMED → NEW
Component: History: Global → History: Session
Ever confirmed: true
OS: Windows NT → All
Hardware: PC → All
Maybe it's got something to do with the missing src-attribute in the IFRAME 
element. The HTML 4.01 specification doesn't tell if it is required or not. On 
my page I have no initial value, so I didn't include it.

Everything seems to be alright when I add a src-attribute with a value.

When I use an src-attribute with a blank value, the browser doesn't stop 
loading, but doesn't mix the targets onReload either.
> Everything seems to be alright when I add a src-attribute with a value.

That's only true if the src-value has the same value as the javascript-loaded 
src. Any other value results in the browser not stopping to load and the 
described frame defect when hitting the reload button.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.9
The patch attached to bug 105299 takes care of the iframe mismatch problem that
happens when you hit the reload button or go back forward to it. But When you
hit reload or go back, multiple history entries get created for the page in
session history. Shall investigate that. 
The patch looks specifically into cases where a subframe load could have been
initiated by  onLoadHandler and accordingly changes the loadType of teh
subframe, so that session hitory does not get confused. This is the case in
this testcase as well as the one in 88684.
Comment on attachment 71013 [details] [diff] [review]
patch to docshell.

r=adamlock
Attachment #71013 - Flags: review+
Comment on attachment 71013 [details] [diff] [review]
patch to docshell.

sr=alecf
Attachment #71013 - Flags: superreview+
Comment on attachment 71013 [details] [diff] [review]
patch to docshell.

a=asa (on behalf of drivers) for checkin to 0.9.9 and the mozilla trunk.
Attachment #71013 - Flags: approval+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: History: Session → Document Navigation
QA Contact: claudius → docshell
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: