Bug 20941 - incorrect height calculation inside nested positioned elements
Summary: incorrect height calculation inside nested positioned elements
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Dave Hyatt
Depends on:
Reported: 2008-09-19 10:05 PDT by Max Barel
Modified: 2008-09-19 13:55 PDT (History)
0 users

See Also:

test case html (975 bytes, text/html)
2008-09-19 10:07 PDT, Max Barel
no flags Details
Patch to fix bug (176.65 KB, patch)
2008-09-19 13:47 PDT, Dave Hyatt
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Barel 2008-09-19 10:05:33 PDT
  - a div is absolute and its height is not specified but must be computed from top and bottom, 
  - a nested absolute div has its size computed from parent (correctly computed)
  - a nested image inside the previous, with relative height got an incorrect size

The image size is calculated relative to body rather than closest positioned parent.
Strange enough, calculation of the width is correct.

See test case in attachment.
Comment 1 Max Barel 2008-09-19 10:07:28 PDT
Created attachment 23571 [details]
test case html
Comment 2 Dave Hyatt 2008-09-19 13:12:47 PDT
I see the problem. Taking.

Comment 3 Dave Hyatt 2008-09-19 13:47:33 PDT
Created attachment 23581 [details]
Patch to fix bug
Comment 4 Dave Hyatt 2008-09-19 13:55:18 PDT
Fixed in r36672.