mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Enable screen.availHeight/availWidth/Height/Width
This commit is contained in:
parent
657b2339a1
commit
c120234f0e
16 changed files with 138 additions and 84 deletions
|
@ -395,6 +395,22 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
|
|||
}
|
||||
},
|
||||
|
||||
(EmbedderMsg::GetScreenSize(top_level_browsing_context, send),
|
||||
ShutdownState::NotShuttingDown) => {
|
||||
let rect = self.compositor.window.screen_size(top_level_browsing_context);
|
||||
if let Err(e) = send.send(rect) {
|
||||
warn!("Sending response to get screen size failed ({}).", e);
|
||||
}
|
||||
},
|
||||
|
||||
(EmbedderMsg::GetScreenAvailSize(top_level_browsing_context, send),
|
||||
ShutdownState::NotShuttingDown) => {
|
||||
let rect = self.compositor.window.screen_avail_size(top_level_browsing_context);
|
||||
if let Err(e) = send.send(rect) {
|
||||
warn!("Sending response to get screen available size failed ({}).", e);
|
||||
}
|
||||
},
|
||||
|
||||
(EmbedderMsg::AllowNavigation(top_level_browsing_context,
|
||||
url,
|
||||
response_chan),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue