Move SetBackgroundColor handling from RenderViewImpl to RenderWidget
The SetBackgroundColor IPC has been recently moved from RenderView to RenderWidget, but the RenderWidget still delegates handling of it back to the RenderView. The RenderView then sets the background color on its |frame_widget_| which is a WebFrameWidget attached to it in RenderViewImpl::Initialize() via RenderFrameImpl::CreateMainFrame(). All RenderViewImpls do have a frame_widget_, since RenderViewImpl ends up setting that. So RenderWidget::GetWebWidget() will always return that frame_widget_ once RenderViewImpl::Initialize() has completed. There is a space of time after RenderWidget::Init() but inside RenderViewImpl::Initialize() where it would return a different WebWidget (the WebWidget on the WebViewImpl directly), but SetBackgroundOpaque IPC will not be received and handled during that time. So it is safe to use the frame_widget_ from the RenderViewImpl via RenderWidget::GetWebWidget() directly. And thus RenderWidget can set the background opaque on its WebFrameWidget without going through RenderViewImpl (other than to get the WebWidget). R=avi@chromium.org Bug: 419087 Change-Id: I65bf680a24a6312f1c1d569d2023666cbc53e8f6 Reviewed-on: https://chromium-review.googlesource.com/1239169Reviewed-by:Avi Drissman <avi@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/master@{#594058}
Showing
Please register or sign in to comment