Closed
Bug 181875
Opened 23 years ago
Closed 22 years ago
[FIX]max-width/height ignored for unconstrained IFRAME/EMBED/OBJECT
Categories
(Core :: CSS Parsing and Computation, defect, P1)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.4beta
People
(Reporter: pc-mozilla2, Assigned: bzbarsky)
Details
Attachments
(3 files)
|
633 bytes,
text/html
|
Details | |
|
1.15 KB,
text/html
|
Details | |
|
3.30 KB,
patch
|
roc
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021108
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021108
It seems that the CSS 2 style attributed min/max-height/width are ignored for
iframe tags. If I do something like <IMG SRC=... style="max-width: 100"> for
some large image, it will be scaled down to 100 pixels wide. If I do something
like <IFRAME SRC=... style="max-height: 50"> then I see a larger box. I'm doing
this with the SRC pointing to an empty file, though that shouldn't matter.
Note that bug 10497 references similar problems fixed 3 years ago with the IMG tag.
Reproducible: Always
Steps to Reproduce:
1. Create an HTML file with an IFRAME pointing to an empty source file
2. Set a max-height style attribute to 50.
3. Observe the box when the page is rendered
Actual Results:
I see a box that appears to be 300x150.
Expected Results:
The box should be 300x50 pixels.
| Reporter | ||
Comment 1•23 years ago
|
||
It seems that this is also not implemented for the EMBED tag.
| Reporter | ||
Comment 3•23 years ago
|
||
I tried to reassign this to the owner/QA for the selected component, since I
corrected the component, but it won't let me, as that would change the status
from UNCOMFIRMED to NEW. Could someone with the correct authority please do so?
| Reporter | ||
Updated•23 years ago
|
QA Contact: amar → ian
Comment 5•22 years ago
|
||
Preston Crow: Please see the attached test case. It appears to me that the
max-height is correctly limiting the IFRAME height.
I'm not sure if this observation pertains, but: unlike IMG, IFRAME does not
have
an intrinsic width/height.
If you agree that this styling works, please close the bug off.
| Assignee | ||
Comment 6•22 years ago
|
||
No response from Preston, testcase works, so....
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Comment 7•22 years ago
|
||
I'm attaching another example that demonstrates my understanding of how it
should work. The IMG tag example works, the others don't look right to me
(using 2003021905 nightly build; I'll upgrade and see if that helps).
| Reporter | ||
Comment 8•22 years ago
|
||
I just switched to build 2003041508, and the OBJECT example in my test case now
produces the right output (just like the IMG tag now). The EMBED and IFRAME
still seem to be ignoring the max-height/width.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
| Assignee | ||
Comment 9•22 years ago
|
||
Preston, thanks for the updated testcase. The problem is only apparent when
the computed width/height is unconstrained, which was not the case in Mike's
testcase....
In any case, this patch fixes it.
| Assignee | ||
Comment 10•22 years ago
|
||
Taking.
Assignee: dbaron → bzbarsky
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P1
Summary: max-width/height ignored for IFRAME → [FIX]max-width/height ignored for unconstrained IFRAME/EMBED/OBJECT
Target Milestone: --- → mozilla1.4beta
| Assignee | ||
Comment 11•22 years ago
|
||
Comment on attachment 120595 [details] [diff] [review]
Fix
roc, would you do the honors?
I'm starting to think we need a better mechanism for doing this unconstrained
stuff... it's too easy to make mistakes.
Attachment #120595 -
Flags: superreview?(roc+moz)
Attachment #120595 -
Flags: review?(roc+moz)
Attachment #120595 -
Flags: superreview?(roc+moz)
Attachment #120595 -
Flags: superreview+
Attachment #120595 -
Flags: review?(roc+moz)
Attachment #120595 -
Flags: review+
| Assignee | ||
Comment 12•22 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 13•22 years ago
|
||
In case anyone else is following this, I just switched to the latest nightly
build (2003041609), and my test case now looks exactly like I would expect it
to. Thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•