mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
script: Get the screen metrics from the WebViewDelegate
instead of via the compositor (#38020)
Similar to #37960, previously, `AvailHeight`, `AvailWidth`, `Height`, `Width` ask compositor for screen metrics. This PR moves the request to embedder. This simplifies code, and reduces workload of compositor, which is busier most of time. Testing: No behaviour change. Updated some tests. `Width/Height` matches other browsers. --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
parent
d0a93a8b02
commit
d38ffb82b2
11 changed files with 79 additions and 102 deletions
|
@ -215,6 +215,7 @@ mod from_script {
|
|||
Self::NewFavicon(..) => target_variant!("NewFavicon"),
|
||||
Self::HistoryChanged(..) => target_variant!("HistoryChanged"),
|
||||
Self::GetWindowRect(..) => target_variant!("GetWindowRect"),
|
||||
Self::GetScreenMetrics(..) => target_variant!("GetScreenMetrics"),
|
||||
Self::NotifyFullscreenStateChanged(..) => {
|
||||
target_variant!("NotifyFullscreenStateChanged")
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue