fix osr window initial sizing
This commit is contained in:
parent
1b1c663b32
commit
9f682ee36b
2 changed files with 13 additions and 0 deletions
|
@ -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) {
|
void WebContents::SetZoomLevel(double level) {
|
||||||
zoom_controller_->SetZoomLevel(level);
|
zoom_controller_->SetZoomLevel(level);
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
|
||||||
void SetFrameRate(int frame_rate);
|
void SetFrameRate(int frame_rate);
|
||||||
int GetFrameRate() const;
|
int GetFrameRate() const;
|
||||||
void Invalidate();
|
void Invalidate();
|
||||||
|
gfx::Size GetSizeForNewRenderView(content::WebContents*) const override;
|
||||||
|
|
||||||
// Methods for zoom handling.
|
// Methods for zoom handling.
|
||||||
void SetZoomLevel(double level);
|
void SetZoomLevel(double level);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue