I'm not happy with this patch, or with the original code that was added here. Can we talk in #webkit on Monday about a better approach? I'm guessing you ended up here because you weren't quite sure how to patch layoutBlock, but RenderBox is way too general a spot for this kind of code (and this code is going to trigger relayouts of children in situations where it wasn't necessary to do so).
Comment on attachment 188941[details]
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=188941&action=review> Source/WebCore/rendering/RenderBlock.cpp:420
> + // First walk our normal flow objects and see if there is any change.
> + for (RenderBox* childBox = firstChildBox(); childBox; childBox = childBox->nextSiblingBox()) {
> + if (childBox->isFloatingOrOutOfFlowPositioned())
> + continue;
> + childBox->setChildNeedsLayout(true, MarkOnlyThis);
> + }
I would be good to mention why we don't have to set floating objects dirty per IRC discussion.
> Source/WebCore/rendering/RenderBlock.cpp:423
> + // Now walk the positioned objects for which we are the containing block.
> + TrackedRendererListHashSet* positionedDescendants = positionedObjects();
It would be great if you could come up with a test case for floating or position objects.
> Source/WebCore/rendering/RenderTableRow.cpp:89
> + if (!childBox->isTableCell())
> + continue;
On a completely unrelated note, it's weird that we can ever have a non-RenderTableCell RenderObject in RenderTableRow.
Created attachment 188954[details]
Patch with a positioning test case
I added a positioning test case that illustrates what was wrong with the RenderBox code and why you need RenderBlock-specific code to fix this bug the right way.
Comment on attachment 188954[details]
Patch with a positioning test case
View in context: https://bugs.webkit.org/attachment.cgi?id=188954&action=review> Source/WebCore/ChangeLog:27
> + Reviewed by NOBODY (OOPS!).
This line should appear before the long description but after the bug url.
> Source/WebCore/ChangeLog:30
> + Added fast/block/positioning/border-change-relayout-test.html to illustrate why the
> + old patch didn't work.
Please use the de-factor standard format:
Test: fast/block/positioning/border-change-relayout-test.html
(In reply to comment #18)
> I'm not happy with this patch, or with the original code that was added here. Can we talk in #webkit on Monday about a better approach? I'm guessing you ended up here because you weren't quite sure how to patch layoutBlock, but RenderBox is way too general a spot for this kind of code (and this code is going to trigger relayouts of children in situations where it wasn't necessary to do so).
Thanks for fixing! Sorry, I was OOO yesterday due to President's Day.
2013-02-12 17:33 PST, Tony Chang
2013-02-13 14:41 PST, Tony Chang
2013-02-15 10:58 PST, Tony Chang
2013-02-18 14:07 PST, Dave Hyatt
2013-02-18 14:10 PST, Dave Hyatt
webkit.review.bot: commit-queue-
2013-02-18 15:39 PST, Dave Hyatt