<?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>75798</bug_id>
          
          <creation_ts>2012-01-08 07:17:24 -0800</creation_ts>
          <short_desc>jQuery width() function messes up a table layout</short_desc>
          <delta_ts>2012-01-24 08:45:47 -0800</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>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>7180</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>romario333</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jchaffraix</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>531752</commentid>
    <comment_count>0</comment_count>
    <who name="">romario333</who>
    <bug_when>2012-01-08 07:17:24 -0800</bug_when>
    <thetext>When you try to get width of a table cell using jQuery library, you can sometimes mess up a table layout. Here is an example: http://jsfiddle.net/romario333/9bqhA/

I&apos;ve been able to reproduce this bug on Google Chrome 16, Safari 5.1.2 and WebKit nightly build r104398. IE 7-9 and Firefox 8 do not have this problem.

I&apos;ve created reduction of this bug (attached). This is sequence of steps leading to the problem (extracted from jQuery&apos;s code):

1) Set cell&apos;s display to &quot;block&quot;
2) Set cell&apos;s position to &quot;absolute&quot;.
3) Call elem.offsetWidth.
4) Set cell&apos;s display to &quot;table-cell&quot; and position to &quot;&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>531753</commentid>
    <comment_count>1</comment_count>
      <attachid>121579</attachid>
    <who name="">romario333</who>
    <bug_when>2012-01-08 07:18:09 -0800</bug_when>
    <thetext>Created attachment 121579
reduction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>541357</commentid>
    <comment_count>2</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-01-24 08:45:47 -0800</bug_when>
    <thetext>This bug has the same root cause as 7180. The idea is that we leave crufts in our RenderTree that confuses our layout algorithm. Merging those 2 issues together for fixing.

*** This bug has been marked as a duplicate of bug 7180 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>121579</attachid>
            <date>2012-01-08 07:18:09 -0800</date>
            <delta_ts>2012-01-08 07:18:09 -0800</delta_ts>
            <desc>reduction</desc>
            <filename>table-layout-bug.html</filename>
            <type>text/html</type>
            <size>698</size>
            <attacher>romario333</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgU3RyaWN0Ly9FTiIK
CSJodHRwOi8vd3d3LnczLm9yZy9UUi94aHRtbDEvRFREL3hodG1sMS1zdHJpY3QuZHRkIj4KPGh0
bWwgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGh0bWwiIHhtbDpsYW5nPSJlbiIgbGFu
Zz0iZW4iPgoKPGhlYWQ+Cgk8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgp0ZCB7CiAgICBiYWNrZ3Jv
dW5kLWNvbG9yOiBsaWdodGdyYXk7Cn0JCgk8L3N0eWxlPgo8Ym9keT4KCQpUaGlzIHRhYmxlIHNo
b3VsZCBoYXZlIGp1c3Qgb25lIGNvbHVtbjoKCjx0YWJsZSBzdHlsZT0id2lkdGg6IDEwMCU7Ij4K
ICAgIDx0cj4KICAgICAgICA8dGQ+eDwvdGQ+CiAgICA8L3RyPgogICAgPHRyPgogICAgICAgIDx0
ZCBpZD0nZml4bWUnPng8L3RkPgogICAgPC90cj4KPC90YWJsZT4JCgo8c2NyaXB0IHR5cGU9InRl
eHQvamF2YXNjcmlwdCI+Cgl2YXIgZWxlbSA9IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJmaXht
ZSIpOwoJZWxlbS5zdHlsZS5kaXNwbGF5ID0gImJsb2NrIjsKCWVsZW0uc3R5bGUucG9zaXRpb24g
PSAiYWJzb2x1dGUiOwoKCWVsZW0ub2Zmc2V0V2lkdGg7CgoJZWxlbS5zdHlsZS5kaXNwbGF5ID0g
InRhYmxlLWNlbGwiOwkKCWVsZW0uc3R5bGUucG9zaXRpb24gPSAiIjsKPC9zY3JpcHQ+CgkKPC9i
b2R5PgoKPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>