Fix crash when resizing an OSR browser window (fixes issue #2614)

(cherry picked from commit feffedbae9)
This commit is contained in:
Riku Palomäki 2019-11-26 18:42:34 +00:00 committed by Marshall Greenblatt
parent a90c9f9c3e
commit c4284b2938
2 changed files with 17 additions and 0 deletions

View File

@ -691,6 +691,17 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() {
return GetViewBounds();
}
#if !defined(OS_MACOSX)
viz::ScopedSurfaceIdAllocator
CefRenderWidgetHostViewOSR::DidUpdateVisualProperties(
const cc::RenderFrameMetadata& metadata) {
base::OnceCallback<void()> allocation_task =
base::BindOnce(&CefRenderWidgetHostViewOSR::SynchronizeVisualProperties,
weak_ptr_factory_.GetWeakPtr(), false);
return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
}
#endif
viz::SurfaceId CefRenderWidgetHostViewOSR::GetCurrentSurfaceId() const {
return GetDelegatedFrameHost()
? GetDelegatedFrameHost()->GetCurrentSurfaceId()

View File

@ -163,6 +163,12 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
void GetScreenInfo(content::ScreenInfo* results) override;
void TransformPointToRootSurface(gfx::PointF* point) override;
gfx::Rect GetBoundsInRootWindow() override;
#if !defined(OS_MACOSX)
viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties(
const cc::RenderFrameMetadata& metadata) override;
#endif
viz::SurfaceId GetCurrentSurfaceId() const override;
content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
content::BrowserAccessibilityDelegate* delegate,