mirror of
https://github.com/servo/servo.git
synced 2025-08-29 00:58:20 +01:00
webdriver: Move NewWebView
, FocusWebView
, GetWindowSize
, and SetWindowSize
to servoshell (#37555)
Follow up to: https://github.com/servo/servo/pull/36714 Moving webdriver [context commands](https://www.w3.org/TR/webdriver2/#contexts) to be handled in embedder: - [x] New Window command - `WebdriverCommandMsg::NewWebView` - [x] Switch To Window command - `WebdriverCommandMsg::FocusWebView` - [x] Resizing commands cc: @xiaochengh --------- Signed-off-by: batu_hoang <longvatrong111@gmail.com>
This commit is contained in:
parent
5ea003752a
commit
d970584332
8 changed files with 148 additions and 97 deletions
|
@ -336,11 +336,11 @@ impl RunningAppState {
|
|||
}),
|
||||
});
|
||||
|
||||
app_state.new_toplevel_webview(initial_url);
|
||||
app_state.create_and_focus_toplevel_webview(initial_url);
|
||||
app_state
|
||||
}
|
||||
|
||||
pub(crate) fn new_toplevel_webview(self: &Rc<Self>, url: Url) {
|
||||
pub(crate) fn create_and_focus_toplevel_webview(self: &Rc<Self>, url: Url) {
|
||||
let webview = WebViewBuilder::new(&self.servo)
|
||||
.url(url)
|
||||
.hidpi_scale_factor(self.inner().hidpi_scale_factor)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue