Bug 25442 - percentage base offset from top (bottom) is incorrect when containing block has no height specified.
Summary: percentage base offset from top (bottom) is incorrect when containing block h...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-28 01:03 PDT by Philippe Wittenbergh
Modified: 2022-06-16 20:50 PDT (History)
4 users (show)

See Also:


Attachments
test case (764 bytes, text/html)
2009-04-28 01:04 PDT, Philippe Wittenbergh
no flags Details
Safari 15.5 matches other browsers (697.45 KB, image/png)
2022-06-16 16:09 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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!