mirror of
https://github.com/servo/servo.git
synced 2025-09-08 05:58:20 +01:00
Also added some comments to make things clear. For details, see https://github.com/servo/servo/issues/38369#issuecomment-3138378527 Testing: Tested on X11 Ubuntu, Wayland Ubuntu, macOS, Windows. Fixes: #38369 Co-authored-by: minghuaw <michael.wu1107@gmail.com> --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com> Co-authored-by: minghuaw <michael.wu1107@gmail.com>
This commit is contained in:
parent
36f1a373e3
commit
d38781d71d
2 changed files with 19 additions and 1 deletions
|
@ -409,6 +409,9 @@ impl Minibrowser {
|
|||
let rect = Box2D::from_origin_and_size(Point2D::origin(), size);
|
||||
if rect != webview.rect() {
|
||||
webview.move_resize(rect);
|
||||
// `rect` is sized to just the WebView viewport, which is required by
|
||||
// `OffscreenRenderingContext` See:
|
||||
// <https://github.com/servo/servo/issues/38369#issuecomment-3138378527>
|
||||
webview.resize(PhysicalSize::new(size.width as u32, size.height as u32))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue