Bug 75798 - jQuery width() function messes up a table layout
Summary: jQuery width() function messes up a table layout
Status: RESOLVED DUPLICATE of bug 7180
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Keywords: HasReduction
Depends on:
Reported: 2012-01-08 07:17 PST by romario333
Modified: 2012-01-24 08:45 PST (History)
1 user (show)

See Also:

reduction (698 bytes, text/html)
2012-01-08 07:18 PST, romario333
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description romario333 2012-01-08 07:17:24 PST
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'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've created reduction of this bug (attached). This is sequence of steps leading to the problem (extracted from jQuery's code):

1) Set cell's display to "block"
2) Set cell's position to "absolute".
3) Call elem.offsetWidth.
4) Set cell's display to "table-cell" and position to "".
Comment 1 romario333 2012-01-08 07:18:09 PST
Created attachment 121579 [details]
Comment 2 Julien Chaffraix 2012-01-24 08:45:47 PST
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 ***