mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
Implement setting position through webdriver for headed window (#38209)
Previously, we pretend we are able to set position in response. Now we can really do it. Testing: Able to set position accurately when tested locally. Fixes: Task 5 of #37804. --------- Signed-off-by: Euclid Ye <euclid.ye@huawei.com>
This commit is contained in:
parent
cff48d4910
commit
4ff6b1d4a7
7 changed files with 64 additions and 36 deletions
|
@ -480,6 +480,12 @@ impl WindowPortsMethods for Window {
|
|||
|
||||
fn request_resize(&self, _: &WebView, new_outer_size: DeviceIntSize) -> Option<DeviceIntSize> {
|
||||
let outer_size = self.winit_window.outer_size();
|
||||
if outer_size.width == new_outer_size.width as u32 &&
|
||||
outer_size.height == new_outer_size.height as u32
|
||||
{
|
||||
return Some(new_outer_size);
|
||||
}
|
||||
|
||||
let inner_size = self.winit_window.inner_size();
|
||||
let decoration_height = outer_size.height - inner_size.height;
|
||||
let decoration_width = outer_size.width - inner_size.width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue