Bug 16431

Summary: Changing a nested element from position:fixed to position:absolute messes up body.scrollHeight
Product: WebKit Reporter: Khoo Yit Phang <khooyp>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: mitz
Priority: P2 Keywords: HasReduction
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Test case. none

Description Khoo Yit Phang 2007-12-13 21:18:39 PST
In a document that looks like the following:

<div style="height: 100px; position:relative; overflow: auto">
	<div style="position:fixed"/>
</div>

When the inner div is changed to be position:absolute, and offset to something larger than the size of the document (e.g. top:2000px), the document height will be extended to wherever the div was offset to, and the window scrollbars will appear if not already.

It is as if the new document height was calculated without considering overflow: auto in the outer div. The same problem occurs for overflow: none or overflow: scroll too.
Comment 1 Khoo Yit Phang 2007-12-13 21:19:13 PST
Created attachment 17887 [details]
Test case.