fix osr window initial sizing

This commit is contained in:
Heilig Benedek 2017-05-11 23:48:14 +02:00
parent 1b1c663b32
commit 9f682ee36b
2 changed files with 13 additions and 0 deletions

View file

@ -1644,6 +1644,18 @@ void WebContents::Invalidate() {
}
}
gfx::Size WebContents::GetSizeForNewRenderView(
content::WebContents* wc) const {
if (IsOffScreen() && wc == web_contents()) {
auto relay = NativeWindowRelay::FromWebContents(web_contents());
if (relay) {
return relay->window->GetSize();
}
}
return gfx::Size();
}
void WebContents::SetZoomLevel(double level) {
zoom_controller_->SetZoomLevel(level);
}