Summary: | <col> elements width can't be changed with javascript | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jessie Berlin <jberlin> | ||||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bdakin, bobbrose | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | All | ||||||||||
Attachments: |
|
Description
Jessie Berlin
2009-06-18 15:42:45 PDT
Created attachment 31514 [details]
Tries to change the col width using both style.width and style
A work-around for the test case seems to be that you can reset the width of one the the table cells and all of the cells in that column will resize correctly to that size. This should still work for <col> though obviously, so I am still looking into that. Actually, it looks like forcing a layout will not fix this. The problem is that setPrefWidthsDirty() is not being called. I am going to try to figure out where that should be set. Created attachment 31689 [details]
Patch
Here is a patch that dirties the pref widths of the table whenever an HTMLColElement's width attribute is changed. This patch is not the best ever, because it means that col.style.width is still broken.
Created attachment 31754 [details]
Bigger, better, stronger patch
Here's a new patch that takes some Hyatt-irc-feedback into account. This one is way better too because it fixed the bug for both col.width and col.style.width!
Comment on attachment 31754 [details]
Bigger, better, stronger patch
Make table() private on RenderTableCol.
r=me
Made the table() function private, and committed this with revision 45015. |