mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 09:49:15 +03:00
LibWeb: Stop sending "load" event twice to iframes
The "completely finish loading" algorithm (from the HTML spec) is responsible for sending a "load" event to nested browsing context containers (iframes). This patch removes the old mechanism for sending "load" events, which we had mistakenly kept around, causing two events to be sent instead of one. :^)
This commit is contained in:
parent
58309444d7
commit
108de5dea0
Notes:
sideshowbarker
2024-07-17 23:11:36 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/108de5dea03
@ -56,9 +56,4 @@ const DOM::Document* BrowsingContextContainer::content_document() const
|
||||
return m_nested_browsing_context ? m_nested_browsing_context->active_document() : nullptr;
|
||||
}
|
||||
|
||||
void BrowsingContextContainer::nested_browsing_context_did_load(Badge<FrameLoader>)
|
||||
{
|
||||
dispatch_event(DOM::Event::create(EventNames::load));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -23,8 +23,6 @@ public:
|
||||
Origin content_origin() const;
|
||||
bool may_access_from_origin(const Origin&) const;
|
||||
|
||||
void nested_browsing_context_did_load(Badge<FrameLoader>);
|
||||
|
||||
virtual void inserted() override;
|
||||
|
||||
protected:
|
||||
|
@ -309,9 +309,6 @@ void FrameLoader::resource_did_load()
|
||||
else
|
||||
browsing_context().set_viewport_scroll_offset({ 0, 0 });
|
||||
|
||||
if (auto* container = browsing_context().container())
|
||||
container->nested_browsing_context_did_load({});
|
||||
|
||||
if (auto* page = browsing_context().page())
|
||||
page->client().page_did_finish_loading(url);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user