RESOLVED FIXED 180964
[RenderTreeBuilder] Move finding-the-parent/creating-wrapper logic from RenderTableRow::addChild to RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=180964
Summary [RenderTreeBuilder] Move finding-the-parent/creating-wrapper logic from Rende...
zalan
Reported 2017-12-18 20:06:30 PST
Move mutation under RenderTreeBuilder.
Attachments
Patch (21.00 KB, patch)
2017-12-18 20:13 PST, zalan
no flags
Patch (20.68 KB, patch)
2017-12-19 08:35 PST, zalan
no flags
Patch (21.26 KB, patch)
2017-12-19 10:23 PST, zalan
no flags
Radar WebKit Bug Importer
Comment 1 2017-12-18 20:08:15 PST
zalan
Comment 2 2017-12-18 20:13:35 PST
Antti Koivisto
Comment 3 2017-12-19 01:06:11 PST
Comment on attachment 329731 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=329731&action=review > Source/WebCore/rendering/RenderTableRow.cpp:-117 > void RenderTableRow::addChild(RenderTreeBuilder& builder, RenderPtr<RenderObject> child, RenderObject* beforeChild) > { > - if (!is<RenderTableCell>(*child)) { > - RenderObject* last = beforeChild; Why not move the entire addChild? > Source/WebCore/rendering/updating/RenderTreeBuilder.cpp:34 > +#include "RenderTableRowBuilder.h" I have been using file name pattern like RenderTreeBuilderTableRow.h/.cpp for inner classes like RenderTreeBuilder::TableRow. It makes easy to see what is really part of the RenderTreeBuilder.
Antti Koivisto
Comment 4 2017-12-19 01:54:34 PST
Also I think we could just have RenderTreeBuilder::Table for all table related code.
zalan
Comment 5 2017-12-19 08:35:33 PST
zalan
Comment 6 2017-12-19 08:39:43 PST
(In reply to Antti Koivisto from comment #3) > > - if (!is<RenderTableCell>(*child)) { > > - RenderObject* last = beforeChild; > > Why not move the entire addChild? splitAnonymousBoxesAroundChild() mutation is not table row specific and I am planning to cover that in a dedicated patch for all the different renderers. The rest of the addChild() is not about tree mutation and we need to figure out where to move them (styleChanged, childInserted, etc)
Antti Koivisto
Comment 7 2017-12-19 08:44:55 PST
Comment on attachment 329763 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=329763&action=review > Source/WebCore/rendering/updating/RenderTreeBuilderTable.cpp:35 > +RenderElement& RenderTreeBuilder::Table::findOrCreateParentForChild(RenderTreeBuilder& builder, RenderTableRow& parent, These could be member instances of RenderTreeBuilder similar to RenderTreeUpdater::GeneratedContent. That avoid having to pass the builder everywhere, just call m_builder.insertChild()
zalan
Comment 8 2017-12-19 10:23:29 PST
WebKit Commit Bot
Comment 9 2017-12-19 10:56:51 PST
Comment on attachment 329771 [details] Patch Clearing flags on attachment: 329771 Committed r226127: <https://trac.webkit.org/changeset/226127>
WebKit Commit Bot
Comment 10 2017-12-19 10:56:52 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.