Bug 16010

Summary: Incorrect height layout when DIV has height 100% and padding/border existed.
Product: WebKit Reporter: James <jimmyps.ong>
Component: Layout and RenderingAssignee: Robert Hogan <robert>
Status: NEW ---    
Severity: Normal CC: hyatt, robert
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Testcase none

Description James 2007-11-15 20:23:24 PST
When a DIV with height = 100% and padding/border is specified, it will render incorrect height. 

Current result: The DIV has a gaps in the bottom.
Expected result: The DIV should fill the entire space because its height is 100%. 

Note: IE6+, FF, Opera are rendering correctly.

See the attachment for sample.
Comment 1 James 2007-11-15 20:24:25 PST
Created attachment 17310 [details]
Testcase

Testcase
Comment 2 David Kilzer (:ddkilzer) 2007-11-15 22:40:48 PST
Confirmed rendering difference with Firefox 2.0.0.9, Opera 9.22 and Firefox 3.0b2 (14-Nov-2007).

Tested with a local debug build of WebKit r27716 with Safari 3.0.4 (523.12) on Mac OS X 10.4.11 (8S165).

Comment 3 Pruthviraj S P 2009-06-25 02:36:56 PDT
Hi

While anaysing the root cause for this bug, came to know that the padding height was deducted from the original height of the block and was resulting in the gap which was filled with the background color. As a work around I made changes to recalculate the height in renderbox.cpp. With these changes the test case is behaving as it is behaving in IE. Let me know whether my anaysis is right or wrong.

Thanks