Diff
Modified: trunk/Source/WebCore/ChangeLog (238305 => 238306)
--- trunk/Source/WebCore/ChangeLog 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebCore/ChangeLog 2018-11-16 22:54:21 UTC (rev 238306)
@@ -1,3 +1,17 @@
+2018-11-16 Zalan Bujtas <[email protected]>
+
+ Add DidFirstMeaningfulPaint milestone.
+ https://bugs.webkit.org/show_bug.cgi?id=191754
+
+ Reviewed by Simon Fraser.
+
+ 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:
+
2018-11-16 Don Olmstead <[email protected]>
Provide default implementations of Image and Icon
Modified: trunk/Source/WebCore/page/FrameView.cpp (238305 => 238306)
--- trunk/Source/WebCore/page/FrameView.cpp 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebCore/page/FrameView.cpp 2018-11-16 22:54:21 UTC (rev 238306)
@@ -5173,6 +5173,8 @@
// If the layout was done with pending sheets, we are not in fact visually non-empty yet.
if (m_isVisuallyNonEmpty && m_firstVisuallyNonEmptyLayoutCallbackPending) {
m_firstVisuallyNonEmptyLayoutCallbackPending = false;
+ addPaintPendingMilestones(DidFirstMeaningfulPaint);
+
if (requestedMilestones & DidFirstVisuallyNonEmptyLayout)
milestonesAchieved.add(DidFirstVisuallyNonEmptyLayout);
}
@@ -5206,6 +5208,11 @@
milestonesAchieved.add(DidFirstPaintAfterSuppressedIncrementalRendering);
}
+ if (m_milestonesPendingPaint & DidFirstMeaningfulPaint) {
+ if (page->requestedLayoutMilestones() & DidFirstMeaningfulPaint)
+ milestonesAchieved.add(DidFirstMeaningfulPaint);
+ }
+
m_milestonesPendingPaint = { };
if (milestonesAchieved)
Modified: trunk/Source/WebCore/page/LayoutMilestone.h (238305 => 238306)
--- trunk/Source/WebCore/page/LayoutMilestone.h 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebCore/page/LayoutMilestone.h 2018-11-16 22:54:21 UTC (rev 238306)
@@ -41,6 +41,7 @@
DidFirstPaintAfterSuppressedIncrementalRendering = 1 << 5,
ReachedSessionRestorationRenderTreeSizeThreshold = 1 << 6, // FIXME: only implemented by WK2 currently.
DidRenderSignificantAmountOfText = 1 << 7,
+ DidFirstMeaningfulPaint = 1 << 8,
};
} // namespace WebCore
Modified: trunk/Source/WebKit/ChangeLog (238305 => 238306)
--- trunk/Source/WebKit/ChangeLog 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebKit/ChangeLog 2018-11-16 22:54:21 UTC (rev 238306)
@@ -1,3 +1,18 @@
+2018-11-16 Zalan Bujtas <[email protected]>
+
+ Add DidFirstMeaningfulPaint milestone.
+ https://bugs.webkit.org/show_bug.cgi?id=191754
+
+ Reviewed by Simon Fraser.
+
+ * 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):
+
2018-11-16 Chris Dumez <[email protected]>
Automatic process prewarming should be turned on if PSON is enabled via experimental features
Modified: trunk/Source/WebKit/Shared/API/Cocoa/_WKRenderingProgressEvents.h (238305 => 238306)
--- trunk/Source/WebKit/Shared/API/Cocoa/_WKRenderingProgressEvents.h 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebKit/Shared/API/Cocoa/_WKRenderingProgressEvents.h 2018-11-16 22:54:21 UTC (rev 238306)
@@ -36,6 +36,7 @@
_WKRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering WK_API_AVAILABLE(macosx(10.11), ios(9.0)) = 1 << 5,
_WKRenderingProgressEventFirstPaint WK_API_AVAILABLE(macosx(10.11), ios(9.0)) = 1 << 6,
_WKRenderingProgressEventDidRenderSignificantAmountOfText WK_API_AVAILABLE(macosx(10.14), ios(12.0)) = 1 << 7,
+ _WKRenderingProgressEventFirstMeaningfulPaint WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)) = 1 << 8,
} WK_API_AVAILABLE(macosx(10.10), ios(8.0));
#endif
Modified: trunk/Source/WebKit/Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h (238305 => 238306)
--- trunk/Source/WebKit/Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebKit/Shared/API/Cocoa/_WKRenderingProgressEventsInternal.h 2018-11-16 22:54:21 UTC (rev 238306)
@@ -54,6 +54,9 @@
if (milestones & WebCore::DidRenderSignificantAmountOfText)
events |= _WKRenderingProgressEventDidRenderSignificantAmountOfText;
+ if (milestones & WebCore::DidFirstMeaningfulPaint)
+ events |= _WKRenderingProgressEventFirstMeaningfulPaint;
+
return events;
}
Modified: trunk/Source/WebKit/Shared/API/c/WKPageLoadTypes.h (238305 => 238306)
--- trunk/Source/WebKit/Shared/API/c/WKPageLoadTypes.h 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebKit/Shared/API/c/WKPageLoadTypes.h 2018-11-16 22:54:21 UTC (rev 238306)
@@ -57,7 +57,8 @@
kWKReserved = 1 << 3, // Note that the fourth member of this enum is actually private and defined in WKPageLoadTypesPrivate.h
kWKDidFirstLayoutAfterSuppressedIncrementalRendering = 1 << 4,
kWKDidFirstPaintAfterSuppressedIncrementalRendering = 1 << 5,
- kWKDidRenderSignificantAmountOfText = 1 << 7
+ kWKDidRenderSignificantAmountOfText = 1 << 7,
+ kWKDidFirstMeaningfulPaint = 1 << 8
};
typedef uint32_t WKLayoutMilestones;
Modified: trunk/Source/WebKit/Shared/API/c/WKSharedAPICast.h (238305 => 238306)
--- trunk/Source/WebKit/Shared/API/c/WKSharedAPICast.h 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebKit/Shared/API/c/WKSharedAPICast.h 2018-11-16 22:54:21 UTC (rev 238306)
@@ -877,7 +877,9 @@
wkMilestones |= kWKDidFirstPaintAfterSuppressedIncrementalRendering;
if (milestones & WebCore::DidRenderSignificantAmountOfText)
wkMilestones |= kWKDidRenderSignificantAmountOfText;
-
+ if (milestones & WebCore::DidFirstMeaningfulPaint)
+ wkMilestones |= kWKDidFirstMeaningfulPaint;
+
return wkMilestones;
}
@@ -899,6 +901,8 @@
milestones.add(WebCore::DidFirstPaintAfterSuppressedIncrementalRendering);
if (wkMilestones & kWKDidRenderSignificantAmountOfText)
milestones.add(WebCore::DidRenderSignificantAmountOfText);
+ if (wkMilestones & kWKDidFirstMeaningfulPaint)
+ milestones.add(WebCore::DidFirstMeaningfulPaint);
return milestones;
}
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEvents.h (238305 => 238306)
--- trunk/Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEvents.h 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEvents.h 2018-11-16 22:54:21 UTC (rev 238306)
@@ -39,6 +39,7 @@
WKPageRenderingProgressEventReachedSessionRestorationRenderTreeSizeThreshold = 1 << 3,
WKPageRenderingProgressEventFirstLayoutAfterSuppressedIncrementalRendering = 1 << 4,
WKPageRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering = 1 << 5,
+ WKPageRenderingProgressEventFirstMeaningfulPaint = 1 << 8
};
typedef uint32_t WKPageRenderingProgressEvents;
Modified: trunk/Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEventsInternal.h (238305 => 238306)
--- trunk/Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEventsInternal.h 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEventsInternal.h 2018-11-16 22:54:21 UTC (rev 238306)
@@ -49,5 +49,8 @@
if (milestones & WebCore::DidFirstPaintAfterSuppressedIncrementalRendering)
events |= WKPageRenderingProgressEventFirstPaintAfterSuppressedIncrementalRendering;
+ if (milestones & WebCore::DidFirstMeaningfulPaint)
+ events |= WKPageRenderingProgressEventFirstMeaningfulPaint;
+
return events;
}
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (238305 => 238306)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2018-11-16 22:54:21 UTC (rev 238306)
@@ -4842,6 +4842,9 @@
if (events & _WKRenderingProgressEventDidRenderSignificantAmountOfText)
milestones.add(WebCore::DidRenderSignificantAmountOfText);
+ if (events & _WKRenderingProgressEventFirstMeaningfulPaint)
+ milestones.add(WebCore::DidFirstMeaningfulPaint);
+
return milestones;
}
Modified: trunk/Tools/ChangeLog (238305 => 238306)
--- trunk/Tools/ChangeLog 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Tools/ChangeLog 2018-11-16 22:54:21 UTC (rev 238306)
@@ -1,3 +1,20 @@
+2018-11-16 Zalan Bujtas <[email protected]>
+
+ Add DidFirstMeaningfulPaint milestone.
+ https://bugs.webkit.org/show_bug.cgi?id=191754
+
+ Reviewed by Simon Fraser.
+
+ * 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):
+
2018-11-16 Takashi Komori <[email protected]>
[WinCairo][WebKitTestRunner] Test contents window is displayed while testing.
Modified: trunk/Tools/TestWebKitAPI/CMakeLists.txt (238305 => 238306)
--- trunk/Tools/TestWebKitAPI/CMakeLists.txt 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Tools/TestWebKitAPI/CMakeLists.txt 2018-11-16 22:54:21 UTC (rev 238306)
@@ -45,6 +45,7 @@
${TESTWEBKITAPI_DIR}/Tests/WebKit/EvaluateJavaScript.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/FailedLoad.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/Find.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/ForceRepaint.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/FrameMIMETypeHTML.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/FrameMIMETypePNG.cpp
@@ -230,6 +231,7 @@
${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/NewFirstVisuallyNonEmptyLayout_Bundle.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/ParentFrame_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/ProvisionalURLAfterWillSendRequestCallback_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit/ResponsivenessTimerDoesntFireEarly_Bundle.cpp
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (238305 => 238306)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2018-11-16 22:45:13 UTC (rev 238305)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2018-11-16 22:54:21 UTC (rev 238306)
@@ -48,6 +48,8 @@
0F5651F71FCE4DDC00310FBC /* NoHistoryItemScrollToFragment.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F5651F61FCE4DDB00310FBC /* NoHistoryItemScrollToFragment.mm */; };
0F5651F91FCE513500310FBC /* scroll-to-anchor.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 0F5651F81FCE50E800310FBC /* scroll-to-anchor.html */; };
115EB3431EE0BA03003C2C0A /* ViewportSizeForViewportUnits.mm in Sources */ = {isa = PBXBuildFile; fileRef = 115EB3421EE0B720003C2C0A /* ViewportSizeForViewportUnits.mm */; };
+ 1171B24F219F49CD00CB897D /* FirstMeaningfulPaintMilestone_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 11B7FD21219F46DD0069B27F /* FirstMeaningfulPaintMilestone_Bundle.cpp */; };
+ 11B7FD28219F47110069B27F /* FirstMeaningfulPaintMilestone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 11B7FD22219F46DD0069B27F /* FirstMeaningfulPaintMilestone.cpp */; };
143DDE9820C9018B007F76FA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 574F55D0204D471C002948C6 /* Security.framework */; };
1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; };
1A3524AE1D63A4FB0031729B /* Scope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3524AC1D63A4FB0031729B /* Scope.cpp */; };
@@ -495,7 +497,6 @@
7CCE7EDB1A411A9200447C4C /* CSSParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5451E919E41F9D0016936F /* CSSParser.cpp */; };
7CCE7EDC1A411A9200447C4C /* CalculationValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93A720E518F1A0E800A848E1 /* CalculationValue.cpp */; };
7CCE7EDD1A411A9200447C4C /* TimeRanges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDC2C7141797089D00E627FB /* TimeRanges.cpp */; };
- CD51C2A93E78B5C1FF337C08 /* AbortableTaskQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = ABF510632A19B8AC7EC40E17 /* AbortableTaskQueue.cpp */; };
7CCE7EDE1A411A9200447C4C /* URL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 440A1D3814A0103A008A66F2 /* URL.cpp */; };
7CCE7EDF1A411A9200447C4C /* LayoutUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14464012167A8305000BD218 /* LayoutUnit.cpp */; };
7CCE7EE01A411A9A00447C4C /* EditorCommands.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCAA485714A044D40088FAC4 /* EditorCommands.mm */; };
@@ -1282,6 +1283,8 @@
0FEAE3671B7D19CB00CE17F2 /* Condition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Condition.cpp; sourceTree = "<group>"; };
0FFC45A41B73EBE20085BD62 /* Lock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Lock.cpp; sourceTree = "<group>"; };
115EB3421EE0B720003C2C0A /* ViewportSizeForViewportUnits.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewportSizeForViewportUnits.mm; sourceTree = "<group>"; };
+ 11B7FD21219F46DD0069B27F /* FirstMeaningfulPaintMilestone_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FirstMeaningfulPaintMilestone_Bundle.cpp; sourceTree = "<group>"; };
+ 11B7FD22219F46DD0069B27F /* FirstMeaningfulPaintMilestone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FirstMeaningfulPaintMilestone.cpp; sourceTree = "<group>"; };
14464012167A8305000BD218 /* LayoutUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutUnit.cpp; sourceTree = "<group>"; };
14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SaturatedArithmeticOperations.cpp; sourceTree = "<group>"; };
1A02C84B125D4A5E00E3F4BD /* find.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = find.html; sourceTree = "<group>"; };
@@ -1869,6 +1872,7 @@
A5E2027015B2180600C13E14 /* WindowlessWebViewWithMedia.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = WindowlessWebViewWithMedia.html; sourceTree = "<group>"; };
A5E2027215B2181900C13E14 /* WindowlessWebViewWithMedia.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowlessWebViewWithMedia.mm; sourceTree = "<group>"; };
A7A966DA140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CheckedArithmeticOperations.cpp; sourceTree = "<group>"; };
+ ABF510632A19B8AC7EC40E17 /* AbortableTaskQueue.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AbortableTaskQueue.cpp; sourceTree = "<group>"; };
AD57AC1D1DA7463800FF1BDE /* many-iframes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "many-iframes.html"; sourceTree = "<group>"; };
AD57AC1E1DA7464D00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DidRemoveFrameFromHiearchyInPageCache_Bundle.cpp; sourceTree = "<group>"; };
AD57AC1F1DA7464D00FF1BDE /* DidRemoveFrameFromHiearchyInPageCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DidRemoveFrameFromHiearchyInPageCache.cpp; sourceTree = "<group>"; };
@@ -2020,7 +2024,6 @@
CDBFCC421A9FF44800A7B691 /* FullscreenZoomInitialFrame.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = FullscreenZoomInitialFrame.html; sourceTree = "<group>"; };
CDBFCC431A9FF44800A7B691 /* FullscreenZoomInitialFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FullscreenZoomInitialFrame.mm; sourceTree = "<group>"; };
CDC2C7141797089D00E627FB /* TimeRanges.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TimeRanges.cpp; sourceTree = "<group>"; };
- ABF510632A19B8AC7EC40E17 /* AbortableTaskQueue.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = AbortableTaskQueue.cpp; sourceTree = "<group>"; };
CDC8E4851BC5B19400594FEC /* AudioSessionCategoryIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AudioSessionCategoryIOS.mm; sourceTree = "<group>"; };
CDC8E4891BC5C96200594FEC /* video-with-audio.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "video-with-audio.html"; sourceTree = "<group>"; };
CDC8E48A1BC5C96200594FEC /* video-with-audio.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = "video-with-audio.mp4"; sourceTree = "<group>"; };
@@ -2976,6 +2979,8 @@
BCC8B95A12611F4700DE46A4 /* FailedLoad.cpp */,
1A02C84E125D4A8400E3F4BD /* Find.cpp */,
C51AFB98169F49FF009CCF66 /* FindMatches.mm */,
+ 11B7FD22219F46DD0069B27F /* FirstMeaningfulPaintMilestone.cpp */,
+ 11B7FD21219F46DD0069B27F /* FirstMeaningfulPaintMilestone_Bundle.cpp */,
1ADBEFAD130C689C00D61D19 /* ForceRepaint.cpp */,
376C8C041D6E197C007D2BB9 /* FrameHandle.cpp */,
BCBD370F125AA2EB00D2C29F /* FrameMIMETypeHTML.cpp */,
@@ -3876,6 +3881,7 @@
7CCE7EF31A411AE600447C4C /* Find.cpp in Sources */,
7C83E0BB1D0A650000FEBCF3 /* FindInPage.mm in Sources */,
7CCE7EF41A411AE600447C4C /* FindMatches.mm in Sources */,
+ 11B7FD28219F47110069B27F /* FirstMeaningfulPaintMilestone.cpp in Sources */,
7C83E0401D0A63E300FEBCF3 /* FirstResponderScrollingPosition.mm in Sources */,
C9E6DD351EA97D0800DD78AA /* FirstResponderSuppression.mm in Sources */,
7C83E0BC1D0A650700FEBCF3 /* FixedLayoutSize.mm in Sources */,
@@ -3983,7 +3989,6 @@
5CAE463820193B6A0051610F /* NetworkProcessCrashNonPersistentDataStore.mm in Sources */,
9B19CDA01F06DFE3000548DD /* NetworkProcessCrashWithPendingConnection.mm in Sources */,
7CCE7F021A411AE600447C4C /* NewFirstVisuallyNonEmptyLayout.cpp in Sources */,
- 3781746D2198AE4600062C26 /* WKProcessPoolConfiguration.mm in Sources */,
7CCE7F031A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutFails.cpp in Sources */,
7CCE7F041A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutForImages.cpp in Sources */,
7CCE7F051A411AE600447C4C /* NewFirstVisuallyNonEmptyLayoutFrames.cpp in Sources */,
@@ -4165,6 +4170,7 @@
2D00065F1C1F589A0088E6A7 /* WKPDFViewResizeCrash.mm in Sources */,
2D21FE591F04642900B58E7D /* WKPDFViewStablePresentationUpdateCallback.mm in Sources */,
7CCE7F211A411AE600447C4C /* WKPreferences.cpp in Sources */,
+ 3781746D2198AE4600062C26 /* WKProcessPoolConfiguration.mm in Sources */,
44817A2F1F0486BF00003810 /* WKRequestActivatedElementInfo.mm in Sources */,
7C83E0B51D0A649300FEBCF3 /* WKRetainPtr.cpp in Sources */,
5E4B1D2E1D404C6100053621 /* WKScrollViewDelegate.mm in Sources */,
@@ -4246,6 +4252,7 @@
BCB68042126FBFF100642A61 /* DocumentStartUserScriptAlertCrash_Bundle.cpp in Sources */,
51393E221523952D005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp in Sources */,
F6F49C6B15545CA70007F39D /* DOMWindowExtensionNoCache_Bundle.cpp in Sources */,
+ 1171B24F219F49CD00CB897D /* FirstMeaningfulPaintMilestone_Bundle.cpp in Sources */,
C0C5D3C61459912900A802A6 /* GetBackingScaleFactor_Bundle.mm in Sources */,
F660AA1115A5F631003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp in Sources */,
4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */,
Copied: trunk/Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp (from rev 238305, trunk/Source/WebKit/Shared/API/c/WKPageLoadTypes.h) (0 => 238306)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone.cpp 2018-11-16 22:54:21 UTC (rev 238306)
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if WK_HAVE_C_SPI
+
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include <WebKit/WKContextPrivate.h>
+
+namespace TestWebKitAPI {
+
+static bool didUnlockFistMeaningfulPaintMilestone = false;
+
+static void didReachMilestone(WKPageRef, WKPageRenderingProgressEvents type, WKTypeRef, const void *)
+{
+ if (type & kWKDidFirstMeaningfulPaint)
+ didUnlockFistMeaningfulPaintMilestone = true;
+}
+
+static void setPageLoaderClient(WKPageRef page)
+{
+ WKPageNavigationClientV3 loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+
+ loaderClient.base.version = 3;
+ loaderClient.renderingProgressDidChange = didReachMilestone;
+
+ WKPageSetPageNavigationClient(page, &loaderClient.base);
+}
+
+TEST(WebKit, FirstMeaningfulPaint)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, Util::createContextForInjectedBundleTest("FirstMeaningfulPaintMilestoneTest"));
+
+ PlatformWebView webView(context.get());
+ setPageLoaderClient(webView.page());
+
+ WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("lots-of-text", "html")).get());
+
+ Util::run(&didUnlockFistMeaningfulPaintMilestone);
+ EXPECT_TRUE(didUnlockFistMeaningfulPaintMilestone);
+}
+
+} // namespace TestWebKitAPI
+
+#endif
Copied: trunk/Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp (from rev 238305, trunk/Source/WebKit/UIProcess/API/C/WKPageRenderingProgressEvents.h) (0 => 238306)
--- trunk/Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/FirstMeaningfulPaintMilestone_Bundle.cpp 2018-11-16 22:54:21 UTC (rev 238306)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if WK_HAVE_C_SPI
+
+#include "InjectedBundleTest.h"
+
+#include "PlatformUtilities.h"
+#include <WebKit/WKBundlePage.h>
+#include <WebKit/WKBundlePagePrivate.h>
+
+namespace TestWebKitAPI {
+
+class FirstMeaningfulPaintMilestoneTest : public InjectedBundleTest {
+public:
+ FirstMeaningfulPaintMilestoneTest(const std::string& identifier)
+ : InjectedBundleTest(identifier)
+ {
+ }
+
+ virtual void didCreatePage(WKBundleRef bundle, WKBundlePageRef page)
+ {
+ WKBundlePageListenForLayoutMilestones(page, kWKDidFirstMeaningfulPaint);
+ }
+
+};
+
+static InjectedBundleTest::Register<FirstMeaningfulPaintMilestoneTest> registrar("FirstMeaningfulPaintMilestoneTest");
+
+} // namespace TestWebKitAPI
+
+#endif