Open links and images in new browser tabs
- A middle-click on a link opens the link in a new tab. Scrolling starts at once, as before. The new engine command linkAt reads the link under the pointer in an isolated world. When it finds a web link, the tab stops the scroll and opens the link. - The image menu of a page starts with Open image in new tab. A new tab opens in front, like Open link in new tab. The engine smoke test checks linkAt, and the interaction test checks both actions with the real engine. Cards 333909d1 and f7ee842d.
This commit is contained in:
@@ -35,6 +35,7 @@ const COMMANDS: &[&str] = &[
|
||||
"edit",
|
||||
"contextAction",
|
||||
"copiedImage",
|
||||
"linkAt",
|
||||
"frameAck",
|
||||
"createProfile",
|
||||
"renameProfile",
|
||||
@@ -481,7 +482,7 @@ impl BrowserState {
|
||||
let _ = app.emit_to(&source, "browser-tab-moved", json!({ "tabId": id }));
|
||||
return Ok(worker.routing.lock()?.snapshot(result, owner));
|
||||
}
|
||||
if ["closeTab", "navigate", "back", "forward", "reload", "stop", "find", "stopFind", "openExternal", "moveToWindow", "resize", "visible", "focus", "input", "insertText", "edit", "contextAction", "copiedImage", "frameAck", "bookmark", "agentSnapshot"].contains(&command) {
|
||||
if ["closeTab", "navigate", "back", "forward", "reload", "stop", "find", "stopFind", "openExternal", "moveToWindow", "resize", "visible", "focus", "input", "insertText", "edit", "contextAction", "copiedImage", "linkAt", "frameAck", "bookmark", "agentSnapshot"].contains(&command) {
|
||||
let id = args["tabId"].as_str().ok_or("Invalid browser tab.")?;
|
||||
match worker.routing.lock()?.owners.get(id) {
|
||||
Some(window) if window == owner => {},
|
||||
|
||||
Reference in New Issue
Block a user