Bug 75700

Summary: <object> content breaks when file is forced to be downloaded
Product: WebKit Reporter: Alex Haan <alex.haan>
Component: FramesAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal CC: aestes, ap
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac (Intel)   
OS: OS X 10.7   
URL: http://armeagle.nl/wdft/
Attachments:
Description Flags
Test case
none
Test case file none

Description Alex Haan 2012-01-06 04:41:53 PST
Created attachment 121425 [details]
Test case

On our website we make extensive use of gadgets, using inline frames (iframe for IE, object for other browsers).
In one situation people can download data in a PDF, we do this by using http-equiv refresh to a php file that provides the PDF.

In normal situations the PDF is downloaded just fine and the webpage does not change. But when this is done inside a frame, using the <object> tag, we encounter a problem in Webkit (Chrome and Safari). After the PDF has been downloaded, the frame is then malformed for some reason and the old content is not shown anymore. When an iframe (or a plain page) is used instead of the object tag everything works fine.

A test-case can be found here: http://armeagle.nl/wdft/
Or source: http://armeagle.nl/wdft/index.phps

Should more headers be specified to make this work in WebKit, or is this actually a bug?
Comment 1 Alex Haan 2012-01-06 04:43:20 PST
Created attachment 121426 [details]
Test case file
Comment 2 Alexey Proskuryakov 2012-01-06 10:21:57 PST
> the frame is then malformed

What I see in Safari is that fallback content is displayed.

This is quite an edge case. I'm not even sure how to tell if it's a bug or correct behavior.

Can you just use iframe in all browsers? That's way more interoperable than object.
Comment 3 Alex Haan 2012-01-09 05:21:48 PST
The past years objects have slowly turned into the replacement for iframes. This of course will be changing again when HTML5 is common, in a few years. To be honest, for backwards compatibility, we do give old IE browsers still an iframe.

The current situation is simply such that object tags can be used to define frames. And in such frames offering a file download should work.