LibWeb: Extract some Internals functionality to a base class

This will just allow re-using these definitions on other internal pages.
This commit is contained in:
Timothy Flynn 2025-03-16 09:32:07 -04:00 committed by Tim Flynn
commit 9dcbf5562a
Notes: github-actions[bot] 2025-03-19 14:04:52 +00:00
5 changed files with 87 additions and 37 deletions

View file

@ -6,15 +6,15 @@
#pragma once
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/Internals/InternalAnimationTimeline.h>
#include <LibWeb/Internals/InternalsBase.h>
#include <LibWeb/UIEvents/MouseButton.h>
#include <LibWeb/WebIDL/Types.h>
namespace Web::Internals {
class Internals final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(Internals, Bindings::PlatformObject);
class Internals final : public InternalsBase {
WEB_PLATFORM_OBJECT(Internals, InternalsBase);
GC_DECLARE_ALLOCATOR(Internals);
public:
@ -62,13 +62,11 @@ public:
private:
explicit Internals(JS::Realm&);
virtual void initialize(JS::Realm&) override;
void click(double x, double y, UIEvents::MouseButton);
void mouse_down(double x, double y, UIEvents::MouseButton);
HTML::Window& internals_window() const;
Page& internals_page() const;
};
}