Bug 265027
| Summary: | Avoid unnecessary extra calls to RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | bfulgham, koivisto, sgill26, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
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!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/118564239>
EWS
Committed 279695@main (74e329b07b3e): <https://commits.webkit.org/279695@main>
Reviewed commits have been landed. Closing PR #29455 and removing active labels.