Various table-related methods muck with the RenderStyle passed into setStyle(). This is evil because i) that style would be better treated as read-only, and ii) if someone does a Diff earlier on, their diff gets invalidated.
Created attachment 23997 [details] Patch, test cases, changelog
Created attachment 23998 [details] Phase 2 patch
Comment on attachment 23997 [details] Patch, test cases, changelog I don't think we should keep RenderTableSection::setStyle around just to do the assertion. + if (e && (e->hasTagName(tdTag) || e->hasTagName(thTag))) { This new code doesn't affect cases where CSS is used to turn an element into a table cell. But the old code did. Is that OK?
Comment on attachment 23998 [details] Phase 2 patch r=me
M WebCore/rendering/RenderTableCell.cpp M WebCore/rendering/RenderTableSection.h M WebCore/rendering/RenderTableRow.cpp M WebCore/rendering/RenderTableSection.cpp M WebCore/ChangeLog M WebCore/css/CSSStyleSelector.cpp M LayoutTests/ChangeLog r37219 = 50e860fa4eefcdaf704355791610209ee4c3fdaa (trunk) Committed r37220 M WebCore/rendering/RenderBlock.cpp M WebCore/rendering/RenderFileUploadControl.cpp M WebCore/rendering/RenderMenuList.cpp M WebCore/ChangeLog M WebCore/css/CSSStyleSelector.cpp M WebCore/css/html4.css r37220 = 397ffb035ab969a213d69588ea8afcd7e7a3278a (trunk)
Reopen to take (sorry for noise)
Missed the tests first time around: Committed r37250 A LayoutTests/platform/mac/fast/table/table-display-types-expected.txt A LayoutTests/platform/mac/fast/table/floating-th-expected.txt A LayoutTests/platform/mac/fast/table/table-display-types-strict-expected.txt M LayoutTests/ChangeLog A LayoutTests/fast/table/table-display-types-strict.html A LayoutTests/fast/table/table-display-types.html A LayoutTests/fast/table/floating-th.html r37250 = 2473355e15e82022c30a6e765d4e1d7c29e1218e (trunk)
Comment on attachment 23997 [details] Patch, test cases, changelog Patch was landed.
Bug 21348 adds a testcase for the behavior change noted in comment 3