Closed Bug 184976 Opened 22 years ago Closed 22 years ago

Degenerate sized iframe

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 180552

People

(Reporter: craig.lawson, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01

The page contains an iframe, and the browser draws it as 1 x 1 pixel. That ain't
right, and version 6.2.3 (and Opera 6.1) did a better job of rendering.

If you click on the "next" button, there is another example of a degenerate
iframe, this time drawn 1 x n (1 pixel high, n wide).

Reproducible: Always

Steps to Reproduce:
1. Browse to the page.
2. There you have it!

Actual Results:  
Page renders, iframe is drawn as a dinky spot. No joy.

Expected Results:  
Draw the thing larger.
This is what is generated from the Javascript:
<iframe id="ifr" tabindex="-1" width="0" height="0" frameborder="1"
src="TermsFrame.html">

Because document.body.clientHeight and clientWidth returns 0, so ht and wd get
the value -22. Then changed to 0 in the if-statement.

var wd_clearance = 22;
var ht = document.body.clientHeight - ht_clearance;
var wd = document.body.clientWidth - wd_clearance;
if (ht < 0){ ht = 0; }
if (wd < 0){ wd = 0; }

clientHeight/clientWidth is broken if overflow:hidden; is set in the body tag.

*** This bug has been marked as a duplicate of 180552 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
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.