Bug 125282

Summary: Fire resize events with requestAnimationFrame timing
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: UI EventsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, kling, koivisto, simon.fraser, syoichi, tonikitoo
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Ryosuke Niwa
Reported 2013-12-04 23:31:07 PST
Consider merging https://chromium.googlesource.com/chromium/blink/+/06d7a82b8c341d928f65799d106d4443aca0fd72 Instead of spamming resize events when there are repeated layouts that cause iframes to resize we can delay the event until raf timing so that we only need to fire at most one per 16ms. This should reduce the number of resize events dramatically on a page that is causing synchronous layouts in JS that are making iframes change size.
Attachments
Simon Fraser (smfr)
Comment 1 2013-12-05 08:52:25 PST
Sounds good in theory, but I'm not sure we want to overhead of a CVDisplayLink (which drives rAF) just to fire resize events?
Antti Koivisto
Comment 2 2013-12-05 11:17:05 PST
Yeah, seems like a good idea.
Simon Fraser (smfr)
Comment 3 2020-07-27 20:24:45 PDT
We fire resize events from runResizeSteps() via Page::updateRendering() now.
Note You need to log in before you can comment on or make changes to this bug.