mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
LibWeb: Get ResizeObserver::m_document from Window directly
We don't have to go via the window's navigable to find the document we're being created for. It's right there on the window.
This commit is contained in:
committed by
Andreas Kling
parent
d36e5098f8
commit
652e52d76a
Notes:
github-actions[bot]
2025-09-28 17:26:23 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/652e52d76ab Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6332
@@ -27,8 +27,7 @@ ResizeObserver::ResizeObserver(JS::Realm& realm, WebIDL::CallbackType* callback)
|
||||
: PlatformObject(realm)
|
||||
, m_callback(callback)
|
||||
{
|
||||
auto navigable = as<HTML::Window>(HTML::relevant_global_object(*this)).navigable();
|
||||
m_document = navigable->active_document().ptr();
|
||||
m_document = as<HTML::Window>(HTML::relevant_global_object(*this)).document().ptr();
|
||||
}
|
||||
|
||||
ResizeObserver::~ResizeObserver() = default;
|
||||
|
||||
Reference in New Issue
Block a user