Bug 181348 - [RenderTreeBuilder] Move RenderBlockFlow addChild logic to RenderTreeBuilder
Summary: [RenderTreeBuilder] Move RenderBlockFlow addChild logic to RenderTreeBuilder
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-05 14:57 PST by zalan
Modified: 2018-01-08 14:04 PST (History)
6 users (show)

See Also:


Attachments
Patch (15.01 KB, patch)
2018-01-05 15:01 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (16.56 KB, patch)
2018-01-08 11:42 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2018-01-05 14:57:40 PST
ssia
Comment 1 Radar WebKit Bug Importer 2018-01-05 14:58:46 PST
<rdar://problem/36328117>
Comment 2 zalan 2018-01-05 15:01:41 PST
Created attachment 330590 [details]
Patch
Comment 3 Antti Koivisto 2018-01-06 04:02:01 PST
Comment on attachment 330590 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=330590&action=review

> Source/WebCore/rendering/RenderBlockFlow.cpp:3835
>  void RenderBlockFlow::addChild(RenderTreeBuilder& builder, RenderPtr<RenderObject> newChild, RenderObject* beforeChild)
>  {
> -    if (multiColumnFlow() && (!isFieldset() || !newChild->isLegend()))
> -        return builder.insertChild(*multiColumnFlow(), WTFMove(newChild), beforeChild);
> -    auto* beforeChildOrPlaceholder = beforeChild;
> -    if (auto* containingFragmentedFlow = enclosingFragmentedFlow())
> -        beforeChildOrPlaceholder = containingFragmentedFlow->resolveMovedChild(beforeChild);
> -    RenderBlock::addChild(builder, WTFMove(newChild), beforeChildOrPlaceholder);
> +    builder.insertChildToRenderBlockFlow(*this, WTFMove(newChild), beforeChild);
>  }

Are there still some RenderBlockFlow subclasses with custom addChilds left? If not this could just move completely.

> Source/WebCore/rendering/updating/RenderTreeBuilderBlockFlow.h:32
> +class RenderTreeBuilder::BlockFlow {

Not sure how many of these we want. Could all Block stuff go to a single helper?
Comment 4 zalan 2018-01-08 11:42:06 PST
Created attachment 330716 [details]
Patch
Comment 5 WebKit Commit Bot 2018-01-08 14:04:05 PST
Comment on attachment 330716 [details]
Patch

Clearing flags on attachment: 330716

Committed r226537: <https://trac.webkit.org/changeset/226537>
Comment 6 WebKit Commit Bot 2018-01-08 14:04:07 PST
All reviewed patches have been landed.  Closing bug.