Only do the trick when window is hidden

This commit is contained in:
Cheng Zhao 2016-06-13 22:18:57 +09:00
parent 8a50a1b9d3
commit f7f86160c1

View file

@ -561,6 +561,9 @@ void NativeWindow::BeforeUnloadDialogCancelled() {
}
void NativeWindow::DidFirstVisuallyNonEmptyPaint() {
if (IsVisible())
return;
// When there is a non-empty first paint, resize the RenderWidget to force
// Chromium to draw.
const auto view = web_contents()->GetRenderWidgetHostView();