Add DidFirstMeaningfulPaint milestone.
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 22:54:21 +0000 (22:54 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 22:54:21 +0000 (22:54 +0000)
commit249eaebb71dfb495340768e2a3c345fa766f4ec7
tree325408f81acf2bef8594fe1d94a632ecf8ebe102
parent7b616ad723f1a46602af650d58ec8e51bc985447
Add DidFirstMeaningfulPaint milestone.
https://bugs.webkit.org/show_bug.cgi?id=191754

Reviewed by Simon Fraser.

Source/WebCore:

This milestone fires sone after the paint triggered by the first visually non-empty layout.

* page/FrameView.cpp:
(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
(WebCore::FrameView::firePaintRelatedMilestonesIfNeeded):
* page/LayoutMilestone.h:

Source/WebKit:

* Shared/API/c/WKPageLoadTypes.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toWKLayoutMilestones):
(WebKit::toLayoutMilestones):
* UIProcess/API/C/WKPageRenderingProgressEvents.h:
* UIProcess/API/C/WKPageRenderingProgressEventsInternal.h:
(pageRenderingProgressEvents):

Tools:

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp: Added.
(TestWebKitAPI::didReachMilestone):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp: Copied from Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEvents.h.
(TestWebKitAPI::FirstMeaningfulPaintMilestoneTest::FirstMeaningfulPaintMilestoneTest):
(TestWebKitAPI::FirstMeaningfulPaintMilestoneTest::didCreatePage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/LayoutMilestone.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/API/Cocoa/_WKRenderingProgressEvents.h
Source/WebKit/Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h
Source/WebKit/Shared/API/c/WKPageLoadTypes.h
Source/WebKit/Shared/API/c/WKSharedAPICast.h
Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEvents.h
Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEventsInternal.h
Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
Tools/ChangeLog
Tools/TestWebKitAPI/CMakeLists.txt
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp [new file with mode: 0644]
Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp [new file with mode: 0644]