mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
LibWeb: Flesh out some of process_the_iframe_attributes()
This commit is contained in:
parent
1d6f06b203
commit
6154681718
1 changed files with 28 additions and 7 deletions
|
@ -73,10 +73,22 @@ void HTMLIFrameElement::process_the_iframe_attributes(bool initial_insertion)
|
||||||
|
|
||||||
// 2. If the will lazy load element steps given element return true, then:
|
// 2. If the will lazy load element steps given element return true, then:
|
||||||
if (will_lazy_load_element()) {
|
if (will_lazy_load_element()) {
|
||||||
// FIXME: 1. Set element's lazy load resumption steps to the rest of this algorithm starting with the step labeled navigate to the srcdoc resource.
|
// 1. Set element's lazy load resumption steps to the rest of this algorithm starting with the step labeled navigate to the srcdoc resource.
|
||||||
// FIXME: 2. Set element's current navigation was lazy loaded boolean to true.
|
set_lazy_load_resumption_steps([this]() {
|
||||||
// FIXME: 3. Start intersection-observing a lazy loading element for element.
|
// 3. Navigate to the srcdoc resource: navigate an iframe or frame given element, about:srcdoc, the empty string, and the value of element's srcdoc attribute.
|
||||||
// FIXME: 4. Return.
|
navigate_an_iframe_or_frame(AK::URL("about:srcdoc"sv), ReferrerPolicy::ReferrerPolicy::EmptyString, get_attribute(HTML::AttributeNames::srcdoc));
|
||||||
|
|
||||||
|
// FIXME: The resulting Document must be considered an iframe srcdoc document.
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2. Set element's current navigation was lazy loaded boolean to true.
|
||||||
|
m_current_navigation_was_lazy_loaded = true;
|
||||||
|
|
||||||
|
// 3. Start intersection-observing a lazy loading element for element.
|
||||||
|
document().start_intersection_observing_a_lazy_loading_element(*this);
|
||||||
|
|
||||||
|
// 4. Return.
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Navigate to the srcdoc resource: navigate an iframe or frame given element, about:srcdoc, the empty string, and the value of element's srcdoc attribute.
|
// 3. Navigate to the srcdoc resource: navigate an iframe or frame given element, about:srcdoc, the empty string, and the value of element's srcdoc attribute.
|
||||||
|
@ -112,9 +124,18 @@ void HTMLIFrameElement::process_the_iframe_attributes(bool initial_insertion)
|
||||||
|
|
||||||
// 6. If the will lazy load element steps given element return true, then:
|
// 6. If the will lazy load element steps given element return true, then:
|
||||||
if (will_lazy_load_element()) {
|
if (will_lazy_load_element()) {
|
||||||
// FIXME: 1. Set element's lazy load resumption steps to the rest of this algorithm starting with the step labeled navigate.
|
// 1. Set element's lazy load resumption steps to the rest of this algorithm starting with the step labeled navigate.
|
||||||
// FIXME: 2. Set element's current navigation was lazy loaded boolean to true.
|
set_lazy_load_resumption_steps([this, url, referrer_policy]() {
|
||||||
// FIXME: 3. Start intersection-observing a lazy loading element for element.
|
// 7. Navigate: navigate an iframe or frame given element, url, and referrerPolicy.
|
||||||
|
navigate_an_iframe_or_frame(*url, referrer_policy);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 2. Set element's current navigation was lazy loaded boolean to true.
|
||||||
|
m_current_navigation_was_lazy_loaded = true;
|
||||||
|
|
||||||
|
// 3. Start intersection-observing a lazy loading element for element.
|
||||||
|
document().start_intersection_observing_a_lazy_loading_element(*this);
|
||||||
|
|
||||||
// 4. Return.
|
// 4. Return.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue