Bug 22881

Summary: incorrect size computing of absolute element on window resize
Product: WebKit Reporter: Max Barel <max>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: mitz, rniwa, simon.fraser
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
test case, load and rezise the window. none

Max Barel
Reported 2008-12-16 11:16:47 PST
Hi, Given an absolutely positioned element (say a div) with relative height, containing, say, an img. This img has height 100% and width auto. The img width compute ok. The div width shrink to the content size at load time, correct. Now if one resize the window, height are correctly computed BUT the container width is not, staying at original size. Using "overflow:hidden" does not resolve the problem. This is NOT the "evangelism bug" #15286. Absolute element should shrink to content width, after this one is computed. See attached test case. Load the file and resize. FireFox is also showing misbehavior, it does not even shrink width at first load, using the image natural width as content width. This may be related to another, fixed, bug I reported: https://bugs.webkit.org/show_bug.cgi?id=20941
Attachments
test case, load and rezise the window. (545 bytes, application/xhtml+xml)
2008-12-16 11:18 PST, Max Barel
no flags
Max Barel
Comment 1 2008-12-16 11:18:38 PST
Created attachment 26057 [details] test case, load and rezise the window. File is XHTML but the bug shows the same as html.
Note You need to log in before you can comment on or make changes to this bug.