From 44d7c9d4cbbe8e74c1089fc7334c33d387c6d1ac Mon Sep 17 00:00:00 2001 From: "ojan@chromium.org" Date: Tue, 22 Apr 2014 14:41:03 +0000 Subject: Mark WebViewClient subclasses that return a null layerTreeView. In a followup blink-side patch, returning a null layerTreeView without returning true from allowsBrokenNullLayerTreeView will assert. Soon, we'll delete the null layerTreeView codepath entirely. This is to make sure we have all the cases identified and so that new ones don't get added. Remove the null-check in RenderWidget::initializeLayerTreeView. It never sets compositor_ to null and on the blink side we assert as such. Review URL: https://codereview.chromium.org/242953005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265252 0039d316-1c4b-4281-b951-d872f2087c98 --- components/plugins/renderer/webview_plugin.cc | 4 ++++ components/plugins/renderer/webview_plugin.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'components/plugins/renderer') diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc index 6095e2b..b1df67c 100644 --- a/components/plugins/renderer/webview_plugin.cc +++ b/components/plugins/renderer/webview_plugin.cc @@ -219,6 +219,10 @@ void WebViewPlugin::startDragging(WebLocalFrame*, web_view_->dragSourceSystemDragEnded(); } +bool WebViewPlugin::allowsBrokenNullLayerTreeView() const { + return true; +} + void WebViewPlugin::didInvalidateRect(const WebRect& rect) { if (container_) container_->invalidateRect(rect); diff --git a/components/plugins/renderer/webview_plugin.h b/components/plugins/renderer/webview_plugin.h index af352ec..8c17c51 100644 --- a/components/plugins/renderer/webview_plugin.h +++ b/components/plugins/renderer/webview_plugin.h @@ -116,6 +116,10 @@ class WebViewPlugin : public blink::WebPlugin, const blink::WebImage& image, const blink::WebPoint& point); + // TODO(ojan): Remove this override and have this class use a non-null + // layerTreeView. + virtual bool allowsBrokenNullLayerTreeView() const; + // WebWidgetClient methods: virtual void didInvalidateRect(const blink::WebRect&); virtual void didChangeCursor(const blink::WebCursorInfo& cursor); -- cgit v1.1