mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 18:47:15 +02:00
LibWeb: Bring BrowsingContext::choose_a_browsing_context closer to spec
This commit is contained in:
committed by
Linus Groh
parent
c948873c5b
commit
ff2f31bc81
Notes:
sideshowbarker
2024-07-17 04:26:38 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/ff2f31bc81 Pull-request: https://github.com/SerenityOS/serenity/pull/16072 Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/trflynn89
@@ -493,7 +493,7 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<String> hyperlink_
|
||||
// 7. Let target be the first return value of applying the rules for
|
||||
// choosing a browsing context given targetAttributeValue, source, and
|
||||
// noopener.
|
||||
auto* target = source->choose_a_browsing_context(target_attribute_value, noopener);
|
||||
auto target = source->choose_a_browsing_context(target_attribute_value, noopener).browsing_context;
|
||||
|
||||
// 8. If target is null, then return.
|
||||
if (!target)
|
||||
@@ -534,7 +534,7 @@ void HTMLHyperlinkElementUtils::follow_the_hyperlink(Optional<String> hyperlink_
|
||||
// set to source.
|
||||
// FIXME: "navigate" means implementing the navigation algorithm here:
|
||||
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate
|
||||
hyperlink_element_utils_queue_an_element_task(Task::Source::DOMManipulation, [url_string, target] {
|
||||
hyperlink_element_utils_queue_an_element_task(Task::Source::DOMManipulation, [url_string, &target] {
|
||||
target->loader().load(url_string, FrameLoader::Type::Navigation);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user