Bug 265027 - Avoid unnecessary extra calls to RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats()
Summary: Avoid unnecessary extra calls to RenderBlockFlow::rebuildFloatingObjectSetFr...
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: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-11-17 06:31 PST by Ahmad Saleem
Modified: 2024-06-04 06:24 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-11-17 06:31:51 PST
Hi Team,

While going through Blink's commit, I came across potential performance win (might be little but still avoiding extra calls in good).

Blink Commit: https://chromium.googlesource.com/chromium/blink/+/5fd36573c98e79b31d6245d15772e4d0d4eefc8d

WebKit Source: https://searchfox.org/wubkat/rev/114aa2c8594807cbc34dd5dff48a9e2addfd1e00/Source/WebCore/rendering/RenderBlockFlow.cpp#244

___

This compiles (might be wrong or correct - just want to get input):

 bool parentHasIntrudingFloats = !parentHasFloats && (!previousBlock  || (previousBlock->isSelfCollapsingBlock() && parentBlock.lowestFloatLogicalBottom() > logicalTopOffset));
    if (parentHasFloats || parentHasIntrudingFloats)
        addIntrudingFloats(&parentBlock, &parentBlock, parentBlock.logicalLeftOffsetForContent(), logicalTopOffset);
    // Add overhanging floats from the previous RenderBlock, but only if it has a float that intrudes into our space.
    if (previousBlock) {
        logicalTopOffset -= previousBlock->logicalTop();
        if (previousBlock->lowestFloatLogicalBottom() > logicalTopOffset)
            addIntrudingFloats(previousBlock, &parentBlock, 0, logicalTopOffset);
    }

..

___

Just wanted to raise so if needed, we can fix it.

Thanks!
Comment 1 Radar WebKit Bug Importer 2023-11-17 07:24:25 PST
<rdar://problem/118564239>
Comment 2 EWS 2024-06-04 06:24:00 PDT
Committed 279695@main (74e329b07b3e): <https://commits.webkit.org/279695@main>

Reviewed commits have been landed. Closing PR #29455 and removing active labels.