WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
159251
RenderBox::hasDefiniteLogicalHeight() shouldn't consider all abspos elements as definite
https://bugs.webkit.org/show_bug.cgi?id=159251
Summary
RenderBox::hasDefiniteLogicalHeight() shouldn't consider all abspos elements ...
Manuel Rego Casasnovas
Reported
2016-06-29 00:21:11 PDT
Created
attachment 282326
[details]
Test case to reproduce the issue An abspos element doesn't have a definite height unless it has a specified height or the top and bottom properties are not auto. For example, the following div doesn't have a definite height: <div style="position: absolute;"></div> However, this one will have a definite height: <div style="position: absolute; top: 0; bottom: 0;"></div> RenderBox::hasDefiniteLogicalHeight() is considering that both have a definite height which is wrong:
http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L4760
This leads to wrong results in CSS Grid Layout check the attached example, the 50% in the 2nd row is resolved against the 100px of the first row when it should be considered "auto". You can check it live at:
http://jsbin.com/xuyane/1/edit?html,css,output
Attachments
Test case to reproduce the issue
(393 bytes, text/html)
2016-06-29 00:21 PDT
,
Manuel Rego Casasnovas
no flags
Details
Current output
(1.60 KB, image/png)
2016-06-29 00:21 PDT
,
Manuel Rego Casasnovas
no flags
Details
Expected output
(1.55 KB, image/png)
2016-06-29 00:22 PDT
,
Manuel Rego Casasnovas
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Manuel Rego Casasnovas
Comment 1
2016-06-29 00:21:43 PDT
Created
attachment 282327
[details]
Current output
Manuel Rego Casasnovas
Comment 2
2016-06-29 00:22:05 PDT
Created
attachment 282328
[details]
Expected output
Ahmad Saleem
Comment 3
2023-03-17 17:01:48 PDT
I am able to reproduce this issue in WebKit ToT (
261811@main
) using attached test case and also in Chrome Canary 113. Only Firefox Nightly 113 show expected output. Just wanted to share updated test results. Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug