Title: [169851] trunk/Source/WebKit2
- Revision
- 169851
- Author
- [email protected]
- Date
- 2014-06-11 15:49:36 -0700 (Wed, 11 Jun 2014)
Log Message
[iOS] Clear UIProcess visual state after WebProcess crash
https://bugs.webkit.org/show_bug.cgi?id=133664
<rdar://problem/16952742>
Reviewed by Benjamin Poulain.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didRelaunchProcess]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didRelaunchProcess):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
(WebKit::RemoteLayerTreeHost::clearLayers):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (169850 => 169851)
--- trunk/Source/WebKit2/ChangeLog 2014-06-11 22:47:16 UTC (rev 169850)
+++ trunk/Source/WebKit2/ChangeLog 2014-06-11 22:49:36 UTC (rev 169851)
@@ -1,3 +1,21 @@
+2014-06-11 Martin Hock <[email protected]>
+
+ [iOS] Clear UIProcess visual state after WebProcess crash
+ https://bugs.webkit.org/show_bug.cgi?id=133664
+ <rdar://problem/16952742>
+
+ Reviewed by Benjamin Poulain.
+
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _didRelaunchProcess]):
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::didRelaunchProcess):
+ * UIProcess/mac/RemoteLayerTreeHost.h:
+ * UIProcess/mac/RemoteLayerTreeHost.mm:
+ (WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
+ (WebKit::RemoteLayerTreeHost::clearLayers):
+
2014-06-11 Tim Horton <[email protected]>
Implement swipeWithEvent for non-fluid swipes
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (169850 => 169851)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-06-11 22:47:16 UTC (rev 169850)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm 2014-06-11 22:49:36 UTC (rev 169851)
@@ -1425,6 +1425,16 @@
_page->process().terminate();
}
+- (void)_didRelaunchProcess
+{
+#if PLATFORM(IOS)
+ WebCore::FloatSize boundsSize(self.bounds.size);
+ _page->setViewportConfigurationMinimumLayoutSize(_overridesMinimumLayoutSize ? WebCore::FloatSize(_minimumLayoutSizeOverride) : boundsSize);
+ _page->setViewportConfigurationMinimumLayoutSizeForMinimalUI(_overridesMinimumLayoutSizeForMinimalUI ? WebCore::FloatSize(_minimumLayoutSizeOverrideForMinimalUI) : boundsSize);
+ _page->setMaximumUnobscuredSize(_overridesMaximumUnobscuredSize ? WebCore::FloatSize(_maximumUnobscuredSizeOverride) : boundsSize);
+#endif
+}
+
- (NSData *)_sessionState
{
return [wrapper(*_page->sessionStateData(nullptr, nullptr).leakRef()) autorelease];
Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (169850 => 169851)
--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h 2014-06-11 22:47:16 UTC (rev 169850)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h 2014-06-11 22:49:36 UTC (rev 169851)
@@ -144,6 +144,7 @@
- (void)_setOverlaidAccessoryViewsInset:(CGSize)inset;
- (void)_killWebContentProcess;
+- (void)_didRelaunchProcess;
#else
@property (readonly) NSColor *_pageExtendedBackgroundColor;
Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (169850 => 169851)
--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2014-06-11 22:47:16 UTC (rev 169850)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm 2014-06-11 22:49:36 UTC (rev 169851)
@@ -151,6 +151,7 @@
void PageClientImpl::didRelaunchProcess()
{
[m_contentView _didRelaunchProcess];
+ [m_webView _didRelaunchProcess];
}
void PageClientImpl::pageClosed()
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h (169850 => 169851)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h 2014-06-11 22:47:16 UTC (rev 169850)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h 2014-06-11 22:49:36 UTC (rev 169851)
@@ -61,6 +61,8 @@
void animationDidStart(WebCore::GraphicsLayer::PlatformLayerID, CAAnimation *, double startTime);
+ void clearLayers();
+
private:
LayerOrView *createLayer(const RemoteLayerTreeTransaction::LayerCreationProperties&, const RemoteLayerTreeTransaction::LayerProperties*);
static void setLayerID(CALayer *, WebCore::GraphicsLayer::PlatformLayerID);
Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm (169850 => 169851)
--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm 2014-06-11 22:47:16 UTC (rev 169850)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm 2014-06-11 22:49:36 UTC (rev 169851)
@@ -51,6 +51,7 @@
RemoteLayerTreeHost::~RemoteLayerTreeHost()
{
+ clearLayers();
}
bool RemoteLayerTreeHost::updateLayerTree(const RemoteLayerTreeTransaction& transaction, float indicatorScaleFactor)
@@ -135,6 +136,19 @@
m_drawingArea.acceleratedAnimationDidStart(layerID, animationKey, startTime);
}
+void RemoteLayerTreeHost::clearLayers()
+{
+ for (auto& idLayer : m_layers) {
+ m_animationDelegates.remove(idLayer.key);
+ asLayer(idLayer.value.get()).contents = nullptr;
+ }
+
+ m_layers.clear();
+
+ if (m_rootLayer)
+ m_rootLayer = nullptr;
+}
+
static NSString* const WKLayerIDPropertyKey = @"WKLayerID";
void RemoteLayerTreeHost::setLayerID(CALayer *layer, WebCore::GraphicsLayer::PlatformLayerID layerID)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes