Bug 19679 - iframes with a height of 32,768px or greater do not layout correctly
Summary: iframes with a height of 32,768px or greater do not layout correctly
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Major
Assignee: Timothy Hatcher
Keywords: InRadar
Depends on:
Reported: 2008-06-19 12:04 PDT by Timothy Hatcher
Modified: 2008-06-20 15:23 PDT (History)
0 users

See Also:

Testcase (248 bytes, text/html)
2008-06-19 12:06 PDT, Timothy Hatcher
no flags Details
Proposed patch (40.35 KB, patch)
2008-06-19 20:17 PDT, Timothy Hatcher
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2008-06-19 12:04:10 PDT
If a iframe has a height of 32,768px or greater (INT_MAX + 1), then the iframe does not display in the correct location on the page. This does not happen with other blocks. It seems like an integer overflow problem and could be related to iframes being NSViews on Mac. I am not sure what happens on Windows. Firefox does not have a problem either. See the attached test case.

This was found in the Web inspector, since we use iframes to display resource source code. We want to have the frame be the full height of the document, so we set the height to match the size of the frame body. This lets us put other sibling content (http headers) above the frame and have one scrollbar contain the extra content and the frame.
Comment 1 Timothy Hatcher 2008-06-19 12:06:18 PDT
Created attachment 21845 [details]
Comment 2 Adam Roben (:aroben) 2008-06-19 12:08:04 PDT
Comment on attachment 21845 [details]

On Windows I see a large block of red, with a large block of green beneath it.
Comment 3 Timothy Hatcher 2008-06-19 12:10:39 PDT
I meant to say SHORT_MAX + 1, not INT_MAX.
Comment 4 Timothy Hatcher 2008-06-19 12:11:08 PDT
So it seems this is a cross platform issue.
Comment 5 Mark Rowe (bdash) 2008-06-19 14:34:13 PDT
Comment 6 Timothy Hatcher 2008-06-19 20:17:21 PDT
Created attachment 21852 [details]
Proposed patch
Comment 7 Dave Hyatt 2008-06-20 11:25:40 PDT
Comment on attachment 21852 [details]
Proposed patch

Comment 8 Timothy Hatcher 2008-06-20 15:23:05 PDT
Landed in r34693.