Bug 115792 - Coalesce WKView visibleRect changes
Summary: Coalesce WKView visibleRect changes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-05-08 03:34 PDT by Tim Horton
Modified: 2013-05-08 13:02 PDT (History)
4 users (show)

See Also:


Attachments
patch (5.18 KB, patch)
2013-05-08 12:10 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2013-05-08 03:34:11 PDT
AppKit can fiddle with the visibleRect a *lot* and call renewGState a *lot* during autolayout. We need to wait until it's settled down to inform the WebProcess of the new visibleRect, especially because in some particular cases, waiting until autolayout is done means the visibleRect doesn't change *at all*, and we can skip tons and tons of work that we would previously have done.

<rdar://problem/13776842>
Comment 1 Tim Horton 2013-05-08 12:10:18 PDT
Created attachment 201091 [details]
patch
Comment 2 Simon Fraser (smfr) 2013-05-08 12:15:13 PDT
Comment on attachment 201091 [details]
patch

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

> Source/WebKit2/UIProcess/WebPageProxy.cpp:637
> +    if (m_sendViewExposedRectChangedTimer.isActive())
> +        m_sendViewExposedRectChangedTimer.stop();

Can't you unconditionally call stop?

> Source/WebKit2/UIProcess/WebPageProxy.h:1272
> +    WebCore::Timer<WebPageProxy> m_sendViewExposedRectChangedTimer;

Hard to parse this name. How about m_exposedRectChangedTimer?

> Source/WebKit2/UIProcess/WebPageProxy.h:1274
> +    WebCore::FloatRect m_lastSentViewExposedRect;

m_lastExposedRect?
Comment 3 Tim Horton 2013-05-08 13:02:10 PDT
http://trac.webkit.org/changeset/149761