When setting the style.width or width properties on a <col> element via Javascript, the change is made to the inline CSS on the element but the change is not reflected on the page. Possibly a case of not doing a re-layout to reflect the style change.
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.
*** Bug 15140 has been marked as a duplicate of this bug. ***