WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
VERIFIED FIXED
8126
Padding must not apply to column
https://bugs.webkit.org/show_bug.cgi?id=8126
Summary
Padding must not apply to column
Gérard Talbot (no longer involved)
Reported
2006-04-01 17:35:25 PST
Reference: "'padding-top', 'padding-right', 'padding-bottom', 'padding-left', 'padding' Applies to: all elements except elements with table display types other than table, inline-table, and table-cell" coming from CSS 2.1, Section 8.4 Padding
http://www.w3.org/TR/CSS21/box.html#padding-properties
Reference: "The five properties related to padding ('padding', 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left') now say that they don't apply to table rows, row groups, header groups, footer groups, columns, and column groups." coming from CSS 2.1, Section C.3.10
http://www.w3.org/TR/CSS21/changes.html#q36
Steps to reproduce: Load the testcase at provided URL (I tried with Safari 2.02 (416.13)). Expected results: Each of the 3 tables must measure exactly 300px. I searched for duplicate bugfile and couldn't find one.
Attachments
reduced test case
(717 bytes, text/html)
2006-07-09 15:10 PDT
,
Sam Weinig
no flags
Details
Patch.
(679 bytes, patch)
2006-09-11 00:28 PDT
,
Dave Hyatt
aroben
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Gérard Talbot (no longer involved)
Comment 1
2006-07-07 06:21:07 PDT
The latest (April 11th 2006) release of CSS 2.1 is a bit more explicit and easier to read: "'padding-top', 'padding-right', 'padding-bottom', 'padding-left' Value: <padding-width> | inherit Initial: 0 Applies to: all elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column" CSS 2.1, Section 8.4 Padding
http://www.w3.org/TR/2006/WD-CSS21-20060411/box.html#padding-properties
"The five properties related to padding ('padding', 'padding-top', 'padding-right', 'padding-bottom', and 'padding-left') now say that they don't apply to table rows, row groups, header groups, footer groups, columns, and column groups." CSS 2.1, Section C.3.10
http://www.w3.org/TR/2006/WD-CSS21-20060411/changes.html#q36
Joost de Valk (AlthA)
Comment 2
2006-07-09 13:36:50 PDT
Confirmed the third result isn't correct, both Opera and Firefox render it correctly. Reporter, would it be possible to attach the testcase to the bug? Thx!
Sam Weinig
Comment 3
2006-07-09 15:10:09 PDT
Created
attachment 9313
[details]
reduced test case In case the reporter does not feel comfortable adding his test case, I am attaching a reduction of just the table with the issue.
Gérard Talbot (no longer involved)
Comment 4
2006-07-18 20:15:25 PDT
> Reporter, would it be possible to attach the testcase to the bug?
> In case the reporter does not feel comfortable adding his test case, I am > attaching a reduction of just the table with the issue.
Sorry, I did not get this bugmail due to various reasons, one being my webhosting company going through its own difficulties, overloads. The URL provided in this bugfile form is the original testcase: I feel confortable with whatever you do to fix this bug :) . There is a pseudo-rule right under the table so that measurements or verifications can be done easily and graphically. Thank you both (Joost and Sam) for confirming this bug and for your interest Gérard
Dave Hyatt
Comment 5
2006-09-11 00:28:17 PDT
Created
attachment 10498
[details]
Patch.
Dave Hyatt
Comment 6
2006-09-11 00:37:06 PDT
This change is probably worth explaining (I enhanced the comment a bit in my tree). When computing the minimum and maximum preferred widths for cells, we have a method called styleOrColWidth that attempts to snag the width from the cell, and if not set there, it uses the column. The problem arises when fixed widths are specified on the column. For percentage widths on cells vs. columns there is no difference, since a box-sizing rule of border-box is effectively what is assumed in all cases. For fixed widths though the behavior is different. A fixed width column is *still* applied to the border box of the cell. Therefore we need to subtract out the border and padding of the cell from the width returned. It will then get added back in later. (This does mean we'll fail degenerate cases where the border/padding exceed the column width, but the table code is full of that problem, and I'm not overly concerned about it.)
Dave Hyatt
Comment 7
2006-09-11 20:40:10 PDT
Actually it occurred to me that even the degenerate case of too-small column widths will still behave correctly, so everything's all good here.
Adam Roben (:aroben)
Comment 8
2006-09-11 21:27:44 PDT
Comment on
attachment 10498
[details]
Patch. r=me
David Kilzer (:ddkilzer)
Comment 9
2006-09-12 08:06:11 PDT
Fixed by hyatt in
r16315
, test in
r16316
.
Gérard Talbot (no longer involved)
Comment 10
2008-03-21 09:01:43 PDT
Thank you for fixing this bug! :) Marking as VERIFIED
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