mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00: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:
parent
d36e5098f8
commit
652e52d76a
Notes:
github-actions[bot]
2025-09-28 17:26:23 +00:00
Author: https://github.com/awesomekling
Commit: 652e52d76a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6332
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue