WebKit Bugzilla
Attachment 348455 Details for
Bug 189133
: Revert some of r235398
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189133-20180829174234.patch (text/plain), 7.28 KB, created by
Alex Christensen
on 2018-08-29 17:42:35 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-08-29 17:42:35 PDT
Size:
7.28 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 235490) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2018-08-29 Alex Christensen <achristensen@webkit.org> >+ >+ Revert some of r235398 >+ https://bugs.webkit.org/show_bug.cgi?id=189133 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UIProcess/API/APILoaderClient.h: >+ (API::LoaderClient::processDidCrash): >+ (API::LoaderClient::didChangeBackForwardList): >+ (API::LoaderClient::didCommitLoadForFrame): >+ * UIProcess/API/C/WKPage.cpp: >+ (WKPageSetPageLoaderClient): >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::didChangeBackForwardList): >+ (WebKit::WebPageProxy::didCommitLoadForFrame): >+ (WebKit::WebPageProxy::dispatchProcessDidTerminate): >+ > 2018-08-29 Olivia Barnett <obarnett@apple.com> > > Implement the Web Share API >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 235409) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -1270,8 +1270,8 @@ void WebPageProxy::didChangeBackForwardL > { > PageClientProtector protector(m_pageClient); > >- if (m_navigationClient) >- m_navigationClient->didChangeBackForwardList(*this, added, removed); >+ if (!m_navigationClient || !m_navigationClient->didChangeBackForwardList(*this, added, removed)) >+ m_loaderClient->didChangeBackForwardList(*this, added, WTFMove(removed)); > > auto transaction = m_pageLoadState.transaction(); > >@@ -3672,9 +3672,11 @@ void WebPageProxy::didCommitLoadForFrame > #endif > > m_pageLoadState.commitChanges(); >- if (m_navigationClient && frame->isMainFrame()) >- m_navigationClient->didCommitNavigation(*this, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get()); >- >+ if (m_navigationClient) { >+ if (frame->isMainFrame()) >+ m_navigationClient->didCommitNavigation(*this, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get()); >+ } else >+ m_loaderClient->didCommitLoadForFrame(*this, *frame, navigation.get(), m_process->transformHandlesToObjects(userData.object()).get()); > #if ENABLE(ATTACHMENT_ELEMENT) > if (frame->isMainFrame()) > invalidateAllAttachments(); >@@ -5912,6 +5914,8 @@ void WebPageProxy::dispatchProcessDidTer > bool handledByClient = false; > if (m_navigationClient) > handledByClient = m_navigationClient->processDidTerminate(*this, reason); >+ else if (reason != ProcessTerminationReason::RequestedByClient) >+ handledByClient = m_loaderClient->processDidCrash(*this); > > if (!handledByClient && shouldReloadAfterProcessTermination(reason)) > tryReloadAfterProcessTermination(); >Index: Source/WebKit/UIProcess/API/APILoaderClient.h >=================================================================== >--- Source/WebKit/UIProcess/API/APILoaderClient.h (revision 235409) >+++ Source/WebKit/UIProcess/API/APILoaderClient.h (working copy) >@@ -63,6 +63,9 @@ public: > virtual void didFirstVisuallyNonEmptyLayoutForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Object*) { } > virtual void didReachLayoutMilestone(WebKit::WebPageProxy&, WebCore::LayoutMilestones) { } > virtual bool shouldKeepCurrentBackForwardListItemInList(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem&) { return true; } >+ virtual bool processDidCrash(WebKit::WebPageProxy&) { return false; } >+ virtual void didChangeBackForwardList(WebKit::WebPageProxy&, WebKit::WebBackForwardListItem*, Vector<Ref<WebKit::WebBackForwardListItem>>&&) { } >+ virtual void didCommitLoadForFrame(WebKit::WebPageProxy&, WebKit::WebFrameProxy&, API::Navigation*, API::Object*) { } > }; > > } // namespace API >Index: Source/WebKit/UIProcess/API/C/WKPage.cpp >=================================================================== >--- Source/WebKit/UIProcess/API/C/WKPage.cpp (revision 235409) >+++ Source/WebKit/UIProcess/API/C/WKPage.cpp (working copy) >@@ -1044,7 +1044,6 @@ void WKPageSetPageLoaderClient(WKPageRef > initialize(client); > > // WKPageSetPageLoaderClient is deprecated. Use WKPageSetPageNavigationClient instead. >- RELEASE_ASSERT(!m_client.didCommitLoadForFrame); > RELEASE_ASSERT(!m_client.didFinishDocumentLoadForFrame); > RELEASE_ASSERT(!m_client.didSameDocumentNavigationForFrame); > RELEASE_ASSERT(!m_client.didReceiveTitleForFrame); >@@ -1059,8 +1058,6 @@ void WKPageSetPageLoaderClient(WKPageRef > RELEASE_ASSERT(!m_client.didFinishProgress); > RELEASE_ASSERT(!m_client.processDidBecomeUnresponsive); > RELEASE_ASSERT(!m_client.processDidBecomeResponsive); >- RELEASE_ASSERT(!m_client.processDidCrash); >- RELEASE_ASSERT(!m_client.didChangeBackForwardList); > RELEASE_ASSERT(!m_client.shouldGoToBackForwardListItem); > RELEASE_ASSERT(!m_client.didFailToInitializePlugin_deprecatedForUseWithV0); > RELEASE_ASSERT(!m_client.didDetectXSSForFrame); >@@ -1081,6 +1078,15 @@ void WKPageSetPageLoaderClient(WKPageRef > } > > private: >+ >+ void didCommitLoadForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, API::Object* userData) override >+ { >+ if (!m_client.didCommitLoadForFrame) >+ return; >+ >+ m_client.didCommitLoadForFrame(toAPI(&page), toAPI(&frame), toAPI(userData), m_client.base.clientInfo); >+ } >+ > void didStartProvisionalLoadForFrame(WebPageProxy& page, WebFrameProxy& frame, API::Navigation*, API::Object* userData) override > { > if (!m_client.didStartProvisionalLoadForFrame) >@@ -1137,6 +1143,33 @@ void WKPageSetPageLoaderClient(WKPageRef > m_client.didLayout(toAPI(&page), toWKLayoutMilestones(milestones), nullptr, m_client.base.clientInfo); > } > >+ bool processDidCrash(WebPageProxy& page) override >+ { >+ if (!m_client.processDidCrash) >+ return false; >+ >+ m_client.processDidCrash(toAPI(&page), m_client.base.clientInfo); >+ return true; >+ } >+ >+ void didChangeBackForwardList(WebPageProxy& page, WebBackForwardListItem* addedItem, Vector<Ref<WebBackForwardListItem>>&& removedItems) override >+ { >+ if (!m_client.didChangeBackForwardList) >+ return; >+ >+ RefPtr<API::Array> removedItemsArray; >+ if (!removedItems.isEmpty()) { >+ Vector<RefPtr<API::Object>> removedItemsVector; >+ removedItemsVector.reserveInitialCapacity(removedItems.size()); >+ for (auto& removedItem : removedItems) >+ removedItemsVector.append(WTFMove(removedItem)); >+ >+ removedItemsArray = API::Array::create(WTFMove(removedItemsVector)); >+ } >+ >+ m_client.didChangeBackForwardList(toAPI(&page), toAPI(addedItem), toAPI(removedItemsArray.get()), m_client.base.clientInfo); >+ } >+ > bool shouldKeepCurrentBackForwardListItemInList(WebKit::WebPageProxy& page, WebKit::WebBackForwardListItem& item) override > { > if (!m_client.shouldKeepCurrentBackForwardListItemInList)
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 189133
: 348455