mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
LibWeb: Update focus_chain()
to use navigables
This commit is contained in:
parent
38034237c5
commit
6411fea552
1 changed files with 5 additions and 5 deletions
|
@ -142,12 +142,12 @@ static Vector<JS::Handle<DOM::Node>> focus_chain(DOM::Node* subject)
|
|||
// 3. If currentObject is a focusable area, then set currentObject to currentObject's DOM anchor's node document.
|
||||
current_object = ¤t_object->document();
|
||||
} else if (is<DOM::Document>(*current_object)
|
||||
&& static_cast<DOM::Document&>(*current_object).browsing_context()
|
||||
&& !static_cast<DOM::Document&>(*current_object).browsing_context()->is_top_level()) {
|
||||
// Otherwise, if currentObject is a Document whose browsing context is a child browsing context,
|
||||
// then set currentObject to currentObject's browsing context's container.
|
||||
current_object = static_cast<DOM::Document&>(*current_object).browsing_context()->container();
|
||||
&& current_object->navigable()
|
||||
&& current_object->navigable()->parent()) {
|
||||
// Otherwise, if currentObject is a Document whose node navigable's parent is non-null, then set currentObject to currentObject's node navigable's parent.
|
||||
current_object = current_object->navigable()->container();
|
||||
} else {
|
||||
// Otherwise, break.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue