mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-04 01:12:56 +00:00
LibWeb: Make HTMLIFrameElement a LazyLoadingElement
This replaces its previous partial implementation of the lazy loading scaffolding. It still doesn't actually load lazily yet.
This commit is contained in:
parent
cc633123ca
commit
1d6f06b203
Notes:
sideshowbarker
2024-07-16 22:54:10 +09:00
Author: https://github.com/AtkinsSJ
Commit: 1d6f06b203
Pull-request: https://github.com/SerenityOS/serenity/pull/22045
Issue: https://github.com/SerenityOS/serenity/issues/22012
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/kalenikaliaksandr ✅
2 changed files with 16 additions and 17 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020-2021, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -59,19 +60,6 @@ void HTMLIFrameElement::inserted()
|
|||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#will-lazy-load-element-steps
|
||||
bool HTMLIFrameElement::will_lazy_load_element() const
|
||||
{
|
||||
// 1. If scripting is disabled for element, then return false.
|
||||
if (document().is_scripting_disabled())
|
||||
return false;
|
||||
|
||||
// FIXME: 2. If element's lazy loading attribute is in the Lazy state, then return true.
|
||||
|
||||
// 3. Return false.
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/iframe-embed-object.html#process-the-iframe-attributes
|
||||
void HTMLIFrameElement::process_the_iframe_attributes(bool initial_insertion)
|
||||
{
|
||||
|
@ -188,4 +176,10 @@ i32 HTMLIFrameElement::default_tab_index_value() const
|
|||
return 0;
|
||||
}
|
||||
|
||||
void HTMLIFrameElement::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visit_lazy_loading_element(visitor);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue