Bug 14846 - Layout is not updated when table padding is changed through JavaScript
Summary: Layout is not updated when table padding is changed through JavaScript
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tables (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-08-01 09:08 PDT by Brett Wilson (Google)
Modified: 2008-01-16 14:01 PST (History)
2 users (show)

See Also:


Attachments
Testcase (544 bytes, text/html)
2007-08-01 09:10 PDT, Brett Wilson (Google)
no flags Details
Make sure to mark cells for layout (14.09 KB, patch)
2008-01-16 13:29 PST, Dave Hyatt
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Wilson (Google) 2007-08-01 09:08:26 PDT
Setting cellPadding on a table in JavaScript has no effect. Cellspacing works.
Comment 1 Brett Wilson (Google) 2007-08-01 09:10:21 PDT
Created attachment 15778 [details]
Testcase

Pressing the cellpadding button which sets cellPadding="25" has no effect on the page.

Pressing the cellspacing button which sets cellSpacing="25" after setting the padding will then update both the padding and the spacing. It seems that setting the padding stores the value, but doesn't cause a layout update. The spacing will force a layout, and the table will look correct.
Comment 2 Eric Seidel (no email) 2008-01-11 15:30:56 PST
sounds like a missing renderer()->setNeedsLayout(true) call in parseMappedAttribute for the table code.
Comment 3 Dave Hyatt 2008-01-16 13:29:36 PST
Created attachment 18483 [details]
Make sure to mark cells for layout
Comment 4 Eric Seidel (no email) 2008-01-16 13:50:12 PST
Comment on attachment 18483 [details]
Make sure to mark cells for layout

I think the fix is great.  Personally I find the name RenderTable:setCellPadding to promote more of  (at least my) historical confusion as to whether it is correct to push attribute changes from the DOM to the Renderer (incorrect) or whether it's right to just mark renderers as needing layout and pull changes from the Renderers from the DOM (correct, and this change does that... in the cells).

Anyway.  Looks fine.
Comment 5 Dave Hyatt 2008-01-16 14:01:00 PST
Landed in r29539.