Bug 240156

Summary: Make the various shouldApplyContainment() functions member functions on RenderElement
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, changseok, dino, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, jer.noble, jfernandez, kondapallykalyan, mifenton, mmaxfield, pdr, philipj, rbuis, rego, sabouhallawa, schenney, sergio, simon.fraser, svillar, webkit-bug-importer, youssefdevelops, y_soliman, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=240164
Attachments:
Description Flags
Patch none

Simon Fraser (smfr)
Reported 2022-05-05 22:08:38 PDT
Make the various shouldApplyContainment() functions member functions on RenderElement
Attachments
Patch (47.01 KB, patch)
2022-05-05 22:09 PDT, Simon Fraser (smfr)
no flags
Simon Fraser (smfr)
Comment 1 2022-05-05 22:09:57 PDT
alan
Comment 2 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.
Rob Buis
Comment 3 2022-05-06 09:02:02 PDT
IIRC somebody (Darin?) requested free functions during review, but I am fine with class methods.
Simon Fraser (smfr)
Comment 4 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 :)
EWS
Comment 5 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].
Radar WebKit Bug Importer
Comment 6 2022-05-06 10:12:13 PDT
Note You need to log in before you can comment on or make changes to this bug.