Bug 240156 - Make the various shouldApplyContainment() functions member functions on RenderElement
Summary: Make the various shouldApplyContainment() functions member functions on Rende...
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: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-05 22:08 PDT by Simon Fraser (smfr)
Modified: 2022-05-06 10:12 PDT (History)
29 users (show)

See Also:


Attachments
Patch (47.01 KB, patch)
2022-05-05 22:09 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2022-05-05 22:08:38 PDT
Make the various shouldApplyContainment() functions member functions on RenderElement
Comment 1 Simon Fraser (smfr) 2022-05-05 22:09:57 PDT
Created attachment 458932 [details]
Patch
Comment 2 zalan 2022-05-06 09:00:33 PDT
Comment on attachment 458932 [details]
Patch

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

> Source/WebCore/rendering/RenderElement.h:505
> +inline bool RenderElement::shouldApplyLayoutContainment() const
> +{
> +    return style().containsLayout() && (!isInline() || isAtomicInlineLevelBox()) && !isRubyText() && (!isTablePart() || isRenderBlockFlow());
> +}

at some point these could all be moved to RenderBlock (or maybe even RenderBlockFlow) since the current render tree has this built-in type information. super not important -and also LFC tree does not work like that either.
Comment 3 Rob Buis 2022-05-06 09:02:02 PDT
IIRC somebody (Darin?) requested free functions during review, but I am fine with class methods.
Comment 4 Simon Fraser (smfr) 2022-05-06 09:44:31 PDT
(In reply to Rob Buis from comment #3)
> IIRC somebody (Darin?) requested free functions during review, but I am fine
> with class methods.

I think it was me, but seeing how all the callers pass *this, I changed my mind :)
Comment 5 EWS 2022-05-06 10:11:50 PDT
Committed r293900 (250358@main): <https://commits.webkit.org/250358@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458932 [details].
Comment 6 Radar WebKit Bug Importer 2022-05-06 10:12:13 PDT
<rdar://problem/92867194>