1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:47:47 +00:00

LibWeb: Cleanup unecessary uses and includes of HTML::Window

The big global refactor left some stragglers behind for atomicity.

Clean up the rest, and remove a ton of includes of LibWeb/HTML/Window.h
This commit is contained in:
Andrew Kaster 2022-09-30 17:16:16 -06:00 committed by Linus Groh
parent cc164dc1e2
commit 56b381aac0
88 changed files with 76 additions and 169 deletions

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/DOM/Document.h>
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/DOM/Node.h>
#include <LibWeb/DOM/NodeFilter.h>
#include <LibWeb/DOM/TreeWalker.h>
@ -35,8 +35,8 @@ JS::NonnullGCPtr<TreeWalker> TreeWalker::create(Node& root, unsigned what_to_sho
{
// 1. Let walker be a new TreeWalker object.
// 2. Set walkers root and walkers current to root.
auto& window_object = root.document().window();
auto* walker = window_object.heap().allocate<TreeWalker>(window_object.realm(), root);
auto& realm = root.realm();
auto* walker = realm.heap().allocate<TreeWalker>(realm, root);
// 3. Set walkers whatToShow to whatToShow.
walker->m_what_to_show = what_to_show;