WebKit Bugzilla
Attachment 361371 Details for
Bug 194372
: [macOS] API test times out after r241026
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194372-20190206193838.patch (text/plain), 11.20 KB, created by
Per Arne Vollan
on 2019-02-06 19:38:38 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Per Arne Vollan
Created:
2019-02-06 19:38:38 PST
Size:
11.20 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 241113) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2019-02-06 Per Arne Vollan <pvollan@apple.com> >+ >+ [macOS] API test times out after r241026 >+ https://bugs.webkit.org/show_bug.cgi?id=194372 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ The API test TestWebKitAPI.RenderingProgress.FirstMeaningfulPaint times out after r241026. >+ A new function pointer, layoutMilestones, is added to WKBundlePageLoaderClient, in order >+ for clients to decide which milestones they would like to listen for. >+ >+ * WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h: >+ * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: >+ (layoutMilestones): >+ (setUpPageLoaderClient): >+ * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: >+ (WebKit::InjectedBundlePageLoaderClient::layoutMilestones const): >+ * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: >+ > 2019-02-06 Benjamin Poulain <benjamin@webkit.org> > > Unreviewed, rolling out r240759 and r240944. >Index: Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp (revision 241024) >+++ Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp (working copy) >@@ -365,6 +365,11 @@ String InjectedBundlePageLoaderClient::u > > OptionSet<WebCore::LayoutMilestone> InjectedBundlePageLoaderClient::layoutMilestones() const > { >+ if (m_client.layoutMilestones) { >+ auto milestones = m_client.layoutMilestones(m_client.base.clientInfo); >+ return toLayoutMilestones(milestones); >+ } >+ > OptionSet<WebCore::LayoutMilestone> milestones; > if (m_client.didFirstLayoutForFrame) > milestones.add(WebCore::DidFirstLayout); >Index: Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h (revision 241024) >+++ Source/WebKit/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h (working copy) >@@ -36,7 +36,7 @@ class Object; > class String; > > template<> struct ClientTraits<WKBundlePageLoaderClientBase> { >- typedef std::tuple<WKBundlePageLoaderClientV0, WKBundlePageLoaderClientV1, WKBundlePageLoaderClientV2, WKBundlePageLoaderClientV3, WKBundlePageLoaderClientV4, WKBundlePageLoaderClientV5, WKBundlePageLoaderClientV6, WKBundlePageLoaderClientV7, WKBundlePageLoaderClientV8, WKBundlePageLoaderClientV9> Versions; >+ typedef std::tuple<WKBundlePageLoaderClientV0, WKBundlePageLoaderClientV1, WKBundlePageLoaderClientV2, WKBundlePageLoaderClientV3, WKBundlePageLoaderClientV4, WKBundlePageLoaderClientV5, WKBundlePageLoaderClientV6, WKBundlePageLoaderClientV7, WKBundlePageLoaderClientV8, WKBundlePageLoaderClientV9, WKBundlePageLoaderClientV10> Versions; > }; > } > >Index: Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h (revision 241024) >+++ Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h (working copy) >@@ -63,6 +63,7 @@ typedef void (*WKBundlePageFeaturesUsedI > typedef void (*WKBundlePageWillLoadURLRequestCallback)(WKBundlePageRef page, WKURLRequestRef request, WKTypeRef userData, const void *clientInfo); > typedef void (*WKBundlePageWillLoadDataRequestCallback)(WKBundlePageRef page, WKURLRequestRef request, WKDataRef data, WKStringRef MIMEType, WKStringRef encodingName, WKURLRef unreachableURL, WKTypeRef userData, const void *clientInfo); > typedef WKStringRef (*WKBundlePageUserAgentForURLCallback)(WKBundleFrameRef frame, WKURLRef url, const void *clientInfo); >+typedef WKLayoutMilestones (*WKBundlePageLayoutMilestonesCallback)(const void* clientInfo); > > typedef struct WKBundlePageLoaderClientBase { > int version; >@@ -526,4 +527,68 @@ typedef struct WKBundlePageLoaderClientV > WKBundlePageWillInjectUserScriptForFrameCallback willInjectUserScriptForFrame; > } WKBundlePageLoaderClientV9; > >+typedef struct WKBundlePageLoaderClientV10 { >+ WKBundlePageLoaderClientBase base; >+ >+ // Version 0. >+ WKBundlePageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame; >+ WKBundlePageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame; >+ WKBundlePageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame; >+ WKBundlePageDidCommitLoadForFrameCallback didCommitLoadForFrame; >+ WKBundlePageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame; >+ WKBundlePageDidFinishLoadForFrameCallback didFinishLoadForFrame; >+ WKBundlePageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame; >+ WKBundlePageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame; >+ WKBundlePageDidReceiveTitleForFrameCallback didReceiveTitleForFrame; >+ WKBundlePageDidFirstLayoutForFrameCallback didFirstLayoutForFrame; >+ WKBundlePageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame; >+ WKBundlePageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy; >+ WKBundlePageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame; >+ WKBundlePageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame; >+ WKBundlePageDidClearWindowObjectForFrameCallback didClearWindowObjectForFrame; >+ WKBundlePageDidCancelClientRedirectForFrameCallback didCancelClientRedirectForFrame; >+ WKBundlePageWillPerformClientRedirectForFrameCallback willPerformClientRedirectForFrame; >+ WKBundlePageDidHandleOnloadEventsForFrameCallback didHandleOnloadEventsForFrame; >+ >+ // Version 1. >+ WKBundlePageDidLayoutForFrameCallback didLayoutForFrame; >+ void * didNewFirstVisuallyNonEmptyLayout_unavailable; >+ WKBundlePageDidDetectXSSForFrameCallback didDetectXSSForFrame; >+ WKBundlePageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem; >+ WKBundlePageGlobalObjectIsAvailableForFrameCallback globalObjectIsAvailableForFrame; >+ WKBundlePageWillDisconnectDOMWindowExtensionFromGlobalObjectCallback willDisconnectDOMWindowExtensionFromGlobalObject; >+ WKBundlePageDidReconnectDOMWindowExtensionToGlobalObjectCallback didReconnectDOMWindowExtensionToGlobalObject; >+ WKBundlePageWillDestroyGlobalObjectForDOMWindowExtensionCallback willDestroyGlobalObjectForDOMWindowExtension; >+ >+ // Version 2 >+ WKBundlePageDidFinishProgressCallback didFinishProgress; >+ WKBundlePageShouldForceUniversalAccessFromLocalURLCallback shouldForceUniversalAccessFromLocalURL; >+ >+ // Version 3 >+ void * didReceiveIntentForFrame_unavailable; >+ void * registerIntentServiceForFrame_unavailable; >+ >+ // Version 4 >+ WKBundlePageDidLayoutCallback didLayout; >+ >+ // Version 5 >+ WKBundlePageFeaturesUsedInPageCallback featuresUsedInPage; >+ >+ // Version 6 >+ WKBundlePageWillLoadURLRequestCallback willLoadURLRequest; >+ WKBundlePageWillLoadDataRequestCallback willLoadDataRequest; >+ >+ // Version 7 >+ void * willDestroyFrame_unavailable; >+ >+ // Version 8 >+ WKBundlePageUserAgentForURLCallback userAgentForURL; >+ >+ // Version 9 >+ WKBundlePageWillInjectUserScriptForFrameCallback willInjectUserScriptForFrame; >+ >+ // Version 10 >+ WKBundlePageLayoutMilestonesCallback layoutMilestones; >+} WKBundlePageLoaderClientV10; >+ > #endif // WKBundlePageLoaderClient_h >Index: Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm >=================================================================== >--- Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (revision 241026) >+++ Source/WebKit/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm (working copy) >@@ -192,6 +192,18 @@ static void didReachLayoutMilestone(WKBu > [loadDelegate webProcessPlugInBrowserContextController:pluginContextController renderingProgressDidChange:renderingProgressEvents(WebKit::toLayoutMilestones(milestones))]; > } > >+static WKLayoutMilestones layoutMilestones(const void *clientInfo) >+{ >+ auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; >+ auto loadDelegate = pluginContextController->_loadDelegate.get(); >+ >+ if ([loadDelegate respondsToSelector:@selector(webProcessPlugInBrowserContextControllerRenderingProgressEvents:)]) { >+ _WKRenderingProgressEvents milestones = [loadDelegate webProcessPlugInBrowserContextControllerRenderingProgressEvents:pluginContextController]; >+ return static_cast<WKLayoutMilestones>(milestones); >+ } >+ return { }; >+} >+ > static void didFirstVisuallyNonEmptyLayoutForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo) > { > auto pluginContextController = (__bridge WKWebProcessPlugInBrowserContextController *)clientInfo; >@@ -229,10 +241,10 @@ static WKStringRef userAgentForURL(WKBun > > static void setUpPageLoaderClient(WKWebProcessPlugInBrowserContextController *contextController, WebKit::WebPage& page) > { >- WKBundlePageLoaderClientV9 client; >+ WKBundlePageLoaderClientV10 client; > memset(&client, 0, sizeof(client)); > >- client.base.version = 8; >+ client.base.version = 10; > client.base.clientInfo = (__bridge void*)contextController; > client.didStartProvisionalLoadForFrame = didStartProvisionalLoadForFrame; > client.didReceiveServerRedirectForProvisionalLoadForFrame = didReceiveServerRedirectForProvisionalLoadForFrame; >@@ -250,6 +262,7 @@ static void setUpPageLoaderClient(WKWebP > > client.didLayoutForFrame = didLayoutForFrame; > client.didLayout = didReachLayoutMilestone; >+ client.layoutMilestones = layoutMilestones; > > WKBundlePageSetPageLoaderClient(toAPI(&page), &client.base); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194372
: 361371