Bug 254675

Summary: [Margin-trim] Remove a virtual function call on this rare property while computing margins
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, jfernandez, kondapallykalyan, pdr, rego, simon.fraser, svillar, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
[fast-cq]Patch none

Description zalan 2023-03-29 11:12:06 PDT
ssia
Comment 1 zalan 2023-03-29 11:17:23 PDT
Created attachment 465665 [details]
Patch
Comment 2 Chris Dumez 2023-03-29 11:36:32 PDT
Comment on attachment 465665 [details]
Patch

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

> Source/WebCore/rendering/RenderBox.cpp:3796
> +bool RenderBox::shouldTrimChildMargin(MarginTrimType marginTrimType, const RenderBox& child) const

Would be nice to make this inline.
Comment 3 zalan 2023-03-29 11:43:08 PDT
Created attachment 465666 [details]
Patch
Comment 4 zalan 2023-03-29 11:45:01 PDT
Created attachment 465667 [details]
Patch
Comment 5 zalan 2023-03-29 11:45:47 PDT
(In reply to Chris Dumez from comment #2)
> Comment on attachment 465665 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=465665&action=review
> 
> > Source/WebCore/rendering/RenderBox.cpp:3796
> > +bool RenderBox::shouldTrimChildMargin(MarginTrimType marginTrimType, const RenderBox& child) const
> 
> Would be nice to make this inline.
good point!
Comment 6 Chris Dumez 2023-03-29 12:08:21 PDT
Comment on attachment 465667 [details]
Patch

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

r=me

> Source/WebCore/rendering/RenderBox.h:313
> +    bool shouldTrimChildMargin(MarginTrimType, const RenderBox&) const;

This can likely be protected.
Comment 7 zalan 2023-03-29 12:56:28 PDT
Created attachment 465668 [details]
Patch
Comment 8 zalan 2023-03-30 19:56:30 PDT
Created attachment 465695 [details]
[fast-cq]Patch
Comment 9 EWS 2023-03-31 06:19:35 PDT
Committed 262399@main (dd0e3196e184): <https://commits.webkit.org/262399@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 465695 [details].
Comment 10 Radar WebKit Bug Importer 2023-03-31 06:20:17 PDT
<rdar://problem/107469302>