Bug 76860

Summary: Sub-elements with a percentage height ignore max-height on the parent element
Product: WebKit Reporter: Silas Brill <brilliand+bugzilla>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Testcase for styles on html and body
none
Testcase for styles on div elements none

Description Silas Brill 2012-01-23 14:13:42 PST
Created attachment 123617 [details]
Testcase for styles on html and body

Safari version: 5.1.2

When an element has both a height and a max-height set and a child element has its height set to 100%, the child element's height becomes equal to the value set for the parent element's height, without respecting the parent element's max-height.  However, the parent element's size still respects its max-height, resulting in the parent element and the child element being different sizes.

This bug behaves differently for the html and body elements than for divs, but is present in either case.  Other browsers (Firefox 8 and IE9) handle the html/body case correctly, but behave exactly as Webkit for the div case.
Comment 1 Silas Brill 2012-01-23 14:24:41 PST
Created attachment 123619 [details]
Testcase for styles on div elements

Turns out I was wrong about the situation being different for divs... I had made a mistake composing the testcase.  This testcase demonstrates exactly the same situation as the first one, that is, Webkit gets in wrong (in exactly the same way), whereas Firefox and IE get it right.
Comment 2 Silas Brill 2012-01-31 17:30:23 PST

*** This bug has been marked as a duplicate of bug 26559 ***