WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
18347
Absolutely positioned image percentage width does not respect container's padding
https://bugs.webkit.org/show_bug.cgi?id=18347
Summary
Absolutely positioned image percentage width does not respect container's pad...
Andrew Watt
Reported
2008-04-07 14:02:41 PDT
An absolutely positioned replaced element with a percentage width should scale in respect to its containing block's width, including padding. Instead, it seems that the padding is not taken into account, and only the content width is used. I believe the relevant part of the CSS 2.1 spec is <
http://www.w3.org/TR/CSS21/visudet.html#the-width-property
>: For absolutely positioned elements whose containing block is based on a block-level element, the percentage is calculated with respect to the width of the padding box of that element. This is a change from CSS1, where the percentage width was always calculated with respect to the content box of the parent element.
Attachments
Test case
(3.85 KB, text/html)
2008-04-07 14:06 PDT
,
Andrew Watt
no flags
Details
Test case (updated)
(967 bytes, text/html)
2008-04-13 20:02 PDT
,
Anatoli Papirovski
no flags
Details
patch
(12.44 KB, patch)
2008-04-13 20:09 PDT
,
Anatoli Papirovski
no flags
Details
Formatted Diff
Diff
patch (updated)
(12.42 KB, patch)
2008-04-19 13:59 PDT
,
Anatoli Papirovski
no flags
Details
Formatted Diff
Diff
patch (updated 2)
(12.44 KB, patch)
2008-04-21 07:36 PDT
,
Anatoli Papirovski
hyatt
: review+
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Andrew Watt
Comment 1
2008-04-07 14:06:57 PDT
Created
attachment 20388
[details]
Test case The gradient image should be as wide as the blue box.
Anatoli Papirovski
Comment 2
2008-04-13 20:02:44 PDT
Created
attachment 20514
[details]
Test case (updated) An improved test case, which makes it a little clearer with the standardized green for pass and red for fail.
Anatoli Papirovski
Comment 3
2008-04-13 20:09:25 PDT
Created
attachment 20515
[details]
patch I went over the specs and seems to me like the test case was correct, not to mention that webkit was already doing the correct thing for the height, just not for the width. This is my first patch, I tried my best, but I'm sure there's bound to be errors... also, I made sure to run the webkit tests and found no regressions. I'm new to this whole thing, so I appreciate any tips or corrections.
Anatoli Papirovski
Comment 4
2008-04-19 13:59:55 PDT
Created
attachment 20692
[details]
patch (updated) Updated the patch to remove "tabs" from the ChangeLogs as not to break the script.
Anatoli Papirovski
Comment 5
2008-04-21 07:36:21 PDT
Created
attachment 20723
[details]
patch (updated 2) Removed tabs from the test case too, just in case that would break anything.
Eric Seidel (no email)
Comment 6
2008-04-30 23:57:25 PDT
This looks right to me, but hyatt is really the expert here.
Dave Hyatt
Comment 7
2008-05-01 02:31:22 PDT
Comment on
attachment 20723
[details]
patch (updated 2) r=me
mitz
Comment 8
2008-05-01 16:58:41 PDT
Landed in <
http://trac.webkit.org/changeset/32784
> with tiny tweaks to the change logs.
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