REOPENED 266881
Early return in markContainingBlocksForLayout if selfNeedsLayout
https://bugs.webkit.org/show_bug.cgi?id=266881
Summary Early return in markContainingBlocksForLayout if selfNeedsLayout
Ahmad Saleem
Reported 2023-12-25 06:52:21 PST
Hi Team, While going through Blink's commit, I came across following potential optimization to early return. Blink Commit: https://chromium.googlesource.com/chromium/blink/+/13ea2da72bafa52c4797939de0a669df44e6dd8e WebKit Source: https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderObject.cpp#587 ^ Above this: This compiles: if (ancestor->selfNeedsLayout()) return; ___ Just wanted to raise to get input. Thanks!
Attachments
Radar WebKit Bug Importer
Comment 1 2024-01-01 06:53:16 PST
Ahmad Saleem
Comment 2 2024-06-08 05:49:51 PDT
if (ancestor->selfNeedsLayout()) return { }; ^ This compiles, the function is not void.
zalan
Comment 3 2024-06-08 05:56:18 PDT
all set*NeedsLayout functions check already for their bits and early return (also this change would just make the code more confusing as it is about marking the _containing_ block chain (and not self))
zalan
Comment 4 2024-06-08 05:59:18 PDT
misread the change. let me look again.
zalan
Comment 5 2024-06-08 09:34:59 PDT
I would argue this is not very intuitive and it would save us one containing block hop at most.
Note You need to log in before you can comment on or make changes to this bug.