[webkit-reviews] review granted: [Bug 181348] [RenderTreeBuilder] Move RenderBlockFlow addChild logic to RenderTreeBuilder : [Attachment 330590] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 6 04:02:01 PST 2018


Antti Koivisto <koivisto at iki.fi> has granted zalan <zalan at apple.com>'s request
for review:
Bug 181348: [RenderTreeBuilder] Move RenderBlockFlow addChild logic to
RenderTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=181348

Attachment 330590: Patch

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




--- Comment #3 from Antti Koivisto <koivisto at iki.fi> ---
Comment on attachment 330590
  --> https://bugs.webkit.org/attachment.cgi?id=330590
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?


More information about the webkit-reviews mailing list