Bug 121771 - Remove RenderObjectChildList
Summary: Remove RenderObjectChildList
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 121779
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-22 18:03 PDT by Antti Koivisto
Modified: 2013-09-23 10:42 PDT (History)
17 users (show)

See Also:


Attachments
patch (78.41 KB, patch)
2013-09-22 18:19 PDT, Antti Koivisto
webkit-ews: commit-queue-
Details | Formatted Diff | Diff
another (78.55 KB, patch)
2013-09-22 18:31 PDT, Antti Koivisto
webkit-ews: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 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.
Comment 1 Antti Koivisto 2013-09-22 18:19:12 PDT
Created attachment 212313 [details]
patch
Comment 2 Andreas Kling 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.
Comment 3 Early Warning System Bot 2013-09-22 18:27:05 PDT
Comment on attachment 212313 [details]
patch

Attachment 212313 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/1933079
Comment 4 Early Warning System Bot 2013-09-22 18:28:09 PDT
Comment on attachment 212313 [details]
patch

Attachment 212313 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/1834762
Comment 5 Antti Koivisto 2013-09-22 18:31:19 PDT
Created attachment 212315 [details]
another
Comment 6 Early Warning System Bot 2013-09-22 18:41:15 PDT
Comment on attachment 212315 [details]
another

Attachment 212315 [details] did not pass qt-ews (qt):
Output: http://webkit-queues.appspot.com/results/1873388
Comment 7 Early Warning System Bot 2013-09-22 18:44:30 PDT
Comment on attachment 212315 [details]
another

Attachment 212315 [details] did not pass qt-wk2-ews (qt-wk2):
Output: http://webkit-queues.appspot.com/results/1979042
Comment 8 Darin Adler 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.
Comment 9 Darin Adler 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
Comment 10 Antti Koivisto 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.
Comment 11 Antti Koivisto 2013-09-22 19:34:51 PDT
https://trac.webkit.org/r156254
Comment 12 WebKit Commit Bot 2013-09-22 23:28:09 PDT
Re-opened since this is blocked by bug 121779
Comment 13 Alexey Proskuryakov 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.
Comment 14 Alexey Proskuryakov 2013-09-22 23:35:26 PDT
Comment on attachment 212315 [details]
another

Rolled out in <http://trac.webkit.org/changeset/156262>.
Comment 15 Antti Koivisto 2013-09-23 10:42:34 PDT
Re-landed in https://trac.webkit.org/r156278 with an assertion fix.