From Bugzilla Helper: User-Agent: Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:0.9.3+) Gecko/20010821 BuildID: 2001082104 When an IFRAME or OBJECT cannot be loaded for some reason, and the IFRAME or OBJECT element has contents, the contents should be displayed as an alternative. Mozilla is presently failing to do this. Reproducible: Always Steps to Reproduce: 1. Access the attached testcase Actual Results: None of the two IFRAMEs and two OBJECTs displayed their contents when their src/data values could not be accessed, because the files could not be found in the first set, and the server could not be found in the second set. Additionally, the final element, the OBJECT with an unresolvable hostname in the DATA attribute, displayed an error dialog in addition to failing to display its' contents. Expected Results: The alternate contents of the IFRAMEs and OBJECTs should have been displayed, and no error dialog should have been shown due to the unresolvable hostname in the OBJECT DATA. Alternate content rendering for OBJECT elements seems to have worked until bug 678 was resolved. Also, fixing this will resolve most of the complaints in bug 28586, as most of the error dialogs generated are blocked advertisement IFRAMEs that usually contain a regular linked image that should be displayed (or itself allowed to gracefully fail to the IMG ALT).
Correction: alternate content for OBJECTs whose DATA attribute could not be found worked prior to bug 678 being fixed. OBJECTs whose data attribute contained an inaccessible hostname didn't work, though, then or now.
Dupe of bug 65455?
Bug 65455 is specifically about OBJECTs that lack a TYPE attribute. That WFM at this point, using Mac/2001082104. Interestingly, though the simple markup <object>foo</object> does result in foo being displayed, the equivalent <iframe>foo</iframe> doesn't.
Also moved to layout since all the other OBJECT contents bugs seems to have been assigned there.
Created attachment 47130 [details] Revised test suite using bad file: URIs instead of HTTP, and also including bare OBJECT and IFRAME tests
Isn't this a dup of bug 63730 ?
No, I don't think so. That bug may cover one specific facet of this one, but this one is much more broad, covering the host of problems with IFRAME and OBJECT alternate content rendering.
This comment covers all there is to say about it in terms of W3C: "If the user agent is not able to render the object for whatever reason (configured not to, lack of resources, wrong architecture, etc.), it must try to render its contents." That summary somehow misleading, but disabling image loads is only one simple way to trigger this bug!
Right, Neil. The equivalent note for IFRAMEs is, "The contents of the IFRAME element, on the other hand, should only be displayed by user agents that do not support frames or are configured not to display frames." ([http://www.w3.org/TR/html4/present/frames.html#h-16.5]) This is actually somewhat different. It doesn't specify that the contents should be displayed if unavailable, though that would make sense. Certainly an intrusive error dialog shouldn't be thrown up. (I must also correct my intial comment on this bug. It's the IFRAME with the unreachable host that throws up the error dialog, not the OBJECT. Neither display their alternate content, in any case.)
Sending Clayton's bugs to layout component, HTML Element component is deprecated.
Temporarily moving to future until a milestone can be assigned.
16 years ago
I think plugins have a similar problem.
taking bug... I think the problem is that we don't do anything in |nsPluginStreamListenerPeer::OnStartRequest| after we have a chance to examine the HTTP headers. We need to call back into layout to do some replacing for alternate content and iframes/images.
this is a depends on the work that Peter is doing in bug 157554, also the precise issue is defined in comment #15
Created attachment 97463 [details] Improved testcase
Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.1b) Gecko/20020814 The valid XHTML 1.1 code below also reproduces this bug when the mng's world read permission is off. A 468x60 broken image is displayed (surely just the object element's content should be displayed) AND the link to Mozilla is rendered (but not the rest of the object element's text). When the mng's world read permission is on, the mng is rendered correctly (with the link to webstandards working) AND the link to Mozilla is still rendered (again without the other text in the object element). This is my first bugzilla post so I hope this is appropriate and helpful :-) <p> <a href="http://www.webstandards.org"> <object data="webstandards.mng" type="video/x-mng" width="468" height="60"> Web standards banner - Get a browser with MNG support such as <a href="http://www.mozilla.org">Mozilla</a> </object> </a> </p>
15 years ago
Note the example given in http://bugzilla.mozilla.org/show_bug.cgi?id=96976#c19 is actually invalid as it can lead to the situation where an a element contains another a element, this is prohibited, see http://www.w3.org/TR/xhtml1/#prohibitions In addition to the case contained in the "Improved testcase" attachment I believe that Mozilla should also handle 404 errors on documents, the data is unreachable, in a more consistent manner. Current situation if the object type="image/gif" (for example) and an image is specified as the data and when requested returns a 404 error the alternate content is rendered. If however the type is text/html and the request returns a 404 status the 404 document is used as the content of the object. The alternate content should be rendered as the data specified is unreachable.
Current (1.5) Mozilla behavior of the attached testcase works for OBJECT cases 2 and 8, but fails (no rendering at all) for case 5. There is no error message thrown up that needs to be cleared, so that point has been corrected. IE6 renders nothing for case 2 but works for case 5 & 8; Opera7 renders nothing for case 2, works for case 8, and displays a rectangle with a bad server error for case 5. There are empty IFRAME's shown for case 1 & 7, and an IFRAME containing a Bad Request error for case 4. This is consistent with IE6 and Opera7. I don't think any of the IFRAME cases are in error, per the spec fragment Greg quoted in comment 11.
So 1, 4 and 7 in attachment 97463 [details] are invalid per comment 11? 5 in the same attachment is valid (but incorrectly rendered) and this bug is about that example? Don't we have a bug for that already?
5 is bug 96579, should this be marked as a duplicate or do we want to do something with the IFRAME elements?
13 years ago
All that's needed is to fix the iframe renderring. Can't we borrow code from the fixes for the object renderring? I mean, object can be used like an iframe. Example: <object type='text/html' data='index.html' style='width: 50%; height: 50%; border: solid 1px #000;'>Alternate text for index.html not existing.</object>
(the object issues here should be fixed now, by bug 1156's patch)
With trunk from 20051003 the testcase fails on tests 1, 4, 7.
Yes, but it is not really a failure, as the contents of an IFRAME should only been rendered if a browser does not support IFRAMEs or the user has disabled showing them.
I think this bug is fixed. IFRAME is different from OBJECT in terms of fallback. (The summary should therefore be changed as well.)
Created attachment 205625 [details] Revised testcase I revised the testcase to reflect the realities about IFRAME. Using FF 1.5 on Win XP, testcase 5, "object whose DATA specifies a nonexistent server", still fails.
Oops, forgot to edit the summary.
Then, is this bug depends on Bug 56743? Mozilla doesn't support no-frames mode. If we have this, Mozilla should show alternate content of the IFRAME. In this case, please revert the summary to the old one. Bug 56743 - Add option to disable frames/force noframes https://bugzilla.mozilla.org/show_bug.cgi?id=56743
(In reply to comment #31) > Then, is this bug depends on Bug 56743? > Mozilla doesn't support no-frames mode. If we have this, Mozilla should show > alternate content of the IFRAME. > In this case, please revert the summary to the old one. No, this bug is about alternate contents. If you can turn off frames in Mozilla and the testcase fails in IFRAME handling, then this bug can be about that. Otherwise, it's not relevant. To be certain, this bug is now purely about example 5 in the testcase.
You should test in Firefox 1.6a where object handling got fixed.
(In reply to comment #33) > You should test in Firefox 1.6a where object handling got fixed. I tested in the latest 1.6a1 nightly. Case 5 is still broken.
(In reply to comment #33) > You should test in Firefox 1.6a where object handling got fixed. I tested in the latest 1.6a1 nightly on Win and Mac. Case 5 is still broken.
case 5 works for me in 2005121309 (seamonkey, winxp)
(In reply to comment #36) > case 5 works for me in 2005121309 (seamonkey, winxp) Ah, I may have been mistaken. Now case 5 WFM using Gecko/20051214 Firefox/1.6a1. I'll re-check on Mac this evening and update.
Okay, my mistake. Case 5 WFM using Mac Gecko/20051210 Firefox/1.6a1 (likely fixed by the bug referenced in comment 23).
so the iframe issues are INVALID?
(In reply to comment #39) > so the iframe issues are INVALID? They're more like UNCONFIRMED. since it's not possible to disable frames and find out how Gecko behaves in that configuration.
So browser.frames.enabled=false does nothing?
then why was this bug morphed to no longer be about iframes?
Ah, yes, browser.frames.enabled=false works, and the testcase shows we don't handle that properly. So, this is still about both OBJECT and IFRAME. Re-morphing, reopening and trying to write a better summary. To reproduce, disable frames (see comment 42) and retest attachment 205625 [details].
*** Bug 335371 has been marked as a duplicate of this bug. ***
http://www.wam-technika.pl/bugs/fallback-bug.html Could you check if this is the same bug?
(In reply to comment #45) > http://www.wam-technika.pl/bugs/fallback-bug.html > Could you check if this is the same bug? For me, this fails on Firefox 2.0 and works on Firefox 3.0b2. I think this bug has been mostly fixed for Gecko 1.9, which is why it's seeing so little activity now. The changes will not be backported to the 1.8.X line.
Still valid. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b4) Gecko/20090427 Shiretoko/3.5b4
(In reply to comment #43) > Ah, yes, browser.frames.enabled=false works, and the testcase shows we don't > handle that properly. So, this is still about both OBJECT and IFRAME. > Re-morphing, reopening and trying to write a better summary. > > To reproduce, disable frames (see comment 42) and retest attachment 205625 [details]. OBJECT is working, IFRAME not, as testcase doesn't show 1,4,7 regardless of state of browser.frames.enabled Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168pre) Gecko/2009050506 GranParadiso/3.0.11pre Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090505 Shiretoko/3.5b5pre Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2a1pre) Gecko/20090504 Minefield/3.6a1pre Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b5pre) Gecko/20090504 SeaMonkey/2.0b1pre
Object is not working. See the following file: <Title>Good day.</Title> <P>The following is an image.</P> <div > <object data="missing-image.svg" type="image/svg+xml" > It is a good day. </object> </div> "Missing-image.svg" is missing, but "It is a good day." is not rendered. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:22.214.171.124) Gecko/20091102 Firefox/3.5.5
The load/fallback pathway is being refactored in bug 745030, and should ensure this works
The iframe part of this bug report is obsolete. Neither the HTML spec nor Gecko supports turning off iframes.
This has been fixed for a while, and bug 745030 further cleans things up to ensure proper fallback behavior
(In reply to John Schoenick [:johns] from comment #52) > This has been fixed for a while, and bug 745030 further cleans things up to > ensure proper fallback behavior I noticed for the attached testcase, bug 745030 changes the behaviour of test 2, as its failing now with firefox 17, yet displays ok in 16…
(In reply to John Drinkwater (:beta) from comment #53) > (In reply to John Schoenick [:johns] from comment #52) > > This has been fixed for a while, and bug 745030 further cleans things up to > > ensure proper fallback behavior > > I noticed for the attached testcase, bug 745030 changes the behaviour of > test 2, as its failing now with firefox 17, yet displays ok in 16… I had this flagged in my dashboard for a follow-up, but it appears to work in recent nightlies. Feel free to file a bug if you see otherwise
removing old qawanted tag, if something is needed please re-add