Closed
Bug 23014
Opened 25 years ago
Closed 24 years ago
percentage <iframe>s don't resize when window resizes
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect, P3)
Core
Layout: Images, Video, and HTML Frames
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: karnaze, Assigned: pollmann)
References
Details
(Whiteboard: fix in hand)
Attachments
(1 file)
67 bytes,
text/html
|
Details |
<iframe style="width:50%; height:300px" src=foo.html> doesn't resize properly in all cases when the window resizes. It only seems to work when the window is made smaller than the current width of the iframe. Eric, you should follow the behavior of percentage <div>s rather than <table>s because <table>s have a lot of legacy quirks. For example in the test case above, if I had specified a 50% height, the <iframe> should not be 50% the height of the viewport as is the case with tables.
Updated•25 years ago
|
Priority: P3 → P1
Comment 1•25 years ago
|
||
At least in M12, using HEIGHT=100%, WIDTH=100% the <IFRAME> doesn't size properly at first (too small for the rendered window) then it only resizes if you shrink the main window dimentions. Personal rant: Far too many next gen sites and product UI's depend on this (not to mention the one's we're building). Since <LAYER> is dead, let's shoot for getting IFRAME behavior as close to correct as possible in the first release out the door. Requesting a bump in priority.
Updated•25 years ago
|
Priority: P1 → P3
Comment 2•25 years ago
|
||
Backing status to P3 (you fellas own the priority, my apologies). Putting my votes behind this one.
Comment 3•25 years ago
|
||
Not sure if it's a duplicate, but this is extreemly similar to <a href="http://bugzilla.mozilla.org/show_bug.cgi?id=25453">bug #25453</a>
Assignee | ||
Comment 4•24 years ago
|
||
Chris, can you help me out a bit understanding this one? Since 50% height is
not supposed to be 50% of the viewport, what should it be relative to? Thanks!
Karnaze wrote:
> For example in the test case above, if I had specified a 50% height, the
> <iframe> should not be 50% the height of the viewport as is the case with
On the upside, I got % width working in my tree, and resizing the window will
resize the iframe dynamically as it should, so I think I'm getting close on this
one.
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•24 years ago
|
||
I have a fix that I think does the right thing based on Chris Karnaze's comments above, will aim for M16.
Whiteboard: Fix in hand
Target Milestone: --- → M16
Assignee | ||
Comment 8•24 years ago
|
||
After some help from Chris yesterday, I'm going to be making a few changes to my fix that will correct more cases than just percentage height and width. Specifically, we have problems if the height or width is unspecified, or if the iframe is in a table. I'll try to get something sane to happen in all cases before checking this in.
Whiteboard: Fix in hand
Assignee | ||
Comment 9•24 years ago
|
||
I have fixes for all cases except iframe percentage height. It is unclear how this should / could be handled. In every case where I specify a percentage height on an iframe (including when that iframe is inside a fixed height table), the reflow method gets an computed height and available height of NS_UNCONSTRAINED. As such, we're currently treating it exactly like the height wasn't specified and giving the iframe a height of 150. Consider this case: <table border height=600> <tr> <td> <iframe height=50% src=about:blank></iframe> </td> </tr> </table> The page designer might expect an iframe of height 300. However, since the iframe doesn't know that the table is going to be 600 pixels high (gets NS_UNCONSTRAINED for computed and available height), we just make it 150 pixels high. Even worse, what if the table had a height specified of 40 pixels! Then the iframe being 150 forces the table to a height of 150. Not sure what to do here.
OS: Windows NT → All
Hardware: PC → All
Assignee | ||
Comment 10•24 years ago
|
||
Chris, your suggested change to ReflowState worked! :) (making iframes caculate percentage height like tables in quirks mode) I'll run through all the test cases and pre-checkins.
Whiteboard: fix in hand
Assignee | ||
Comment 11•24 years ago
|
||
Percent width fixes checked in. I have percent height fixes in my tree, which need to be reviewed. I'll attach them shortly (and send them your way Chris) :)
Assignee | ||
Comment 12•24 years ago
|
||
Percent height fixes checked in. Chris, this was the one-liner you suggested when you were up here and I had Harish look at it. I also checked in a fix for CalcQuirksModeHeight for native scrollbars, and added one sanity check. Will attach testcase shortly.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•24 years ago
|
||
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 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
•