mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 22:49:47 +00:00
LibWeb: Update focusing spec steps
Update a couple of focus-related spec steps and their implementations. The most relevant change is that we no longer allow focusing on elements that return false for `->is_focusable()`, which necessitates fixing a broken test that tried to `.focus()` on `<div>`s that were not focusable. That test's output now more accurately reflects the expected outcome as seen in other browsers.
This commit is contained in:
parent
cc19dd3fb0
commit
65910dc343
Notes:
github-actions[bot]
2025-08-26 08:27:05 +00:00
Author: https://github.com/gmta
Commit: 65910dc343
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5952
5 changed files with 79 additions and 71 deletions
|
@ -3540,7 +3540,9 @@ bool Document::allow_focus() const
|
|||
if (is_allowed_to_use_feature(PolicyControlledFeature::FocusWithoutUserActivation))
|
||||
return true;
|
||||
|
||||
// FIXME: 2. If target's relevant global object has transient activation, then return true.
|
||||
// 2. If target's relevant global object has transient activation, then return true.
|
||||
if (as<HTML::Window>(HTML::relevant_global_object(*this)).has_transient_activation())
|
||||
return true;
|
||||
|
||||
// 3. Return false.
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue