Open
Bug 282409
Opened 19 years ago
Updated 1 year ago
xml documents in iframes in xml documents doesn't always work
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
NEW
People
(Reporter: sicking, Unassigned)
References
Details
Attachments
(2 files, 1 obsolete file)
If an xhtml document contains an iframe pointing to another xml document we sometimes start layout too early on the inner document. What happens is that when the outer document finishes loading we will perform initial reflow causing the iframe-frame to be created and initialized. However initializing the frame causes it to call it to tell the inner docshell to show itself which will perform initial reflow on the inner document. But since the inner document is an xmldocument we're not supposed to do initial reflow until the document finishes loading so all hell breaks loose. In the xhtml-in-xhtml case the worst that seems to happen is that we don't render the inner document (or we probably render what was loaded so far). But in xslt this causes crashes (bug 182460). Here's the top of the stack when we start the initial reflow on the inner document: PresShell::InitialReflow(PresShell * const 0x03611ca0, int 0, int 0) line 2667 DocumentViewerImpl::InitPresentationStuff(int 1) line 687 DocumentViewerImpl::Show(DocumentViewerImpl * const 0x035a29a0) line 1529 + 10 bytes nsDocShell::SetVisibility(nsDocShell * const 0x036abfd4, int 1) line 3628 nsSubDocumentFrame::ShowDocShell() line 703 nsSubDocumentFrame::Init(nsSubDocumentFrame * const 0x036cf634, nsPresContext * 0x035ee918, nsIContent * 0x036ae758, nsIFrame * 0x036cf560, nsStyleContext * 0x036cf510, nsIFrame * 0x00000000) line 275 + 8 bytes If either of the documents is an html document rather then xhtml things does work. If the outer document is a html document we fire off the notification to create the iframe-frame early enough that the inner document doesn't have an nsDocumentViewer yet so we don't get any further then nsDocShell::SetVisibility. If the inner document is an html document we're saved by the fact that it's fine to perform initial reflow even though the document hasn't loaded yet. I'm guessing that the way to fix this is to let nsDocumentViewer::Show bail if it's containing an xml-document that hasn't finished loading yet.
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Comment 2•19 years ago
|
||
I can't reproduce this loading directly from b.m.o (probably due to timing of when things finishes to load) so you'll have to download if you want to test. I think the script ensures that we start loading the inner xml so that it gets a documentviewer before we finish loading the outer xml. Come to think of it, that's probably why this doesn't always work loading the inner frame from bmo since we won't get the first data and create the documentviewer before the outer is fully loaded.
Reporter | ||
Comment 3•19 years ago
|
||
opps, the previous version I attached linked to the bmo version of inner.xml. This one links locally and is fit for download.
Reporter | ||
Updated•19 years ago
|
Attachment #174438 -
Attachment is obsolete: true
Comment 4•19 years ago
|
||
All of which begs the question... why is the iframe calling SetVisibility on the docshell at all? Does anything break if you remove that? I suppose an empty iframe (say no src) may do weird things then....
Reporter | ||
Comment 5•19 years ago
|
||
I think this was caused by the fix for bug 138012. We used to have a check to only set visibility if we weren't currently loading something into the frame. I'll try to reinstate that check.
Updated•17 years ago
|
Flags: blocking1.9?
Flags: blocking1.9? → blocking1.9-
Whiteboard: [wanted-1.9]
Updated•16 years ago
|
Flags: wanted1.9+
Whiteboard: [wanted-1.9]
Updated•6 years ago
|
Product: Core → Core Graveyard
Assignee | ||
Updated•6 years ago
|
Component: Layout: Misc Code → Layout
Product: Core Graveyard → Core
Updated•2 years ago
|
Severity: normal → S3
Comment 6•1 year ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: jonas → nobody
You need to log in
before you can comment on or make changes to this bug.
Description
•