Bug 25442

Summary: percentage base offset from top (bottom) is incorrect when containing block has no height specified.
Product: WebKit Reporter: Philippe Wittenbergh <phiw2>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: ahmad.saleem792, ap, rniwa, zalan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
test case
none
Safari 15.5 matches other browsers none

Description Philippe Wittenbergh 2009-04-28 01:03:23 PDT
A change set between r41698 and r41545 changed the behaviour of percentage based offsets for the top and bottom property – to be more in line with CSS2.1:9.3.2
However, when the containing block has no height (auto) specified, the percentage is computed based on the height of the viewport, _not_ as specified, the height of the containing block.

From CSS2.1:9.3.2
<percentage>
    The offset is a percentage of the containing block's width (for 'left' or 'right') or height (for 'top' and 'bottom'). Negative values are allowed.

http://www.w3.org/TR/CSS21/visuren.html#position-props
Comment 1 Philippe Wittenbergh 2009-04-28 01:04:26 PDT
Created attachment 29835 [details]
test case

In the test case, for the left most box, the containing block (green) has a height specified. For the other 2 boxes (yellow containing block), the height is auto
Comment 2 Ahmad Saleem 2022-06-16 16:09:23 PDT
Created attachment 460280 [details]
Safari 15.5 matches other browsers

I am not able to reproduce this bug based on attached test case in Safari 15.5 on macOS 12.4. All browser renders the test case same.

Is this something got fixed along the lines or it was always correct behavior and Web-specs were clarified further?

Can this be marked as "RESOLVED CONFIGURATION CHANGED" since behavior across all browsers (as shown in attached screenshot) is same? Thanks!
Comment 3 zalan 2022-06-16 20:50:37 PDT
(In reply to Ahmad Saleem from comment #2)
> Created attachment 460280 [details]
> Safari 15.5 matches other browsers
> 
> I am not able to reproduce this bug based on attached test case in Safari
> 15.5 on macOS 12.4. All browser renders the test case same.
> 
> Is this something got fixed along the lines or it was always correct
> behavior and Web-specs were clarified further?
> 
> Can this be marked as "RESOLVED CONFIGURATION CHANGED" since behavior across
> all browsers (as shown in attached screenshot) is same? Thanks!
Thank you!