Bug 185108 - [LFC] Add LayoutTreeBuilder class to generate the layout tree
Summary: [LFC] Add LayoutTreeBuilder class to generate the layout tree
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-04-27 21:57 PDT by zalan
Modified: 2018-04-28 16:14 PDT (History)
6 users (show)

See Also:


Attachments
Patch (22.08 KB, patch)
2018-04-27 22:07 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (20.87 KB, patch)
2018-04-28 14:05 PDT, 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-04-27 21:57:14 PDT
This is temporary though.
Comment 1 zalan 2018-04-27 22:07:46 PDT
Created attachment 339060 [details]
Patch
Comment 2 Antti Koivisto 2018-04-28 05:41:34 PDT
Comment on attachment 339060 [details]
Patch

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

> Source/WebCore/WebCore.xcodeproj/project.pbxproj:31030
> -			name = libPAL.a;
> -			path = lib.a;
> +			path = libPAL.a;

wut

> Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:49
> +    std::unique_ptr<Container> initialContainingBlock(new BlockContainer(RenderStyle::clone(renderView.style())));

auto initialContainingBlock = std::make_unique<BlockContainer>(RenderStyle::clone(renderView.style())); 

perhaps?

> Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:50
> +    TreeBuilder::createSubTree(renderView, *initialContainingBlock);

no need fo "TreeBuilder::"
Comment 3 zalan 2018-04-28 14:05:04 PDT
Created attachment 339076 [details]
Patch
Comment 4 zalan 2018-04-28 14:08:22 PDT
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 339060 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=339060&action=review
> 
> > Source/WebCore/WebCore.xcodeproj/project.pbxproj:31030
> > -			name = libPAL.a;
> > -			path = lib.a;
> > +			path = libPAL.a;
> 
> wut
Yeah, no idea. I tried adding the files a couple of times in a clean workspace and I always ended up with that change too.

> 
> > Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:49
> > +    std::unique_ptr<Container> initialContainingBlock(new BlockContainer(RenderStyle::clone(renderView.style())));
> 
> auto initialContainingBlock =
> std::make_unique<BlockContainer>(RenderStyle::clone(renderView.style())); 
> 
> perhaps?
That's exactly what I did first but that I realized that I need to friend make_unique in addition to TreeBuilder -and I'd rather friend TreeBuilder only.


> > Source/WebCore/layout/layouttree/LayoutTreeBuilder.cpp:50
> > +    TreeBuilder::createSubTree(renderView, *initialContainingBlock);
> 
> no need fo "TreeBuilder::"
Indeed! I originally had this in a different place.
Comment 5 WebKit Commit Bot 2018-04-28 16:13:09 PDT
Comment on attachment 339076 [details]
Patch

Clearing flags on attachment: 339076

Committed r231141: <https://trac.webkit.org/changeset/231141>
Comment 6 WebKit Commit Bot 2018-04-28 16:13:11 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-04-28 16:14:21 PDT
<rdar://problem/39820229>