mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 07:22:21 +00:00
LibWeb: Stub out "focus-without-user-activation" feature policy
For now this always returns that focus is allowed, as that matches our
previous behavior.
Corresponds to d7053d86ad
This commit is contained in:
parent
7902d13c28
commit
70e3a48892
Notes:
github-actions[bot]
2025-03-14 20:34:25 +00:00
Author: https://github.com/AtkinsSJ
Commit: 70e3a48892
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3945
Reviewed-by: https://github.com/tcl3 ✅
5 changed files with 62 additions and 15 deletions
|
@ -910,12 +910,16 @@ void Window::focus()
|
|||
if (!current)
|
||||
return;
|
||||
|
||||
// 3. Run the focusing steps with current.
|
||||
// 3. If the allow focus steps given current's active document return false, then return.
|
||||
if (!document()->allow_focus())
|
||||
return;
|
||||
|
||||
// 4. Run the focusing steps with current.
|
||||
// FIXME: We should pass in the browsing context itself instead of the active document, however the focusing steps don't currently accept browsing contexts.
|
||||
// Passing in a browsing context always makes it resolve to its active document for focus, so this is fine for now.
|
||||
run_focusing_steps(current->active_document());
|
||||
|
||||
// FIXME: 4. If current is a top-level traversable, user agents are encouraged to trigger some sort of notification to
|
||||
// FIXME: 5. If current is a top-level traversable, user agents are encouraged to trigger some sort of notification to
|
||||
// indicate to the user that the page is attempting to gain focus.
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue