[Cocoa] Report the first paint after committing a load as a rendering progress event
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 07:01:49 +0000 (07:01 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jul 2015 07:01:49 +0000 (07:01 +0000)
commit9bb47c92321abd828cbe5337425136bc74101121
tree2f2b74d43139dbe741fb518ae8212e53ae96d544
parentc626c6ecc3b5b6b79e1db7c156fe585d02362621
[Cocoa] Report the first paint after committing a load as a rendering progress event
https://bugs.webkit.org/show_bug.cgi?id=146765

Reviewed by Tim Horton.

* Shared/API/Cocoa/_WKRenderingProgressEvents.h: Added _WKRenderingProgressEventFirstPaint.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]): If this is the first layer tree commit since the load
was committed, and the delegate is observing _WKRenderingProgressEventFirstPaint, call
NavigationState::didFirstPaint.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::didFirstPaint): Added. Calls -_webView:renderingProgressDidChange:
with _WKRenderingProgressEventFirstPaint.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/API/Cocoa/_WKRenderingProgressEvents.h
Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
Source/WebKit2/UIProcess/Cocoa/NavigationState.h
Source/WebKit2/UIProcess/Cocoa/NavigationState.mm