mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Replace nested_browsing_context() with content_navigable()
This commit is contained in:
parent
fec4737255
commit
feba8e6218
Notes:
github-actions[bot]
2024-11-03 17:44:43 +00:00
Author: https://github.com/kalenikaliaksandr
Commit: feba8e6218
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2139
3 changed files with 5 additions and 21 deletions
|
@ -204,12 +204,11 @@ void run_focusing_steps(DOM::Node* new_focus_target, DOM::Node* fallback_target,
|
|||
new_focus_target = fallback_target;
|
||||
}
|
||||
|
||||
// 3. If new focus target is a navigable container with non-null nested browsing context,
|
||||
// then set new focus target to the nested browsing context's active document.
|
||||
// 3. If new focus target is a navigable container with non-null content navigable, then set new focus target to the content navigable's active document.
|
||||
if (is<HTML::NavigableContainer>(*new_focus_target)) {
|
||||
auto& navigable_container = static_cast<HTML::NavigableContainer&>(*new_focus_target);
|
||||
if (auto* nested_browsing_context = navigable_container.nested_browsing_context())
|
||||
new_focus_target = nested_browsing_context->active_document();
|
||||
if (auto content_navigable = navigable_container.content_navigable())
|
||||
new_focus_target = content_navigable->active_document();
|
||||
}
|
||||
|
||||
// FIXME: 4. If new focus target is a focusable area and its DOM anchor is inert, then return.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue