Closed
Bug 105821
Opened 24 years ago
Closed 24 years ago
settting the background color of an iframe
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: rvj, Assigned: eric)
Details
(Whiteboard: INVALID?)
Attachments
(3 files)
Seem unable to set the background color of a XUL iframe. Should this currently
work ?
<iframe id='window' src="url" style="background-color:red;" />
If I load a short document (xml or gif) an implicit white background of a 200px
is created.
Ihave tried using the computed style height to return the actual height of the
document but it is not sufficiently accurate to dynamically adjust the iframe
height e.g. it cuts off the last table row to a greater or lesser extent.
What would you expect setting the background color of an iframe to do? The
entire contents of the iframe are another document, which has its own background.
First of all let me state that this is a xul question.
I am trying to get rid of the current white space (iframe canvas?) which occurs
when the content of a document is smaller than the default iframe height.
I would expect it to set the underlying background color of the iframe, not
the document, which as you say has its own color background.
This white space problem goes way if I can set the height of the iframe exactly
to the height of the document.
But as I said earlier getcomputedstyleheight for the document is currently not
accurate enough so I lose the bottom edge.
So back to your question - I would expect it to set the background color of the
iframe (canvas)in an identical manner to setting the background color of the
window (canvas).
<window style="">
<script>
function setbackground()
{
// get document background color
// set iframe background color }
</script>
<iframe style="" />
</window>
apologies for duplicate testcase attachment
testcase to show example of document content/height less than iframe height but
no ability to change iframe canvas color
the same problem occurs with other iframe src's for example xml+css documents
which do not fill the iframe
->HTMLFrames, although it's not clear whether this should actually work
Assignee: dbaron → pollmann
Component: Style System → HTMLFrames
QA Contact: ian → amar
Attachment #54391 -
Attachment mime type: text/plain → application/xml
Attachment #54392 -
Attachment mime type: text/plain → application/xml
Attachment #54391 -
Attachment mime type: application/xml → text/plain
PS
While in the past it may have been an unsupported property for html pages, I
would suggest that as an XUL widget it should be provided to be consistant with
all other XUL widgets.
Otherwise there is no means of removing the white space.
| Reporter | ||
Comment 10•24 years ago
|
||
PPS
I assume that when bug 105821 is resolved that the CSS background-color
property will be used to set transparency. So for example if a short xml
document does not fill the xul iframe flex area, the XUL window color will be
displayed
<WINDOW style="background-color:red">
<IFRAME flex="1" src="http://../small.xml" style="background-
color:transparent"/>
</WINDOW>
I assume that the same approach will apply for other background colors
<IFRAME src="http://../small.xml" style="background-color:red"/>
Any chance of this being implimented as a partial interim solution?
i.e. it appears that fixing iframe transparency is substantially more complex
and is not expected before 1.0 at earliest
I'm marking this INVALID because a real solution has landed. See bug 50623 for
more information.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 12•24 years ago
|
||
OK but this makes it impossible to set the background of an iframe
independently of the canvas?
For example, if an iframe is used to display to overlay a gif with transparent
areas.
<iframe style="background-color:red" src="overlay.gif" />
It seems that only the <iframe> element which will have this limitation?
The remaining fix for bug 50623, which I will check in today or tomorrow, will
fix "background-color" on IFRAMEs so that everything you want to do will work :-).
Updated•8 years ago
|
Product: Core → Core Graveyard
Updated•8 years ago
|
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•