RESOLVED FIXED 121771
Remove RenderObjectChildList
https://bugs.webkit.org/show_bug.cgi?id=121771
Summary Remove RenderObjectChildList
Antti Koivisto
Reported 2013-09-22 18:03:38 PDT
Most popular RenderElement subclasses have m_children member (>90% of instances on typical page). Child handling should move to RenderElement. This will remove need for virtual children() calls and simplify the code.
Attachments
patch (78.41 KB, patch)
2013-09-22 18:19 PDT, Antti Koivisto
webkit-ews: commit-queue-
another (78.55 KB, patch)
2013-09-22 18:31 PDT, Antti Koivisto
webkit-ews: commit-queue-
Antti Koivisto
Comment 1 2013-09-22 18:19:12 PDT
Andreas Kling
Comment 2 2013-09-22 18:23:27 PDT
Comment on attachment 212313 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=212313&action=review > Source/WebCore/rendering/RenderBlock.cpp:610 > - toBlock->children()->appendChildNode(toBlock, cloneBlock); > + insertChildInternal(cloneBlock, nullptr, NotifyChildren); This looks wrong.
Early Warning System Bot
Comment 3 2013-09-22 18:27:05 PDT
Early Warning System Bot
Comment 4 2013-09-22 18:28:09 PDT
Antti Koivisto
Comment 5 2013-09-22 18:31:19 PDT
Early Warning System Bot
Comment 6 2013-09-22 18:41:15 PDT
Early Warning System Bot
Comment 7 2013-09-22 18:44:30 PDT
Darin Adler
Comment 8 2013-09-22 18:57:34 PDT
Comment on attachment 212315 [details] another View in context: https://bugs.webkit.org/attachment.cgi?id=212315&action=review > Source/WebCore/rendering/RenderObject.h:267 > + friend RenderElement; This is the wrong syntax. Should be friend class RenderElement. Also, should go at the top of the class with the other friends. But it's really annoying that this friendship needs to exist.
Darin Adler
Comment 9 2013-09-22 18:58:55 PDT
Comment on attachment 212315 [details] another View in context: https://bugs.webkit.org/attachment.cgi?id=212315&action=review > Source/WebCore/rendering/RenderElement.h:59 > + enum NotifyChildrenType { NotifyChildren, DontNotifyChildren }; > + void insertChildInternal(RenderObject*, RenderObject* beforeChild, NotifyChildrenType); > + void removeChildInternal(RenderObject*, NotifyChildrenType); Why public instead of protected? > Source/WebCore/rendering/RenderObject.cpp:1668 > + block->insertChildInternal(this, 0, RenderElement::NotifyChildren); nullptr
Antti Koivisto
Comment 10 2013-09-22 19:33:21 PDT
(In reply to comment #9) > Why public instead of protected? There are several cases where these are called via pointers that are of different type than the class of the current function.
Antti Koivisto
Comment 11 2013-09-22 19:34:51 PDT
WebKit Commit Bot
Comment 12 2013-09-22 23:28:09 PDT
Re-opened since this is blocked by bug 121779
Alexey Proskuryakov
Comment 13 2013-09-22 23:31:41 PDT
This caused assertion failures in two fast/regions tests: <http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK1%20(Tests)/r156257%20(10332)/fast/regions/region-dynamic-after-before-crash-log.txt>, <http://build.webkit.org/results/Apple%20MountainLion%20Debug%20WK1%20(Tests)/r156257%20(10332)/fast/regions/region-generated-content-before-after-crash-log.txt>. Antti is not available at at the moment, and there are two more regressions in the tree. Fixing everything is not an option for me, rolling out.
Alexey Proskuryakov
Comment 14 2013-09-22 23:35:26 PDT
Antti Koivisto
Comment 15 2013-09-23 10:42:34 PDT
Re-landed in https://trac.webkit.org/r156278 with an assertion fix.
Note You need to log in before you can comment on or make changes to this bug.