<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>8126</bug_id>
          
          <creation_ts>2006-04-01 17:35:25 -0800</creation_ts>
          <short_desc>Padding must not apply to column</short_desc>
          <delta_ts>2008-03-21 09:01:43 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tables</component>
          <version>416.x</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.gtalbot.org/BrowserBugsSection/MSIE6Bugs/TableColumnPaddingWidth.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gérard Talbot (no longer involved)">browserbugs2</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ian</cc>
    
    <cc>joost</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>38237</commentid>
    <comment_count>0</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2006-04-01 17:35:25 -0800</bug_when>
    <thetext>Reference: &quot;&apos;padding-top&apos;, &apos;padding-right&apos;, &apos;padding-bottom&apos;, &apos;padding-left&apos;, &apos;padding&apos; Applies to: all elements except elements with table display types other than table, inline-table, and table-cell&quot; 
coming from CSS 2.1, Section 8.4 Padding
http://www.w3.org/TR/CSS21/box.html#padding-properties

Reference: &quot;The five properties related to padding (&apos;padding&apos;, &apos;padding-top&apos;, &apos;padding-right&apos;, &apos;padding-bottom&apos;, and &apos;padding-left&apos;) now say that they don&apos;t apply to table rows, row groups, header groups, footer groups, columns, and column groups.&quot; 
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&apos;t find one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48700</commentid>
    <comment_count>1</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2006-07-07 06:21:07 -0700</bug_when>
    <thetext>The latest (April 11th 2006) release of CSS 2.1 is a bit more explicit and easier to read:

&quot;&apos;padding-top&apos;, &apos;padding-right&apos;, &apos;padding-bottom&apos;, &apos;padding-left&apos;
    Value:  	&lt;padding-width&gt; | 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&quot;
 CSS 2.1, Section 8.4 Padding
http://www.w3.org/TR/2006/WD-CSS21-20060411/box.html#padding-properties

&quot;The five properties related to padding (&apos;padding&apos;, &apos;padding-top&apos;, &apos;padding-right&apos;, &apos;padding-bottom&apos;, and &apos;padding-left&apos;) now say that they don&apos;t apply to table rows, row groups, header groups, footer groups, columns, and column groups.&quot;
CSS 2.1, Section C.3.10
http://www.w3.org/TR/2006/WD-CSS21-20060411/changes.html#q36
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48954</commentid>
    <comment_count>2</comment_count>
    <who name="Joost de Valk (AlthA)">joost</who>
    <bug_when>2006-07-09 13:36:50 -0700</bug_when>
    <thetext>Confirmed the third result isn&apos;t correct, both Opera and Firefox render it correctly. Reporter, would it be possible to attach the testcase to the bug? Thx!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48984</commentid>
    <comment_count>3</comment_count>
      <attachid>9313</attachid>
    <who name="Sam Weinig">sam</who>
    <bug_when>2006-07-09 15:10:09 -0700</bug_when>
    <thetext>Created attachment 9313
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50313</commentid>
    <comment_count>4</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2006-07-18 20:15:25 -0700</bug_when>
    <thetext>&gt; Reporter, would it be possible to attach the testcase to the bug? 

&gt; In case the reporter does not feel comfortable adding his test case, I am
&gt; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55238</commentid>
    <comment_count>5</comment_count>
      <attachid>10498</attachid>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-09-11 00:28:17 -0700</bug_when>
    <thetext>Created attachment 10498
Patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55239</commentid>
    <comment_count>6</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-09-11 00:37:06 -0700</bug_when>
    <thetext>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&apos;ll fail degenerate cases where the border/padding exceed the column width, but the table code is full of that problem, and I&apos;m not overly concerned about it.)
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55279</commentid>
    <comment_count>7</comment_count>
    <who name="Dave Hyatt">hyatt</who>
    <bug_when>2006-09-11 20:40:10 -0700</bug_when>
    <thetext>Actually it occurred to me that even the degenerate case of too-small column widths will still behave correctly, so everything&apos;s all good here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55280</commentid>
    <comment_count>8</comment_count>
      <attachid>10498</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2006-09-11 21:27:44 -0700</bug_when>
    <thetext>Comment on attachment 10498
Patch.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55306</commentid>
    <comment_count>9</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-09-12 08:06:11 -0700</bug_when>
    <thetext>Fixed by hyatt in r16315, test in r16316.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74636</commentid>
    <comment_count>10</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2008-03-21 09:01:43 -0700</bug_when>
    <thetext>Thank you for fixing this bug! :)

Marking as VERIFIED</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>9313</attachid>
            <date>2006-07-09 15:10:09 -0700</date>
            <delta_ts>2006-07-09 15:10:09 -0700</delta_ts>
            <desc>reduced test case</desc>
            <filename>tablepad.html</filename>
            <type>text/html</type>
            <size>717</size>
            <attacher name="Sam Weinig">sam</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogICAgPGhlYWQ+CiAgICAgICAgPHRpdGxlPnVudGl0bGVk
PC90aXRsZT4KICAgICAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgogICAgICAgICAgICAudGVz
dCB7IHBhZGRpbmc6IDBweCAyNHB4OyB9CiAgICAgICAgPC9zdHlsZT4KICAgICAgICAKICAgIDwv
aGVhZD4KICAgIDxib2R5PgogICAgICAgIDx0YWJsZSBib3JkZXI9IjgiIGNlbGxwYWRkaW5nPSIw
IiBjZWxsc3BhY2luZz0iMCI+CiAgICAgICAgICAgIDxjb2wgd2lkdGg9IjE5MiI+CiAgICAgICAg
ICAgIDxjb2wgd2lkdGg9IjkyIj4KICAgICAgICAgICAgPHRyPgogICAgICAgICAgICAgICAgPHRk
PmlzIDIwMDwvdGQ+CiAgICAgICAgICAgICAgICA8dGQ+aXMgMTAwPC90ZD4KICAgICAgICAgICAg
PC90cj4KICAgICAgICA8L3RhYmxlPgoKICAgICAgICA8dGFibGUgYm9yZGVyPSI4IiBjZWxscGFk
ZGluZz0iMCIgY2VsbHNwYWNpbmc9IjAiPgogICAgICAgICAgICA8Y29sIHdpZHRoPSIxOTIiPgog
ICAgICAgICAgICA8Y29sIHdpZHRoPSI5MiI+CiAgICAgICAgICAgIDx0cj4KICAgICAgICAgICAg
ICAgIDx0ZCBjbGFzcz0idGVzdCI+c2hvdWxkIGJlIDIwMDwvdGQ+CiAgICAgICAgICAgICAgICA8
dGQgY2xhc3M9InRlc3QiPnNob3VsZCBiZSAxMDA8L3RkPgogICAgICAgICAgICA8L3RyPgogICAg
ICAgIDwvdGFibGU+CiAgICA8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>10498</attachid>
            <date>2006-09-11 00:28:17 -0700</date>
            <delta_ts>2006-09-11 21:27:44 -0700</delta_ts>
            <desc>Patch.</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>679</size>
            <attacher name="Dave Hyatt">hyatt</attacher>
            
              <data encoding="base64">SW5kZXg6IHJlbmRlcmluZy9SZW5kZXJUYWJsZUNlbGwuY3BwCj09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHJlbmRl
cmluZy9SZW5kZXJUYWJsZUNlbGwuY3BwCShyZXZpc2lvbiAxNjI5MykKKysrIHJlbmRlcmluZy9S
ZW5kZXJUYWJsZUNlbGwuY3BwCSh3b3JraW5nIGNvcHkpCkBAIC04MCw4ICs4MCwxMyBAQAogICAg
IGlmIChjb2xTcGFuKCkgPiAxIHx8ICF3LmlzQXV0bygpKQogICAgICAgICByZXR1cm4gdzsKICAg
ICBSZW5kZXJUYWJsZUNvbCogY29sID0gdGFibGUoKS0+Y29sRWxlbWVudChfY29sKTsKLSAgICBp
ZiAoY29sKQorICAgIGlmIChjb2wpIHsKICAgICAgICAgdyA9IGNvbC0+c3R5bGUoKS0+d2lkdGgo
KTsKKyAgICAgICAgCisgICAgICAgIC8vIENvbHVtbiB3aWR0aHMgc3BlY2lmaWVkIG9uIDxjb2w+
IGFwcGx5IHRvIHRoZSBib3JkZXIgYm94IG9mIHRoZSBjZWxsLgorICAgICAgICBpZiAody5pc0Zp
eGVkKCkgJiYgdy52YWx1ZSgpID4gMCkKKyAgICAgICAgICAgIHcgPSBMZW5ndGgobWF4KDAsIHcu
dmFsdWUoKSAtIGJvcmRlckxlZnQoKSAtIGJvcmRlclJpZ2h0KCkgLSBwYWRkaW5nTGVmdCgpIC0g
cGFkZGluZ1JpZ2h0KCkpLCBGaXhlZCk7CisgICAgfQogICAgIHJldHVybiB3OwogfQogCg==
</data>
<flag name="review"
          id="3388"
          type_id="1"
          status="+"
          setter="aroben"
    />
          </attachment>
      

    </bug>

</bugzilla>