WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
64046
Wrong image height in absolutely positioned div in relatively positioned parent with bottom padding
https://bugs.webkit.org/show_bug.cgi?id=64046
Summary
Wrong image height in absolutely positioned div in relatively positioned pare...
Silas Brill
Reported
2011-07-06 18:11:19 PDT
Safari version: 5.0.5 (7533.21.1) Other browsers tested: Chrome 12: FAIL Firefox 5: OK IE 7/8/9: OK Steps to reproduce: 1. Create a relatively positioned div with a height and a bottom padding 2. Put in that div an absolutely positioned div with height 100% 3. Put in the second div an image with height 100% 4. Open the file in Chrome or Safari Expected behavior: The image should fill the height of the second div Actual behavior: The image inherits the height value that was set on the first div More information: The attached file has steps 1, 2 and 3 already completed. I have only tested this with the XHTML Transitional doctype.
Attachments
Test HTML file
(745 bytes, text/html)
2011-07-06 18:12 PDT
,
Silas Brill
no flags
Details
Screenshot
(17.79 KB, image/png)
2011-07-06 18:13 PDT
,
Silas Brill
no flags
Details
Proposed patch.
(8.98 KB, patch)
2011-07-19 14:19 PDT
,
Kulanthaivel Palanichamy
no flags
Details
Formatted Diff
Diff
Proposed patch V2
(4.47 KB, patch)
2011-07-21 11:40 PDT
,
Kulanthaivel Palanichamy
no flags
Details
Formatted Diff
Diff
add pixel test result
(192.07 KB, patch)
2011-07-21 18:11 PDT
,
Ryosuke Niwa
hyatt
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Silas Brill
Comment 1
2011-07-06 18:12:40 PDT
Created
attachment 99909
[details]
Test HTML file
Silas Brill
Comment 2
2011-07-06 18:13:14 PDT
Created
attachment 99910
[details]
Screenshot
Alice Boxhall
Comment 3
2011-07-06 20:36:54 PDT
Pulling together the relevant parts of the CSS spec:
http://www.w3.org/TR/CSS2/visudet.html#propdef-height
"<percentage> Specifies a percentage height. The percentage is calculated with respect to the height of the generated box's containing block."
http://www.w3.org/TR/CSS2/visudet.html#containing-block-details
"If the element has 'position: absolute', the containing block is established by the nearest ancestor with a 'position' of 'absolute', 'relative' or 'fixed', in the following way: In the case that the ancestor is an inline element (...) Otherwise, the containing block is formed by the padding edge of the ancestor." So yes, this is a bug.
Kulanthaivel Palanichamy
Comment 4
2011-07-19 14:19:22 PDT
Created
attachment 101384
[details]
Proposed patch.
Kulanthaivel Palanichamy
Comment 5
2011-07-21 11:40:47 PDT
Created
attachment 101616
[details]
Proposed patch V2
Dave Hyatt
Comment 6
2011-07-21 17:02:35 PDT
Comment on
attachment 101616
[details]
Proposed patch V2 r=me. Much nicer!
WebKit Review Bot
Comment 7
2011-07-21 17:14:55 PDT
Comment on
attachment 101616
[details]
Proposed patch V2 Clearing flags on attachment: 101616 Committed
r91533
: <
http://trac.webkit.org/changeset/91533
>
WebKit Review Bot
Comment 8
2011-07-21 17:15:00 PDT
All reviewed patches have been landed. Closing bug.
Ryosuke Niwa
Comment 9
2011-07-21 18:11:01 PDT
Created
attachment 101681
[details]
add pixel test result
Ryosuke Niwa
Comment 10
2011-07-21 18:21:12 PDT
Can someone check & see if the pixel result is good or not?
Dave Hyatt
Comment 11
2011-07-27 11:06:16 PDT
Comment on
attachment 101681
[details]
add pixel test result r=me
Dave Hyatt
Comment 12
2011-07-27 11:07:05 PDT
r=me to add it, but should it really be in the cross-platform dir? The changelog says that at least.
Ryosuke Niwa
Comment 13
2011-07-27 11:54:59 PDT
Committed
r91862
: <
http://trac.webkit.org/changeset/91862
>
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