Bug 184994 - [LFC] Implement Layout::BlockContainer functions.
Summary: [LFC] Implement Layout::BlockContainer functions.
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-25 13:18 PDT by zalan
Modified: 2018-04-25 13:36 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.90 KB, patch)
2018-04-25 13:22 PDT, zalan
koivisto: review+
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-25 13:18:22 PDT
ssia
Comment 1 zalan 2018-04-25 13:22:48 PDT
Created attachment 338778 [details]
Patch
Comment 2 Antti Koivisto 2018-04-25 13:30:31 PDT
Comment on attachment 338778 [details]
Patch

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

> Source/WebCore/layout/layouttree/LayoutBlockContainer.cpp:53
> +bool BlockContainer::establishesInlineFormattingContext() const
> +{
> +    // 9.4.2 Inline formatting contexts
> +    // An inline formatting context is established by a block container box that contains no block-level boxes.
> +    for (auto* child = firstInFlowChild(); child; child = child->nextInFlowSibling()) {
> +        if (child->isBlockLevelBox())
> +            return false;
> +    }
> +    return hasInFlowOrFloatingChild();
> +}

We'll probably need some sort of caching scheme for things like this. The result only changes on tree mutation after all.
Comment 3 zalan 2018-04-25 13:35:48 PDT
Committed r231017: <https://trac.webkit.org/changeset/231017>
Comment 4 Radar WebKit Bug Importer 2018-04-25 13:36:22 PDT
<rdar://problem/39732558>