Fix crash when resizing an OSR browser window (fixes issue #2614)
(cherry picked from commit feffedbae9
)
This commit is contained in:
parent
a90c9f9c3e
commit
c4284b2938
|
@ -691,6 +691,17 @@ gfx::Rect CefRenderWidgetHostViewOSR::GetBoundsInRootWindow() {
|
||||||
return GetViewBounds();
|
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 {
|
viz::SurfaceId CefRenderWidgetHostViewOSR::GetCurrentSurfaceId() const {
|
||||||
return GetDelegatedFrameHost()
|
return GetDelegatedFrameHost()
|
||||||
? GetDelegatedFrameHost()->GetCurrentSurfaceId()
|
? GetDelegatedFrameHost()->GetCurrentSurfaceId()
|
||||||
|
|
|
@ -163,6 +163,12 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase,
|
||||||
void GetScreenInfo(content::ScreenInfo* results) override;
|
void GetScreenInfo(content::ScreenInfo* results) override;
|
||||||
void TransformPointToRootSurface(gfx::PointF* point) override;
|
void TransformPointToRootSurface(gfx::PointF* point) override;
|
||||||
gfx::Rect GetBoundsInRootWindow() override;
|
gfx::Rect GetBoundsInRootWindow() override;
|
||||||
|
|
||||||
|
#if !defined(OS_MACOSX)
|
||||||
|
viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties(
|
||||||
|
const cc::RenderFrameMetadata& metadata) override;
|
||||||
|
#endif
|
||||||
|
|
||||||
viz::SurfaceId GetCurrentSurfaceId() const override;
|
viz::SurfaceId GetCurrentSurfaceId() const override;
|
||||||
content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
|
content::BrowserAccessibilityManager* CreateBrowserAccessibilityManager(
|
||||||
content::BrowserAccessibilityDelegate* delegate,
|
content::BrowserAccessibilityDelegate* delegate,
|
||||||
|
|
Loading…
Reference in New Issue