WebKit Bugzilla
Attachment 349325 Details for
Bug 189481
: Regression(PSON): WebView is blank when navigating back cross-process on iOS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189481-20180910135745.patch (text/plain), 5.98 KB, created by
Chris Dumez
on 2018-09-10 13:57:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Chris Dumez
Created:
2018-09-10 13:57:45 PDT
Size:
5.98 KB
patch
obsolete
>Subversion Revision: 235783 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 2e7970798f52fb263dd52780960ede9f58c80c5d..d90bb6dbc22ddcd8483888ed8e6eba8a34dff183 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,43 @@ >+2018-09-10 Chris Dumez <cdumez@apple.com> >+ >+ Regression(PSON): WebView is blank when navigating back cross-process on iOS >+ https://bugs.webkit.org/show_bug.cgi?id=189481 >+ <rdar://problem/44315010> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ When process swapping on navigation, the WebPageProxy would detach from the old WebProcess and destroy >+ its RemoteLayerTreeDrawingAreaProxy. It would then create a new process and a new RemoteLayerTreeDrawingAreaProxy >+ to listen for IPC from this new process. When navigating back to the original process, we would do the >+ same in the opposite direction. However, the issue was that the old WebProcess's WebPage would not destroy its >+ drawing area and some state would persist and cause issues. For example, the DrawingArea would send a >+ CommitLayerTree IPC to the UIProcess and set m_waitingForBackingStoreSwap to true. It normally resets >+ m_waitingForBackingStoreSwap to false when getting the DidUpdate IPC from the UIProcess. However, when the >+ WebPage is detached from its WebPageProxy (i.e. suspended due to PSON), the UIProcess would not respond to >+ IPC from the old WebProcess and m_waitingForBackingStoreSwap would never get reset. >+ >+ * UIProcess/SuspendedPageProxy.cpp: >+ (WebKit::SuspendedPageProxy::~SuspendedPageProxy): >+ Make sure we send the SetIsSuspended IPC to the WebProcess with false value when >+ the SuspendedPageProxy gets destroyed, so that the WebProcess can update its >+ m_isSuspended flag. Previous, it was set to true when constructing the >+ SuspendedPageProxy but never reset to false. >+ >+ * WebProcess/WebCoreSupport/WebChromeClient.cpp: >+ (WebKit::WebChromeClient::invalidateContentsAndRootView): >+ (WebKit::WebChromeClient::invalidateContentsForSlowScroll): >+ Add null checks for the drawing area now that it can be null while suspended. >+ >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::WebPage::reinitializeWebPage): >+ When a WebPage gets reattached to a WebPageProxy, this method is called. Since we now >+ destroy the drawing area upon suspension (WebPage gets detached from WebPageProxy), we >+ need to make sure we recreate the drawing area when reattaching. >+ >+ (WebKit::WebPage::setIsSuspended): >+ Destroy the drawing area when the WebPage is suspended, meaning that this WebPage >+ is no longer associated with a WebPageProxy. >+ > 2018-09-07 Brent Fulgham <bfulgham@apple.com> > > Unreviewed syntax fix after r235781 >diff --git a/Source/WebKit/UIProcess/SuspendedPageProxy.cpp b/Source/WebKit/UIProcess/SuspendedPageProxy.cpp >index f9a501198781347d46b4468ffa5ba91fe599d59c..807189258f6d084321c523f146fbf1d3c5a5a083 100644 >--- a/Source/WebKit/UIProcess/SuspendedPageProxy.cpp >+++ b/Source/WebKit/UIProcess/SuspendedPageProxy.cpp >@@ -87,6 +87,7 @@ SuspendedPageProxy::SuspendedPageProxy(WebPageProxy& page, WebProcessProxy& proc > SuspendedPageProxy::~SuspendedPageProxy() > { > if (auto process = makeRefPtr(m_process)) { >+ process->send(Messages::WebPage::SetIsSuspended(false), m_page.pageID()); > process->suspendedPageWasDestroyed(*this); > process->processPool().unregisterSuspendedPageProxy(*this); > } >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >index 08d023b0e38c4891dfb141e09cebeacf5f515d7c..3e9fc9cc101211b96a865bb3663a075f8202b450 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >@@ -523,7 +523,8 @@ void WebChromeClient::invalidateContentsAndRootView(const IntRect& rect) > return; > } > >- m_page.drawingArea()->setNeedsDisplayInRect(rect); >+ if (auto* drawingArea = m_page.drawingArea()) >+ drawingArea->setNeedsDisplayInRect(rect); > } > > void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect) >@@ -541,7 +542,8 @@ void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect) > return; > } > #endif >- m_page.drawingArea()->setNeedsDisplayInRect(rect); >+ if (auto* drawingArea = m_page.drawingArea()) >+ drawingArea->setNeedsDisplayInRect(rect); > } > > void WebChromeClient::scroll(const IntSize& scrollDelta, const IntRect& scrollRect, const IntRect& clipRect) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 44deff1340f59ad9701e93b32a94d4f6d761a640..d87c7a8a113d2659ded8a2b97426248ae6efefa7 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -652,7 +652,13 @@ void WebPage::enableEnumeratingAllNetworkInterfaces() > > void WebPage::reinitializeWebPage(WebPageCreationParameters&& parameters) > { >- ASSERT(m_drawingArea); >+ if (!m_drawingArea) { >+ m_drawingArea = DrawingArea::create(*this, parameters); >+ m_drawingArea->setPaintingEnabled(false); >+ m_drawingArea->setShouldScaleViewToFitDocument(parameters.shouldScaleViewToFitDocument); >+ m_drawingArea->updatePreferences(parameters.store); >+ m_drawingArea->setPaintingEnabled(true); >+ } > m_drawingArea->attachDrawingArea(); > > if (m_activityState != parameters.activityState) >@@ -5993,7 +5999,12 @@ void WebPage::urlSchemeTaskDidComplete(uint64_t handlerIdentifier, uint64_t task > > void WebPage::setIsSuspended(bool suspended) > { >+ if (m_isSuspended == suspended) >+ return; >+ > m_isSuspended = suspended; >+ if (m_isSuspended) >+ m_drawingArea = nullptr; > } > > void WebPage::frameBecameRemote(uint64_t frameID, GlobalFrameIdentifier&& remoteFrameIdentifier, GlobalWindowIdentifier&& remoteWindowIdentifier)
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 189481
: 349325