Title: [139252] trunk/Source/WebKit/chromium
- Revision
- 139252
- Author
- [email protected]
- Date
- 2013-01-09 16:18:15 -0800 (Wed, 09 Jan 2013)
Log Message
[chromium] Add a notification when a WebWidget's WebLayerTreeView is about to go away
https://bugs.webkit.org/show_bug.cgi?id=106495
Patch by James Robinson <[email protected]> on 2013-01-09
Reviewed by Adrienne Walker.
The WebWidget / WebLayerTreeView ownership is in a slightly awkward place. I'm moving the ownership
of the WebLayerTreeView to the WebWidgetClient, but to stage things sanely the WebLayerTreeView's
client is sill owned by the WebWidget implementation. Thus to shut down cleanly we need an explicit
notification to the WebWidget that the WebLayerTreeView is going to go away.
This API can go away once the WebWidget implementation does not provide the WebLayerTreeViewClient,
which will take a bit more refactoring.
* public/WebWidget.h:
(WebWidget):
(WebKit::WebWidget::willCloseLayerTreeView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::willCloseLayerTreeView):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (139251 => 139252)
--- trunk/Source/WebKit/chromium/ChangeLog 2013-01-10 00:17:33 UTC (rev 139251)
+++ trunk/Source/WebKit/chromium/ChangeLog 2013-01-10 00:18:15 UTC (rev 139252)
@@ -1,3 +1,27 @@
+2013-01-09 James Robinson <[email protected]>
+
+ [chromium] Add a notification when a WebWidget's WebLayerTreeView is about to go away
+ https://bugs.webkit.org/show_bug.cgi?id=106495
+
+ Reviewed by Adrienne Walker.
+
+ The WebWidget / WebLayerTreeView ownership is in a slightly awkward place. I'm moving the ownership
+ of the WebLayerTreeView to the WebWidgetClient, but to stage things sanely the WebLayerTreeView's
+ client is sill owned by the WebWidget implementation. Thus to shut down cleanly we need an explicit
+ notification to the WebWidget that the WebLayerTreeView is going to go away.
+
+ This API can go away once the WebWidget implementation does not provide the WebLayerTreeViewClient,
+ which will take a bit more refactoring.
+
+ * public/WebWidget.h:
+ (WebWidget):
+ (WebKit::WebWidget::willCloseLayerTreeView):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::willCloseLayerTreeView):
+ (WebKit):
+ * src/WebViewImpl.h:
+ (WebViewImpl):
+
2013-01-09 Mark Pilgrim <[email protected]>
[Chromium] Remove stray references to WebKitPlatformSupport.h
Modified: trunk/Source/WebKit/chromium/public/WebWidget.h (139251 => 139252)
--- trunk/Source/WebKit/chromium/public/WebWidget.h 2013-01-10 00:17:33 UTC (rev 139251)
+++ trunk/Source/WebKit/chromium/public/WebWidget.h 2013-01-10 00:18:15 UTC (rev 139252)
@@ -220,6 +220,10 @@
// to render its contents.
virtual bool isAcceleratedCompositingActive() const { return false; }
+ // The WebLayerTreeView initialized on this WebWidgetClient will be going away and
+ // is no longer safe to access.
+ virtual void willCloseLayerTreeView() { }
+
// Calling WebWidgetClient::requestPointerLock() will result in one
// return call to didAcquirePointerLock() or didNotAcquirePointerLock().
virtual void didAcquirePointerLock() { }
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (139251 => 139252)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-01-10 00:17:33 UTC (rev 139251)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp 2013-01-10 00:18:15 UTC (rev 139252)
@@ -2514,6 +2514,12 @@
#endif
}
+void WebViewImpl::willCloseLayerTreeView()
+{
+ setIsAcceleratedCompositingActive(false);
+ m_layerTreeView = 0;
+}
+
void WebViewImpl::didAcquirePointerLock()
{
#if ENABLE(POINTER_LOCK)
Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (139251 => 139252)
--- trunk/Source/WebKit/chromium/src/WebViewImpl.h 2013-01-10 00:17:33 UTC (rev 139251)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h 2013-01-10 00:18:15 UTC (rev 139252)
@@ -176,6 +176,7 @@
virtual bool caretOrSelectionRange(size_t* location, size_t* length);
virtual void setTextDirection(WebTextDirection direction);
virtual bool isAcceleratedCompositingActive() const;
+ virtual void willCloseLayerTreeView();
virtual void didAcquirePointerLock();
virtual void didNotAcquirePointerLock();
virtual void didLosePointerLock();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes