mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb/HTML: Stop observing lazy-loaded iframes when navigating
This commit is contained in:
parent
0957c59c26
commit
f11347739a
Notes:
github-actions[bot]
2025-01-11 10:11:41 +00:00
Author: https://github.com/AtkinsSJ
Commit: f11347739a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3171
3 changed files with 14 additions and 3 deletions
|
@ -1325,11 +1325,18 @@ WebIDL::ExceptionOr<void> Navigable::navigate(NavigateParams params)
|
|||
return {};
|
||||
}
|
||||
|
||||
// FIXME: 9. Let container be navigable's container.
|
||||
// 10. If container is an iframe element and will lazy load element steps given container returns true,
|
||||
// 9. Let container be navigable's container.
|
||||
auto& container = m_container;
|
||||
|
||||
// FIXME: 10. If container is an iframe element and will lazy load element steps given container returns true,
|
||||
// 10. If container is an iframe element and will lazy load element steps given container returns true,
|
||||
// then stop intersection-observing a lazy loading element container and set container's lazy load resumption steps to null.
|
||||
if (container && container->is_html_iframe_element()) {
|
||||
auto& iframe_element = static_cast<HTMLIFrameElement&>(*container);
|
||||
if (iframe_element.will_lazy_load_element()) {
|
||||
iframe_element.document().stop_intersection_observing_a_lazy_loading_element(iframe_element);
|
||||
iframe_element.set_lazy_load_resumption_steps(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
// 11. If historyHandling is "auto", then:
|
||||
if (history_handling == Bindings::NavigationHistoryBehavior::Auto) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue