[Webkit-unassigned] [Bug 21644] <td> width calculation skips through width:0 elements and uses the width of their descendants

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 21 21:23:38 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=21644


Tab Atkins <tabatkins at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|layout incorrect due to div |<td> width calculation
                   |style width:0               |skips through width:0
                   |                            |elements and uses the width
                   |                            |of their descendants
           Platform|PC                          |All
         OS/Version|Windows XP                  |All
             Status|UNCONFIRMED                 |NEW
                 CC|                            |tabatkins at google.com
     Ever Confirmed|0                           |1




--- Comment #2 from Tab Atkins <tabatkins at google.com>  2011-10-21 21:23:38 PST ---
Valid bug.  I've included a properly reduced testcase at the end of this comment.

When calculating the minimum width of a table cell, if a container is specified as zero-width, we're (incorrectly) skipping it and instead looking at the widths of its contents.  If it has a non-zero width, we (correctly) honor that width.

Reduced testcase:

<!doctype html>
<table>
  <tr>
    <td>
      foo
      <div style="width:0px">
        <div class=block></div>
      </div>
    <td width=100%>wee!
</table>
<table>
  <tr>
    <td>
      foo
      <div style="width:1px">
        <div class=block></div>
      </div>
    <td width=100%>wee!
</table>
<style>
td { border: 1px solid gray; }
.block { width: 50px; height: 50px; background: gray; }
</style>

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list