1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:38:13 +00:00

LibWeb: Put most LibWeb GC objects in type-specific heap blocks

With this change, we now have ~1200 CellAllocators across both LibJS and
LibWeb in a normal WebContent instance.

This gives us a minimum heap size of 4.7 MiB in the scenario where we
only have one cell allocated per type. Of course, in practice there will
be many more of each type, so the effective overhead is quite a bit
smaller than that in practice.

I left a few types unconverted to this mechanism because I got tired of
doing this. :^)
This commit is contained in:
Andreas Kling 2023-11-19 19:47:52 +01:00
parent 536596632b
commit bfd354492e
599 changed files with 933 additions and 3 deletions

View file

@ -20,6 +20,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(AudioTrack);
static IDAllocator s_audio_track_id_allocator;
AudioTrack::AudioTrack(JS::Realm& realm, JS::NonnullGCPtr<HTMLMediaElement> media_element, NonnullRefPtr<Audio::Loader> loader)

View file

@ -15,6 +15,7 @@ namespace Web::HTML {
class AudioTrack final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(AudioTrack, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(AudioTrack);
public:
virtual ~AudioTrack() override;

View file

@ -13,6 +13,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(AudioTrackList);
AudioTrackList::AudioTrackList(JS::Realm& realm)
: DOM::EventTarget(realm, MayInterfereWithIndexedPropertyAccess::Yes)
, m_audio_tracks(realm.heap())

View file

@ -16,6 +16,7 @@ namespace Web::HTML {
class AudioTrackList final : public DOM::EventTarget {
WEB_PLATFORM_OBJECT(AudioTrackList, DOM::EventTarget);
JS_DECLARE_ALLOCATOR(AudioTrackList);
public:
ErrorOr<void> add_track(Badge<HTMLMediaElement>, JS::NonnullGCPtr<AudioTrack>);

View file

@ -37,6 +37,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(BrowsingContext);
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#matches-about:blank
bool url_matches_about_blank(AK::URL const& url)
{

View file

@ -35,6 +35,7 @@ class BrowsingContext final
: public AbstractBrowsingContext
, public Weakable<BrowsingContext> {
JS_CELL(BrowsingContext, AbstractBrowsingContext);
JS_DECLARE_ALLOCATOR(BrowsingContext);
public:
struct BrowsingContextAndDocument {

View file

@ -11,6 +11,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(BrowsingContextGroup);
// https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-group-set
static HashTable<JS::NonnullGCPtr<BrowsingContextGroup>>& user_agent_browsing_context_group_set()
{

View file

@ -16,6 +16,7 @@ namespace Web::HTML {
class BrowsingContextGroup final : public JS::Cell {
JS_CELL(BrowsingContextGroup, JS::Cell);
JS_DECLARE_ALLOCATOR(BrowsingContextGroup);
public:
struct BrowsingContextGroupAndDocument {

View file

@ -12,6 +12,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(CanvasGradient);
// https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-createradialgradient
WebIDL::ExceptionOr<JS::NonnullGCPtr<CanvasGradient>> CanvasGradient::create_radial(JS::Realm& realm, double x0, double y0, double r0, double x1, double y1, double r1)
{

View file

@ -14,6 +14,7 @@ namespace Web::HTML {
class CanvasGradient final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(CanvasGradient, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(CanvasGradient);
public:
static WebIDL::ExceptionOr<JS::NonnullGCPtr<CanvasGradient>> create_radial(JS::Realm&, double x0, double y0, double r0, double x1, double y1, double r1);

View file

@ -11,6 +11,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(CanvasPattern);
void CanvasPatternPaintStyle::paint(Gfx::IntRect physical_bounding_box, PaintFunction paint) const
{
// 1. Create an infinite transparent black bitmap.

View file

@ -41,6 +41,7 @@ private:
class CanvasPattern final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(CanvasPattern, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(CanvasPattern);
public:
static WebIDL::ExceptionOr<JS::GCPtr<CanvasPattern>> create(JS::Realm&, CanvasImageSource const& image, StringView repetition);

View file

@ -26,6 +26,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(CanvasRenderingContext2D);
JS::NonnullGCPtr<CanvasRenderingContext2D> CanvasRenderingContext2D::create(JS::Realm& realm, HTMLCanvasElement& element)
{
return realm.heap().allocate<CanvasRenderingContext2D>(realm, realm, element);

View file

@ -58,6 +58,7 @@ class CanvasRenderingContext2D
, public CanvasTextDrawingStyles<CanvasRenderingContext2D> {
WEB_PLATFORM_OBJECT(CanvasRenderingContext2D, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(CanvasRenderingContext2D);
public:
[[nodiscard]] static JS::NonnullGCPtr<CanvasRenderingContext2D> create(JS::Realm&, HTMLCanvasElement&);

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(CloseEvent);
JS::NonnullGCPtr<CloseEvent> CloseEvent::create(JS::Realm& realm, FlyString const& event_name, CloseEventInit const& event_init)
{
return realm.heap().allocate<CloseEvent>(realm, realm, event_name, event_init);

View file

@ -20,6 +20,7 @@ struct CloseEventInit : public DOM::EventInit {
class CloseEvent : public DOM::Event {
WEB_PLATFORM_OBJECT(CloseEvent, DOM::Event);
JS_DECLARE_ALLOCATOR(CloseEvent);
public:
[[nodiscard]] static JS::NonnullGCPtr<CloseEvent> create(JS::Realm&, FlyString const& event_name, CloseEventInit const& event_init = {});

View file

@ -18,6 +18,7 @@ struct AlreadyConstructedCustomElementMarker {
// https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-definition
class CustomElementDefinition : public JS::Cell {
JS_CELL(CustomElementDefinition, JS::Cell);
JS_DECLARE_ALLOCATOR(CustomElementDefinition);
using LifecycleCallbacksStorage = OrderedHashMap<FlyString, JS::Handle<WebIDL::CallbackType>>;
using ConstructionStackStorage = Vector<Variant<JS::Handle<DOM::Element>, AlreadyConstructedCustomElementMarker>>;

View file

@ -20,6 +20,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(CustomElementDefinition);
CustomElementRegistry::CustomElementRegistry(JS::Realm& realm)
: Bindings::PlatformObject(realm)
{

View file

@ -19,6 +19,7 @@ struct ElementDefinitionOptions {
// https://html.spec.whatwg.org/multipage/custom-elements.html#customelementregistry
class CustomElementRegistry : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(CustomElementRegistry, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(CustomElementRegistry);
public:
virtual ~CustomElementRegistry() override;

View file

@ -15,6 +15,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(DOMParser);
WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMParser>> DOMParser::construct_impl(JS::Realm& realm)
{
return realm.heap().allocate<DOMParser>(realm, realm);

View file

@ -17,6 +17,7 @@ namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#domparser
class DOMParser final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(DOMParser, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(DOMParser);
public:
static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMParser>> construct_impl(JS::Realm&);

View file

@ -12,6 +12,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(DOMStringMap);
JS::NonnullGCPtr<DOMStringMap> DOMStringMap::create(DOM::Element& element)
{
auto& realm = element.realm();

View file

@ -15,6 +15,7 @@ namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/dom.html#domstringmap
class DOMStringMap final : public Bindings::LegacyPlatformObject {
WEB_PLATFORM_OBJECT(DOMStringMap, Bindings::LegacyPlatformObject);
JS_DECLARE_ALLOCATOR(DOMStringMap);
public:
[[nodiscard]] static JS::NonnullGCPtr<DOMStringMap> create(DOM::Element&);

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(DocumentState);
DocumentState::DocumentState() = default;
DocumentState::~DocumentState() = default;

View file

@ -21,6 +21,7 @@ namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#document-state-2
class DocumentState final : public JS::Cell {
JS_CELL(DocumentState, JS::Cell);
JS_DECLARE_ALLOCATOR(DocumentState);
public:
struct NestedHistory {

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(ErrorEvent);
JS::NonnullGCPtr<ErrorEvent> ErrorEvent::create(JS::Realm& realm, FlyString const& event_name, ErrorEventInit const& event_init)
{
return realm.heap().allocate<ErrorEvent>(realm, realm, event_name, event_init);

View file

@ -23,6 +23,7 @@ struct ErrorEventInit : public DOM::EventInit {
// https://html.spec.whatwg.org/multipage/webappapis.html#errorevent
class ErrorEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(ErrorEvent, DOM::Event);
JS_DECLARE_ALLOCATOR(ErrorEvent);
public:
[[nodiscard]] static JS::NonnullGCPtr<ErrorEvent> create(JS::Realm&, FlyString const& event_name, ErrorEventInit const& = {});

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(EventHandler);
EventHandler::EventHandler(DeprecatedString s)
: value(move(s))
{

View file

@ -9,12 +9,14 @@
#include <AK/DeprecatedString.h>
#include <AK/Variant.h>
#include <LibJS/Heap/Cell.h>
#include <LibJS/Heap/CellAllocator.h>
#include <LibWeb/WebIDL/CallbackType.h>
namespace Web::HTML {
class EventHandler final : public JS::Cell {
JS_CELL(EventHandler, JS::Cell);
JS_DECLARE_ALLOCATOR(EventHandler);
public:
explicit EventHandler(DeprecatedString);

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(FormDataEvent);
WebIDL::ExceptionOr<JS::NonnullGCPtr<FormDataEvent>> FormDataEvent::construct_impl(JS::Realm& realm, FlyString const& event_name, FormDataEventInit const& event_init)
{
return realm.heap().allocate<FormDataEvent>(realm, realm, event_name, event_init);

View file

@ -17,6 +17,7 @@ struct FormDataEventInit : public DOM::EventInit {
class FormDataEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(FormDataEvent, DOM::Event);
JS_DECLARE_ALLOCATOR(FormDataEvent);
public:
static WebIDL::ExceptionOr<JS::NonnullGCPtr<FormDataEvent>> construct_impl(JS::Realm&, FlyString const& event_name, FormDataEventInit const& event_init);

View file

@ -11,6 +11,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLAnchorElement);
HTMLAnchorElement::HTMLAnchorElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -15,6 +15,7 @@ class HTMLAnchorElement final
: public HTMLElement
, public HTMLHyperlinkElementUtils {
WEB_PLATFORM_OBJECT(HTMLAnchorElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLAnchorElement);
public:
virtual ~HTMLAnchorElement() override;

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLAreaElement);
HTMLAreaElement::HTMLAreaElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -16,6 +16,7 @@ class HTMLAreaElement final
: public HTMLElement
, public HTMLHyperlinkElementUtils {
WEB_PLATFORM_OBJECT(HTMLAreaElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLAreaElement);
public:
virtual ~HTMLAreaElement() override;

View file

@ -12,6 +12,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLAudioElement);
HTMLAudioElement::HTMLAudioElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLMediaElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLAudioElement final : public HTMLMediaElement {
WEB_PLATFORM_OBJECT(HTMLAudioElement, HTMLMediaElement);
JS_DECLARE_ALLOCATOR(HTMLAudioElement);
public:
virtual ~HTMLAudioElement() override;

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLBRElement);
HTMLBRElement::HTMLBRElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLBRElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLBRElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLBRElement);
public:
virtual ~HTMLBRElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLBaseElement);
HTMLBaseElement::HTMLBaseElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLBaseElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLBaseElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLBaseElement);
public:
virtual ~HTMLBaseElement() override;

View file

@ -15,6 +15,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLBodyElement);
HTMLBodyElement::HTMLBodyElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -16,6 +16,7 @@ class HTMLBodyElement final
: public HTMLElement
, public WindowEventHandlers {
WEB_PLATFORM_OBJECT(HTMLBodyElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLBodyElement);
public:
virtual ~HTMLBodyElement() override;

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLButtonElement);
HTMLButtonElement::HTMLButtonElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -21,6 +21,7 @@ class HTMLButtonElement final
: public HTMLElement
, public FormAssociatedElement {
WEB_PLATFORM_OBJECT(HTMLButtonElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLButtonElement);
FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLButtonElement)
public:

View file

@ -26,6 +26,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLCanvasElement);
static constexpr auto max_canvas_area = 16384 * 16384;
HTMLCanvasElement::HTMLCanvasElement(DOM::Document& document, DOM::QualifiedName qualified_name)

View file

@ -15,6 +15,7 @@ namespace Web::HTML {
class HTMLCanvasElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLCanvasElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLCanvasElement);
public:
using RenderingContext = Variant<JS::Handle<CanvasRenderingContext2D>, JS::Handle<WebGL::WebGLRenderingContext>, Empty>;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLDListElement);
HTMLDListElement::HTMLDListElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLDListElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLDListElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLDListElement);
public:
virtual ~HTMLDListElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLDataElement);
HTMLDataElement::HTMLDataElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
class HTMLDataElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLDataElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLDataElement);
public:
virtual ~HTMLDataElement() override;

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
class HTMLDataListElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLDataListElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLDataListElement);
public:
virtual ~HTMLDataListElement() override;

View file

@ -19,6 +19,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLDetailsElement);
HTMLDetailsElement::HTMLDetailsElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -17,6 +17,7 @@ namespace Web::HTML {
class HTMLDetailsElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLDetailsElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLDetailsElement);
public:
virtual ~HTMLDetailsElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLDialogElement);
HTMLDialogElement::HTMLDialogElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
class HTMLDialogElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLDialogElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLDialogElement);
public:
virtual ~HTMLDialogElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLDirectoryElement);
HTMLDirectoryElement::HTMLDirectoryElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
// NOTE: This element is marked as obsolete, but is still listed as required by the specification.
class HTMLDirectoryElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLDirectoryElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLDirectoryElement);
public:
virtual ~HTMLDirectoryElement() override;

View file

@ -11,6 +11,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLDivElement);
HTMLDivElement::HTMLDivElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
class HTMLDivElement : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLDivElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLDivElement);
public:
virtual ~HTMLDivElement() override;

View file

@ -8,6 +8,8 @@
namespace Web::HTML {
JS_DECLARE_ALLOCATOR(HTMLDocument);
HTMLDocument::HTMLDocument(JS::Realm& realm, AK::URL const& url)
: Document(realm, url)
{

View file

@ -16,6 +16,7 @@ namespace Web::HTML {
// https://github.com/whatwg/dom/issues/221
class HTMLDocument final : public DOM::Document {
JS_CELL(HTMLDocument, DOM::Document);
JS_DECLARE_ALLOCATOR(HTMLDocument);
public:
virtual ~HTMLDocument() override;

View file

@ -36,6 +36,8 @@
namespace Web::HTML {
JS_DECLARE_ALLOCATOR(HTMLElement);
HTMLElement::HTMLElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: Element(document, move(qualified_name))
{

View file

@ -23,6 +23,7 @@ class HTMLElement
: public DOM::Element
, public HTML::GlobalEventHandlers {
WEB_PLATFORM_OBJECT(HTMLElement, DOM::Element);
JS_DECLARE_ALLOCATOR(HTMLElement);
public:
virtual ~HTMLElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLEmbedElement);
HTMLEmbedElement::HTMLEmbedElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLEmbedElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLEmbedElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLEmbedElement);
public:
virtual ~HTMLEmbedElement() override;

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLFieldSetElement);
HTMLFieldSetElement::HTMLFieldSetElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -16,6 +16,7 @@ class HTMLFieldSetElement final
: public HTMLElement
, public FormAssociatedElement {
WEB_PLATFORM_OBJECT(HTMLFieldSetElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLFieldSetElement);
FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLFieldSetElement)
public:

View file

@ -12,6 +12,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLFontElement);
HTMLFontElement::HTMLFontElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLFontElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLFontElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLFontElement);
public:
virtual ~HTMLFontElement() override;

View file

@ -31,6 +31,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLFormElement);
HTMLFormElement::HTMLFormElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -30,6 +30,7 @@ namespace Web::HTML {
class HTMLFormElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLFormElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLFormElement);
public:
virtual ~HTMLFormElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLFrameElement);
HTMLFrameElement::HTMLFrameElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
// NOTE: This element is marked as obsolete, but is still listed as required by the specification.
class HTMLFrameElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLFrameElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLFrameElement);
public:
virtual ~HTMLFrameElement() override;

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLFrameSetElement);
HTMLFrameSetElement::HTMLFrameSetElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -16,6 +16,7 @@ class HTMLFrameSetElement final
: public HTMLElement
, public WindowEventHandlers {
WEB_PLATFORM_OBJECT(HTMLFrameSetElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLFrameSetElement);
public:
virtual ~HTMLFrameSetElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLHRElement);
HTMLHRElement::HTMLHRElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
class HTMLHRElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLHRElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLHRElement);
public:
virtual ~HTMLHRElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLHeadElement);
HTMLHeadElement::HTMLHeadElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLHeadElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLHeadElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLHeadElement);
public:
virtual ~HTMLHeadElement() override;

View file

@ -11,6 +11,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLHeadingElement);
HTMLHeadingElement::HTMLHeadingElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
class HTMLHeadingElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLHeadingElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLHeadingElement);
public:
virtual ~HTMLHeadingElement() override;

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLHtmlElement);
HTMLHtmlElement::HTMLHtmlElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
class HTMLHtmlElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLHtmlElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLHtmlElement);
public:
virtual ~HTMLHtmlElement() override;

View file

@ -15,6 +15,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLIFrameElement);
HTMLIFrameElement::HTMLIFrameElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: NavigableContainer(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLIFrameElement final : public NavigableContainer {
WEB_PLATFORM_OBJECT(HTMLIFrameElement, NavigableContainer);
JS_DECLARE_ALLOCATOR(HTMLIFrameElement);
public:
virtual ~HTMLIFrameElement() override;

View file

@ -33,6 +33,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLImageElement);
HTMLImageElement::HTMLImageElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -27,6 +27,7 @@ class HTMLImageElement final
, public Layout::ImageProvider
, public DOM::Document::ViewportClient {
WEB_PLATFORM_OBJECT(HTMLImageElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLImageElement);
FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLImageElement)
public:

View file

@ -32,6 +32,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLInputElement);
HTMLInputElement::HTMLInputElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
, m_value(DeprecatedString::empty())
@ -499,6 +501,7 @@ Optional<DeprecatedString> HTMLInputElement::placeholder_value() const
class PlaceholderElement final : public HTMLDivElement {
JS_CELL(PlaceholderElement, HTMLDivElement);
JS_DECLARE_ALLOCATOR(PlaceholderElement);
public:
PlaceholderElement(DOM::Document& document)
@ -508,6 +511,8 @@ public:
virtual Optional<CSS::Selector::PseudoElement> pseudo_element() const override { return CSS::Selector::PseudoElement::Placeholder; }
};
JS_DEFINE_ALLOCATOR(PlaceholderElement);
void HTMLInputElement::create_shadow_tree_if_needed()
{
if (shadow_root_internal())

View file

@ -45,6 +45,7 @@ class HTMLInputElement final
, public FormAssociatedElement
, public DOM::EditableTextNodeOwner {
WEB_PLATFORM_OBJECT(HTMLInputElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLInputElement);
FORM_ASSOCIATED_ELEMENT(HTMLElement, HTMLInputElement)
public:

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLLIElement);
HTMLLIElement::HTMLLIElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -13,6 +13,7 @@ namespace Web::HTML {
class HTMLLIElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLLIElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLLIElement);
public:
virtual ~HTMLLIElement() override;

View file

@ -10,6 +10,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLLabelElement);
HTMLLabelElement::HTMLLabelElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLLabelElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLLabelElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLLabelElement);
public:
virtual ~HTMLLabelElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLLegendElement);
HTMLLegendElement::HTMLLegendElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLLegendElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLLegendElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLLegendElement);
public:
virtual ~HTMLLegendElement() override;

View file

@ -30,6 +30,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLLinkElement);
HTMLLinkElement::HTMLLinkElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -22,6 +22,7 @@ class HTMLLinkElement final
: public HTMLElement
, public ResourceClient {
WEB_PLATFORM_OBJECT(HTMLLinkElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLLinkElement);
public:
virtual ~HTMLLinkElement() override;

View file

@ -9,6 +9,8 @@
namespace Web::HTML {
JS_DEFINE_ALLOCATOR(HTMLMapElement);
HTMLMapElement::HTMLMapElement(DOM::Document& document, DOM::QualifiedName qualified_name)
: HTMLElement(document, move(qualified_name))
{

View file

@ -12,6 +12,7 @@ namespace Web::HTML {
class HTMLMapElement final : public HTMLElement {
WEB_PLATFORM_OBJECT(HTMLMapElement, HTMLElement);
JS_DECLARE_ALLOCATOR(HTMLMapElement);
public:
virtual ~HTMLMapElement() override;

Some files were not shown because too many files have changed in this diff Show more