• danakj's avatar
    Only call OnSynchronizeVisualProperties in RenderView creation for a local frame · cfe54a6a
    danakj authored
    The CreateRenderView IPC comes with a set of VisualProperties for the local
    main frame, and they should be set on the RenderWidget similar to how we do
    so for the CreateFrame IPC so that blink reads valid things off the
    RenderWidget while it exists and is not undead.
    
    However when the RenderWidget is undead, there is no local frame, so stop
    calling OnSynchronizeVisualProperties. The VisualProperties will be passed
    along in the future with CreateFrame in that case and set when the
    RenderWidget is reanimated.
    
    We must not call UpdateWebViewWithDeviceScaleFactor() after calling
    OnSynchronizeVisualProperties() as it dirties the compositor state, and
    Android WebView expects the compositor state to be clean when it sends an
    IPC to set the base background colour. The OnSynchronizeVisualProperties()
    does a Resize of the WebView which runs the document lifecycle and cleans
    the compositor state. So this also removes the call to that from
    RenderViewImpl, and places it with the OnSynchronizeVisualProperties call
    in RenderFrameImpl.
    
    The true purpose of UpdateWebViewWithDeviceScaleFactor() is to propagate
    the page zoom factor down to a new LocalFrame, and so it only needs to be
    called when the main frame is local as well.
    
    R=erikchen@chromium.org
    
    Change-Id: Idd06d7af65ebd01ceec03ec9591445eb7805f413
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1805873
    Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    Auto-Submit: danakj <danakj@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarErik Chen <erikchen@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#697327}
    cfe54a6a
render_frame_impl.cc 316 KB