mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
servoshell(egl): Adjust WebViewRenderer
size when resizing surface size (#39507)
For egl, previously, the resize function only set rendering_context size. It needs to change webview_renderer size at the same time. Testing: Testing the Mossel [homepage](https://www.huaweimossel.com/) on mobile devices shows no issues when resizing. --------- Signed-off-by: yjx <yangjingxiao1@huawei.com> Signed-off-by: Euclid Ye <euclid.ye@huawei.com> Co-authored-by: yjx <yangjingxiao1@huawei.com> Co-authored-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
2e8fac9395
commit
19da3bc14e
1 changed files with 4 additions and 4 deletions
|
@ -565,10 +565,10 @@ impl RunningAppState {
|
|||
/// Let Servo know that the window has been resized.
|
||||
pub fn resize(&self, coordinates: Coordinates) {
|
||||
info!("resize to {:?}", coordinates,);
|
||||
self.active_webview().resize(PhysicalSize::new(
|
||||
coordinates.viewport.width() as u32,
|
||||
coordinates.viewport.height() as u32,
|
||||
));
|
||||
let size = coordinates.viewport.size;
|
||||
self.active_webview().move_resize(size.to_f32().into());
|
||||
self.active_webview()
|
||||
.resize(PhysicalSize::new(size.width as u32, size.height as u32));
|
||||
*self.callbacks.coordinates.borrow_mut() = coordinates;
|
||||
self.perform_updates();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue