mirror of
https://github.com/servo/servo.git
synced 2025-08-12 17:05:33 +01:00
refactor(webdriver): move webdriver_port
option to servoshell pref (#37867)
Move `webdriver_port` option from servo config options to servoshell preference. Testing: run `./mach run` with/without `--webdriver` option and see if the webdriver server runs on the port (default: 7000) Fixes: https://github.com/servo/servo/issues/37843 Signed-off-by: Jason Tsai <git@pews.dev>
This commit is contained in:
parent
6ba54e4d79
commit
cf408f7302
4 changed files with 14 additions and 15 deletions
|
@ -12,7 +12,7 @@ use euclid::Vector2D;
|
|||
use keyboard_types::{Key, Modifiers, ShortcutMatcher};
|
||||
use log::{error, info};
|
||||
use servo::base::id::WebViewId;
|
||||
use servo::config::{opts, pref};
|
||||
use servo::config::pref;
|
||||
use servo::ipc_channel::ipc::IpcSender;
|
||||
use servo::webrender_api::ScrollLocation;
|
||||
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntSize};
|
||||
|
@ -500,7 +500,7 @@ impl WebViewDelegate for RunningAppState {
|
|||
// When WebDriver is enabled, do not focus and raise the WebView to the top,
|
||||
// as that is what the specification expects. Otherwise, we would like `window.open()`
|
||||
// to create a new foreground tab
|
||||
if opts::get().webdriver_port.is_none() {
|
||||
if self.servoshell_preferences.webdriver_port.is_none() {
|
||||
webview.focus();
|
||||
webview.raise_to_top(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue