Closed Bug 1174782 Opened 10 years ago Closed 3 years ago

When execute document.open/write/close on iframe several times immediately one by one (without any timeout), in this case it doesn't load css style files for this iframe.

Categories

(Core :: CSS Parsing and Computation, defect)

38 Branch
x86_64
Windows 7
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: kushniruk.andrey, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36 Steps to reproduce: 1. Create an iframe programmatically, using JavaScript and append it on a page. 2. Write (twice or several times one by one) to created iframe full hierarchy of a standard html page necessarily with included links to css files in a <head>, using document.open/write/close functions. Reproduction example http://jsbin.com/bitezacoqi/1/edit?html,js,output Simple JavaScript code example: var docStr = "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html><head><title>Title</title><link rel='stylesheet' type='text/css' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css' /></head><body>Simple text</body></html>"; var iframe = document.createElement("iframe"); document.body.appendChild(iframe); iframe.contentWindow.document.open("text/html", "replace"); iframe.contentWindow.document.write(docStr); iframe.contentWindow.document.close(); iframe.contentWindow.document.open("text/html", "replace"); iframe.contentWindow.document.write(docStr); iframe.contentWindow.document.close(); Actual results: Css styles are not loaded in such case, it can be observed in Network tab of Firebug or another dev tool, so existing on a page <body> tag doesn't have any styles applied. Expected results: Css styles are loaded and applied to the tags in the iframe document.
Component: Untriaged → CSS Parsing and Computation
OS: Unspecified → Windows 7
Product: Firefox → Core
Hardware: Unspecified → x86_64

As far as I can tell, this works fine: the stylesheet is loaded in the "Simple text" iframe. Reporter, are you still having this issue?

Flags: needinfo?(kushniruk.andrey)
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 11 votes.
:emilio, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(kushniruk.andrey)
Flags: needinfo?(emilio)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.