Closed
Bug 511084
Opened 15 years ago
Closed 9 years ago
Figure out what to do with iframe/frame as a root element
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: smaug, Assigned: bzbarsky)
References
Details
Attachments
(3 files)
Currently nsGenericHTMLFrameElement::EnsureFrameLoader() doesn't create frame loader if there is no parent element. Opera and Webkit allow <iframe> as a root element. Opera doesn't seem to load anything when <frame> is the root. Webkit seems to load something but paints just random garbage (both Safari and Chrome).
Reporter | ||
Comment 1•15 years ago
|
||
Reporter | ||
Comment 2•15 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
I'm not sure there is a problem offhand with creating a frameloader even if !GetParent(), though we'll have to audit the frameloader code to ensure it doesn't assume mContent has a parent. Looking at the blame, the GetParent() check dates back to bug 170588 for the frame case and bug 52334 for the iframe case. I doubt jst remembers why he added the null-check there at the time, but needinfoing him just in case. Note that before bug 170588 the frameloader was created by the subdocument frame, so a root <iframe> didn't do it, since the root element doesn't ever get a subdocument frame.
Flags: needinfo?(jst)
Reporter | ||
Comment 4•9 years ago
|
||
Don't we need subdocument frame to get sane size information about the iframe.
Comment 5•9 years ago
|
||
I unfortunately do not remember why that null check was added, could very well have been as a precautionary measure w/o any evidence of a real need. Hard to say, was a few years ago :(
Flags: needinfo?(jst)
Assignee | ||
Comment 6•9 years ago
|
||
Attachment #8557311 -
Flags: review?(bugs)
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Reporter | ||
Comment 7•9 years ago
|
||
Comment on attachment 8557311 [details] [diff] [review] Make frame/iframe create a browsing context even if it's the root element So the patch is fine, but I think we should not land this without having at least some reftest to ensure layout can handle this case. (Wouldn't make much sense to have support for iframe as document element, but not able to render it properly.)
Attachment #8557311 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 8•9 years ago
|
||
Layout won't render it with a subdocument frame. But this is no different from what happens if you use <img> as a root element: the image loads, but doesn't get rendered. So I don't think it's a problem per se.
Reporter | ||
Comment 9•9 years ago
|
||
ok, fine. (It is still a problem, since iframe and img should just work normally.)
Assignee | ||
Comment 10•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/32d9b3fa982d
Flags: in-testsuite+
Comment 11•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/32d9b3fa982d
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•