Diff
Modified: trunk/Source/WebKit/ChangeLog (236145 => 236146)
--- trunk/Source/WebKit/ChangeLog 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/ChangeLog 2018-09-18 17:59:45 UTC (rev 236146)
@@ -1,3 +1,16 @@
+2018-09-18 Ryan Haddad <[email protected]>
+
+ Unreviewed, rolling out r236138.
+
+ Caused API test and layout test failures on iOS.
+
+ Reverted changeset:
+
+ "REGRESSION (PSON): White or Black flash occurs when process
+ swapping on navigation on Mac"
+ https://bugs.webkit.org/show_bug.cgi?id=189663
+ https://trac.webkit.org/changeset/236138
+
2018-09-18 Eric Carlson <[email protected]>
Always log when granting/revoking capture sandbox extensions
Modified: trunk/Source/WebKit/UIProcess/DrawingAreaProxy.h (236145 => 236146)
--- trunk/Source/WebKit/UIProcess/DrawingAreaProxy.h 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/UIProcess/DrawingAreaProxy.h 2018-09-18 17:59:45 UTC (rev 236146)
@@ -82,8 +82,6 @@
void viewExposedRectChangedTimerFired();
#endif
- virtual void attachInWebProcess() { }
-
virtual void updateDebugIndicator() { }
virtual void waitForDidUpdateActivityState(ActivityStateChangeID) { }
Modified: trunk/Source/WebKit/UIProcess/SuspendedPageProxy.cpp (236145 => 236146)
--- trunk/Source/WebKit/UIProcess/SuspendedPageProxy.cpp 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/UIProcess/SuspendedPageProxy.cpp 2018-09-18 17:59:45 UTC (rev 236146)
@@ -54,7 +54,6 @@
messageNames.get().add("DidDestroyNavigation");
messageNames.get().add("DidFinishDocumentLoadForFrame");
messageNames.get().add("DidFinishProgress");
- messageNames.get().add("DidCompletePageTransition");
messageNames.get().add("DidFirstLayoutForFrame");
messageNames.get().add("DidFirstVisuallyNonEmptyLayoutForFrame");
messageNames.get().add("DidNavigateWithNavigationData");
@@ -110,11 +109,6 @@
m_page.suspendedPageClosed(*this);
}
-void SuspendedPageProxy::tearDownDrawingAreaInWebProcess()
-{
- m_process->send(Messages::WebPage::TearDownDrawingAreaForSuspend(), m_page.pageID());
-}
-
void SuspendedPageProxy::didFinishLoad()
{
ASSERT(m_process);
Modified: trunk/Source/WebKit/UIProcess/SuspendedPageProxy.h (236145 => 236146)
--- trunk/Source/WebKit/UIProcess/SuspendedPageProxy.h 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/UIProcess/SuspendedPageProxy.h 2018-09-18 17:59:45 UTC (rev 236146)
@@ -49,7 +49,6 @@
void webProcessDidClose(WebProcessProxy&);
void destroyWebPageInWebProcess();
- void tearDownDrawingAreaInWebProcess();
#if !LOG_DISABLED
const char* loggingString() const;
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (236145 => 236146)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2018-09-18 17:59:45 UTC (rev 236146)
@@ -56,8 +56,8 @@
#include "AuthenticationDecisionListener.h"
#include "DataReference.h"
#include "DownloadProxy.h"
-#include "DrawingAreaMessages.h"
#include "DrawingAreaProxy.h"
+#include "DrawingAreaProxyMessages.h"
#include "EventDispatcherMessages.h"
#include "FrameInfoData.h"
#include "LoadParameters.h"
@@ -798,9 +798,7 @@
initializeWebPage();
- if (!navigation)
- pageClient().didRelaunchProcess();
-
+ pageClient().didRelaunchProcess();
m_drawingArea->waitForBackingStoreUpdateOnNextPaint();
}
@@ -2451,8 +2449,6 @@
if (proposedProcess.ptr() != &process()) {
RELEASE_LOG_IF_ALLOWED(ProcessSwapping, "%p - WebPageProxy::decidePolicyForNavigationAction, swapping process %i with process %i for navigation, reason: %{public}s", this, processIdentifier(), proposedProcess->processIdentifier(), reason.utf8().data());
LOG(ProcessSwapping, "(ProcessSwapping) Switching from process %i to new process (%i) for navigation %" PRIu64 " '%s'", processIdentifier(), proposedProcess->processIdentifier(), navigation->navigationID(), navigation->loggingString());
-
- process().send(Messages::WebPage::SetIsSuspended(true), pageID());
RunLoop::main().dispatch([this, protectedThis = makeRef(*this), navigation = makeRef(*navigation), proposedProcess = WTFMove(proposedProcess)]() mutable {
continueNavigationInNewProcess(navigation, WTFMove(proposedProcess));
@@ -3449,22 +3445,6 @@
m_pageLoadState.commitChanges();
}
-void WebPageProxy::didCompletePageTransition(bool isInitialEmptyDocument)
-{
-#if PLATFORM(MAC)
- if (!m_drawingArea)
- return;
-
- // Attach drawing area for the initial empty document only if this is not a process swap.
- if (isInitialEmptyDocument && m_suspendedPage)
- return;
-
- m_drawingArea->attachInWebProcess();
-#else
- UNUSED_PARAM(isInitialEmptyDocument);
-#endif
-}
-
void WebPageProxy::setNetworkRequestsInProgress(bool networkRequestsInProgress)
{
auto transaction = m_pageLoadState.transaction();
@@ -6187,9 +6167,7 @@
m_editorState = EditorState();
- if (terminationReason != ProcessTerminationReason::NavigationSwap)
- pageClient().processDidExit();
-
+ pageClient().processDidExit();
pageClient().clearAllEditCommands();
auto resetStateReason = terminationReason == ProcessTerminationReason::NavigationSwap ? ResetStateReason::NavigationSwap : ResetStateReason::WebProcessExited;
@@ -6330,10 +6308,6 @@
void WebPageProxy::enterAcceleratedCompositingMode(const LayerTreeContext& layerTreeContext)
{
pageClient().enterAcceleratedCompositingMode(layerTreeContext);
-
- // We have completed the page transition and can tear down the layers in the suspended process.
- if (m_suspendedPage)
- m_suspendedPage->tearDownDrawingAreaInWebProcess();
}
void WebPageProxy::exitAcceleratedCompositingMode()
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (236145 => 236146)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2018-09-18 17:59:45 UTC (rev 236146)
@@ -1423,7 +1423,6 @@
void didStartProgress();
void didChangeProgress(double);
void didFinishProgress();
- void didCompletePageTransition(bool isInitialEmptyDocument);
void setNetworkRequestsInProgress(bool);
void hasInsecureContent(WebCore::HasInsecureContent&);
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in (236145 => 236146)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in 2018-09-18 17:59:45 UTC (rev 236146)
@@ -117,8 +117,6 @@
DidFinishProgress()
DidStartProgress()
- DidCompletePageTransition(bool isInitialEmptyDocument)
-
SetNetworkRequestsInProgress(bool networkRequestsInProgress)
# Frame lifetime messages
Modified: trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h (236145 => 236146)
--- trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h 2018-09-18 17:59:45 UTC (rev 236146)
@@ -38,8 +38,6 @@
private:
// DrawingAreaProxy
- void attachInWebProcess() override;
-
void deviceScaleFactorDidChange() override;
void sizeDidChange() override;
void colorSpaceDidChange() override;
Modified: trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm (236145 => 236146)
--- trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm 2018-09-18 17:59:45 UTC (rev 236146)
@@ -53,11 +53,6 @@
m_callbacks.invalidate(CallbackBase::Error::OwnerWasInvalidated);
}
-void TiledCoreAnimationDrawingAreaProxy::attachInWebProcess()
-{
- m_webPageProxy.process().send(Messages::DrawingArea::Attach(), m_webPageProxy.pageID());
-}
-
void TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange()
{
m_webPageProxy.process().send(Messages::DrawingArea::SetDeviceScaleFactor(m_webPageProxy.deviceScaleFactor()), m_webPageProxy.pageID());
Modified: trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.h (236145 => 236146)
--- trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.h 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.h 2018-09-18 17:59:45 UTC (rev 236146)
@@ -151,7 +151,7 @@
void displayWasRefreshed();
#endif
- virtual void attach() { };
+ virtual void attachDrawingArea() { };
protected:
DrawingArea(DrawingAreaType, WebPage&);
Modified: trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in (236145 => 236146)
--- trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in 2018-09-18 17:59:45 UTC (rev 236146)
@@ -45,11 +45,7 @@
DestroyNativeSurfaceHandleForCompositing() -> (bool handled)
#endif
-#if PLATFORM(MAC)
- Attach()
-
-#if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
DisplayWasRefreshed()
#endif
-#endif
}
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (236145 => 236146)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2018-09-18 17:59:45 UTC (rev 236146)
@@ -657,6 +657,7 @@
m_drawingArea->updatePreferences(parameters.store);
m_drawingArea->setPaintingEnabled(true);
}
+ m_drawingArea->attachDrawingArea();
if (m_activityState != parameters.activityState)
setActivityState(parameters.activityState, ActivityStateChangeAsynchronous, Vector<CallbackID>());
@@ -2214,7 +2215,7 @@
if (!drawingArea)
return;
- drawingArea->setLayerTreeStateIsFrozen(frozen || m_isSuspended);
+ drawingArea->setLayerTreeStateIsFrozen(frozen);
}
void WebPage::callVolatilityCompletionHandlers(bool succeeded)
@@ -2845,7 +2846,7 @@
void WebPage::didStartPageTransition()
{
- setLayerTreeStateIsFrozen(true);
+ m_drawingArea->setLayerTreeStateIsFrozen(true);
#if PLATFORM(MAC)
bool hasPreviouslyFocusedDueToUserInteraction = m_hasEverFocusedElementDueToUserInteractionSincePageTransition;
@@ -2869,11 +2870,8 @@
void WebPage::didCompletePageTransition()
{
- // FIXME: Layer tree freezing should be managed entirely in the UI process side.
- setLayerTreeStateIsFrozen(false);
-
- bool isInitialEmptyDocument = !m_mainFrame;
- send(Messages::WebPageProxy::DidCompletePageTransition(isInitialEmptyDocument));
+ if (m_drawingArea)
+ m_drawingArea->setLayerTreeStateIsFrozen(false);
}
void WebPage::show()
@@ -6002,22 +6000,10 @@
return;
m_isSuspended = suspended;
-
-#if PLATFORM(MAC)
- // Drawing area is cleared by a message from the UI process.
- setLayerTreeStateIsFrozen(true);
-#else
- tearDownDrawingAreaForSuspend();
-#endif
+ if (m_isSuspended)
+ m_drawingArea = nullptr;
}
-void WebPage::tearDownDrawingAreaForSuspend()
-{
- if (!m_isSuspended)
- return;
- m_drawingArea = nullptr;
-}
-
void WebPage::frameBecameRemote(uint64_t frameID, GlobalFrameIdentifier&& remoteFrameIdentifier, GlobalWindowIdentifier&& remoteWindowIdentifier)
{
RefPtr<WebFrame> frame = WebProcess::singleton().webFrame(frameID);
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (236145 => 236146)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2018-09-18 17:59:45 UTC (rev 236146)
@@ -1414,7 +1414,6 @@
void urlSchemeTaskDidComplete(uint64_t handlerIdentifier, uint64_t taskIdentifier, const WebCore::ResourceError&);
void setIsSuspended(bool);
- void tearDownDrawingAreaForSuspend();
RefPtr<WebImage> snapshotAtSize(const WebCore::IntRect&, const WebCore::IntSize& bitmapSize, SnapshotOptions);
RefPtr<WebImage> snapshotNode(WebCore::Node&, SnapshotOptions, unsigned maximumPixelCount = std::numeric_limits<unsigned>::max());
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (236145 => 236146)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2018-09-18 17:59:45 UTC (rev 236146)
@@ -506,7 +506,6 @@
URLSchemeTaskDidComplete(uint64_t handlerIdentifier, uint64_t taskIdentifier, WebCore::ResourceError error)
SetIsSuspended(bool suspended)
- TearDownDrawingAreaForSuspend();
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
StorageAccessResponse(bool wasGranted, uint64_t contextId)
Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h (236145 => 236146)
--- trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h 2018-09-18 17:59:45 UTC (rev 236146)
@@ -103,7 +103,7 @@
void addTransactionCallbackID(CallbackID) override;
void setShouldScaleViewToFitDocument(bool) override;
- void attach() override;
+ void attachDrawingArea() override;
void adjustTransientZoom(double scale, WebCore::FloatPoint origin) override;
void commitTransientZoom(double scale, WebCore::FloatPoint origin) override;
Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (236145 => 236146)
--- trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2018-09-18 17:32:42 UTC (rev 236145)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2018-09-18 17:59:45 UTC (rev 236146)
@@ -91,6 +91,8 @@
updateLayerHostingContext();
setColorSpace(parameters.colorSpace);
+
+ attachDrawingArea();
}
TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea()
@@ -99,7 +101,7 @@
}
-void TiledCoreAnimationDrawingArea::attach()
+void TiledCoreAnimationDrawingArea::attachDrawingArea()
{
LayerTreeContext layerTreeContext;
layerTreeContext.contextID = m_layerHostingContext->contextID();