mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 15:02:56 +00:00
LibWeb: Add calls to JS_{DECLARE,DEFINE}_ALLOCATOR()
This commit is contained in:
parent
d62c0fcbdc
commit
31341b280a
Notes:
sideshowbarker
2024-07-17 21:16:31 +09:00
Author: https://github.com/mattco98
Commit: 31341b280a
Pull-request: https://github.com/SerenityOS/serenity/pull/23878
Issue: https://github.com/SerenityOS/serenity/issues/23805
Reviewed-by: https://github.com/awesomekling
122 changed files with 199 additions and 5 deletions
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
namespace Web::Bindings {
|
namespace Web::Bindings {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(AudioConstructor);
|
||||||
|
|
||||||
AudioConstructor::AudioConstructor(JS::Realm& realm)
|
AudioConstructor::AudioConstructor(JS::Realm& realm)
|
||||||
: NativeFunction(realm.intrinsics().function_prototype())
|
: NativeFunction(realm.intrinsics().function_prototype())
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
namespace Web::Bindings {
|
namespace Web::Bindings {
|
||||||
|
|
||||||
class AudioConstructor final : public JS::NativeFunction {
|
class AudioConstructor final : public JS::NativeFunction {
|
||||||
|
JS_OBJECT(AudioConstructor, JS::NativeFunction);
|
||||||
|
JS_DECLARE_ALLOCATOR(AudioConstructor);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit AudioConstructor(JS::Realm&);
|
explicit AudioConstructor(JS::Realm&);
|
||||||
virtual void initialize(JS::Realm&) override;
|
virtual void initialize(JS::Realm&) override;
|
||||||
|
@ -22,7 +25,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool has_constructor() const override { return true; }
|
virtual bool has_constructor() const override { return true; }
|
||||||
virtual StringView class_name() const override { return "AudioConstructor"sv; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
namespace Web::Bindings {
|
namespace Web::Bindings {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(ImageConstructor);
|
||||||
|
|
||||||
ImageConstructor::ImageConstructor(JS::Realm& realm)
|
ImageConstructor::ImageConstructor(JS::Realm& realm)
|
||||||
: NativeFunction(realm.intrinsics().function_prototype())
|
: NativeFunction(realm.intrinsics().function_prototype())
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
namespace Web::Bindings {
|
namespace Web::Bindings {
|
||||||
|
|
||||||
class ImageConstructor final : public JS::NativeFunction {
|
class ImageConstructor final : public JS::NativeFunction {
|
||||||
|
JS_OBJECT(ImageConstructor, JS::NativeFunction);
|
||||||
|
JS_DECLARE_ALLOCATOR(ImageConstructor);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ImageConstructor(JS::Realm&);
|
explicit ImageConstructor(JS::Realm&);
|
||||||
virtual void initialize(JS::Realm&) override;
|
virtual void initialize(JS::Realm&) override;
|
||||||
|
@ -22,7 +25,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool has_constructor() const override { return true; }
|
virtual bool has_constructor() const override { return true; }
|
||||||
virtual StringView class_name() const override { return "ImageConstructor"sv; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
namespace Web::Bindings {
|
namespace Web::Bindings {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(OptionConstructor);
|
||||||
|
|
||||||
OptionConstructor::OptionConstructor(JS::Realm& realm)
|
OptionConstructor::OptionConstructor(JS::Realm& realm)
|
||||||
: NativeFunction(realm.intrinsics().function_prototype())
|
: NativeFunction(realm.intrinsics().function_prototype())
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,9 @@
|
||||||
namespace Web::Bindings {
|
namespace Web::Bindings {
|
||||||
|
|
||||||
class OptionConstructor final : public JS::NativeFunction {
|
class OptionConstructor final : public JS::NativeFunction {
|
||||||
|
JS_OBJECT(OptionConstructor, JS::NativeFunction);
|
||||||
|
JS_DECLARE_ALLOCATOR(OptionConstructor);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit OptionConstructor(JS::Realm&);
|
explicit OptionConstructor(JS::Realm&);
|
||||||
virtual void initialize(JS::Realm&) override;
|
virtual void initialize(JS::Realm&) override;
|
||||||
|
@ -22,7 +25,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual bool has_constructor() const override { return true; }
|
virtual bool has_constructor() const override { return true; }
|
||||||
virtual StringView class_name() const override { return "OptionConstructor"sv; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
namespace Web::CSS {
|
namespace Web::CSS {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(AnimationEvent);
|
||||||
|
|
||||||
JS::NonnullGCPtr<AnimationEvent> AnimationEvent::create(JS::Realm& realm, FlyString const& type, AnimationEventInit const& event_init)
|
JS::NonnullGCPtr<AnimationEvent> AnimationEvent::create(JS::Realm& realm, FlyString const& type, AnimationEventInit const& event_init)
|
||||||
{
|
{
|
||||||
return realm.heap().allocate<AnimationEvent>(realm, realm, type, event_init);
|
return realm.heap().allocate<AnimationEvent>(realm, realm, type, event_init);
|
||||||
|
|
|
@ -21,6 +21,7 @@ struct AnimationEventInit : public DOM::EventInit {
|
||||||
// https://www.w3.org/TR/css-animations-1/#animationevent
|
// https://www.w3.org/TR/css-animations-1/#animationevent
|
||||||
class AnimationEvent : public DOM::Event {
|
class AnimationEvent : public DOM::Event {
|
||||||
WEB_PLATFORM_OBJECT(AnimationEvent, DOM::Event);
|
WEB_PLATFORM_OBJECT(AnimationEvent, DOM::Event);
|
||||||
|
JS_DECLARE_ALLOCATOR(AnimationEvent);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] static JS::NonnullGCPtr<AnimationEvent> create(JS::Realm&, FlyString const& type, AnimationEventInit const& event_init = {});
|
[[nodiscard]] static JS::NonnullGCPtr<AnimationEvent> create(JS::Realm&, FlyString const& type, AnimationEventInit const& event_init = {});
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
namespace Web::CSS {
|
namespace Web::CSS {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(CSSAnimation);
|
||||||
|
|
||||||
JS::NonnullGCPtr<CSSAnimation> CSSAnimation::create(JS::Realm& realm)
|
JS::NonnullGCPtr<CSSAnimation> CSSAnimation::create(JS::Realm& realm)
|
||||||
{
|
{
|
||||||
return realm.heap().allocate<CSSAnimation>(realm, realm);
|
return realm.heap().allocate<CSSAnimation>(realm, realm);
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace Web::CSS {
|
||||||
// https://www.w3.org/TR/css-animations-2/#cssanimation
|
// https://www.w3.org/TR/css-animations-2/#cssanimation
|
||||||
class CSSAnimation : public Animations::Animation {
|
class CSSAnimation : public Animations::Animation {
|
||||||
WEB_PLATFORM_OBJECT(CSSAnimation, Animations::Animation);
|
WEB_PLATFORM_OBJECT(CSSAnimation, Animations::Animation);
|
||||||
|
JS_DECLARE_ALLOCATOR(CSSAnimation);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<CSSAnimation> create(JS::Realm&);
|
static JS::NonnullGCPtr<CSSAnimation> create(JS::Realm&);
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
namespace Web::CSS {
|
namespace Web::CSS {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(CSSTransition);
|
||||||
|
|
||||||
JS::NonnullGCPtr<CSSTransition> CSSTransition::create(JS::Realm& realm, PropertyID property_id, size_t transition_generation)
|
JS::NonnullGCPtr<CSSTransition> CSSTransition::create(JS::Realm& realm, PropertyID property_id, size_t transition_generation)
|
||||||
{
|
{
|
||||||
return realm.heap().allocate<CSSTransition>(realm, realm, property_id, transition_generation);
|
return realm.heap().allocate<CSSTransition>(realm, realm, property_id, transition_generation);
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace Web::CSS {
|
||||||
|
|
||||||
class CSSTransition : public Animations::Animation {
|
class CSSTransition : public Animations::Animation {
|
||||||
WEB_PLATFORM_OBJECT(CSSTransition, Animations::Animation);
|
WEB_PLATFORM_OBJECT(CSSTransition, Animations::Animation);
|
||||||
|
JS_DECLARE_ALLOCATOR(CSSTransition);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<CSSTransition> create(JS::Realm&, PropertyID, size_t transition_generation);
|
static JS::NonnullGCPtr<CSSTransition> create(JS::Realm&, PropertyID, size_t transition_generation);
|
||||||
|
|
|
@ -38,6 +38,8 @@
|
||||||
|
|
||||||
namespace Web::DOM {
|
namespace Web::DOM {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(EventTarget);
|
||||||
|
|
||||||
EventTarget::EventTarget(JS::Realm& realm, MayInterfereWithIndexedPropertyAccess may_interfere_with_indexed_property_access)
|
EventTarget::EventTarget(JS::Realm& realm, MayInterfereWithIndexedPropertyAccess may_interfere_with_indexed_property_access)
|
||||||
: PlatformObject(realm, may_interfere_with_indexed_property_access)
|
: PlatformObject(realm, may_interfere_with_indexed_property_access)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace Web::DOM {
|
||||||
|
|
||||||
class EventTarget : public Bindings::PlatformObject {
|
class EventTarget : public Bindings::PlatformObject {
|
||||||
WEB_PLATFORM_OBJECT(EventTarget, Bindings::PlatformObject);
|
WEB_PLATFORM_OBJECT(EventTarget, Bindings::PlatformObject);
|
||||||
|
JS_DECLARE_ALLOCATOR(EventTarget);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~EventTarget() override;
|
virtual ~EventTarget() override;
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::DOM {
|
namespace Web::DOM {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(IDLEventListener);
|
||||||
|
|
||||||
JS::NonnullGCPtr<IDLEventListener> IDLEventListener::create(JS::Realm& realm, JS::NonnullGCPtr<WebIDL::CallbackType> callback)
|
JS::NonnullGCPtr<IDLEventListener> IDLEventListener::create(JS::Realm& realm, JS::NonnullGCPtr<WebIDL::CallbackType> callback)
|
||||||
{
|
{
|
||||||
return realm.heap().allocate<IDLEventListener>(realm, realm, move(callback));
|
return realm.heap().allocate<IDLEventListener>(realm, realm, move(callback));
|
||||||
|
|
|
@ -26,6 +26,7 @@ struct AddEventListenerOptions : public EventListenerOptions {
|
||||||
|
|
||||||
class IDLEventListener final : public JS::Object {
|
class IDLEventListener final : public JS::Object {
|
||||||
JS_OBJECT(IDLEventListener, JS::Object);
|
JS_OBJECT(IDLEventListener, JS::Object);
|
||||||
|
JS_DECLARE_ALLOCATOR(IDLEventListener);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] static JS::NonnullGCPtr<IDLEventListener> create(JS::Realm&, JS::NonnullGCPtr<WebIDL::CallbackType>);
|
[[nodiscard]] static JS::NonnullGCPtr<IDLEventListener> create(JS::Realm&, JS::NonnullGCPtr<WebIDL::CallbackType>);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
namespace Web::DOM {
|
namespace Web::DOM {
|
||||||
|
|
||||||
JS_DEFINE_ALLOCATOR(MutationObserver);
|
JS_DEFINE_ALLOCATOR(MutationObserver);
|
||||||
|
JS_DEFINE_ALLOCATOR(TransientRegisteredObserver);
|
||||||
|
|
||||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<MutationObserver>> MutationObserver::construct_impl(JS::Realm& realm, JS::GCPtr<WebIDL::CallbackType> callback)
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<MutationObserver>> MutationObserver::construct_impl(JS::Realm& realm, JS::GCPtr<WebIDL::CallbackType> callback)
|
||||||
{
|
{
|
||||||
|
|
|
@ -93,6 +93,7 @@ private:
|
||||||
// https://dom.spec.whatwg.org/#transient-registered-observer
|
// https://dom.spec.whatwg.org/#transient-registered-observer
|
||||||
class TransientRegisteredObserver final : public RegisteredObserver {
|
class TransientRegisteredObserver final : public RegisteredObserver {
|
||||||
JS_CELL(TransientRegisteredObserver, RegisteredObserver);
|
JS_CELL(TransientRegisteredObserver, RegisteredObserver);
|
||||||
|
JS_DECLARE_ALLOCATOR(TransientRegisteredObserver);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<TransientRegisteredObserver> create(MutationObserver&, MutationObserverInit const&, RegisteredObserver& source);
|
static JS::NonnullGCPtr<TransientRegisteredObserver> create(MutationObserver&, MutationObserverInit const&, RegisteredObserver& source);
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
namespace Web::DOM {
|
namespace Web::DOM {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(ParentNode);
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-parentnode-queryselector
|
// https://dom.spec.whatwg.org/#dom-parentnode-queryselector
|
||||||
WebIDL::ExceptionOr<JS::GCPtr<Element>> ParentNode::query_selector(StringView selector_text)
|
WebIDL::ExceptionOr<JS::GCPtr<Element>> ParentNode::query_selector(StringView selector_text)
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Web::DOM {
|
||||||
|
|
||||||
class ParentNode : public Node {
|
class ParentNode : public Node {
|
||||||
WEB_PLATFORM_OBJECT(ParentNode, Node);
|
WEB_PLATFORM_OBJECT(ParentNode, Node);
|
||||||
|
JS_DECLARE_ALLOCATOR(ParentNode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
template<typename F>
|
template<typename F>
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Fetch::Infrastructure {
|
namespace Web::Fetch::Infrastructure {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(FetchTimingInfo);
|
||||||
|
|
||||||
FetchTimingInfo::FetchTimingInfo() = default;
|
FetchTimingInfo::FetchTimingInfo() = default;
|
||||||
|
|
||||||
JS::NonnullGCPtr<FetchTimingInfo> FetchTimingInfo::create(JS::VM& vm)
|
JS::NonnullGCPtr<FetchTimingInfo> FetchTimingInfo::create(JS::VM& vm)
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace Web::Fetch::Infrastructure {
|
||||||
// https://fetch.spec.whatwg.org/#fetch-timing-info
|
// https://fetch.spec.whatwg.org/#fetch-timing-info
|
||||||
class FetchTimingInfo : public JS::Cell {
|
class FetchTimingInfo : public JS::Cell {
|
||||||
JS_CELL(FetchTimingInfo, JS::Cell);
|
JS_CELL(FetchTimingInfo, JS::Cell);
|
||||||
|
JS_DECLARE_ALLOCATOR(FetchTimingInfo);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
[[nodiscard]] static JS::NonnullGCPtr<FetchTimingInfo> create(JS::VM&);
|
[[nodiscard]] static JS::NonnullGCPtr<FetchTimingInfo> create(JS::VM&);
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
namespace Web::Fetch::Infrastructure {
|
namespace Web::Fetch::Infrastructure {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(HeaderList);
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
requires(IsSameIgnoringCV<T, u8>) struct CaseInsensitiveBytesTraits : public Traits<Span<T>> {
|
requires(IsSameIgnoringCV<T, u8>) struct CaseInsensitiveBytesTraits : public Traits<Span<T>> {
|
||||||
static constexpr bool equals(Span<T> const& a, Span<T> const& b)
|
static constexpr bool equals(Span<T> const& a, Span<T> const& b)
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
#include <LibJS/Forward.h>
|
#include <LibJS/Forward.h>
|
||||||
#include <LibJS/Heap/Cell.h>
|
|
||||||
#include <LibJS/Heap/GCPtr.h>
|
#include <LibJS/Heap/GCPtr.h>
|
||||||
|
#include <LibJS/Heap/Heap.h>
|
||||||
#include <LibWeb/MimeSniff/MimeType.h>
|
#include <LibWeb/MimeSniff/MimeType.h>
|
||||||
|
|
||||||
namespace Web::Fetch::Infrastructure {
|
namespace Web::Fetch::Infrastructure {
|
||||||
|
@ -35,6 +35,7 @@ class HeaderList final
|
||||||
: public JS::Cell
|
: public JS::Cell
|
||||||
, Vector<Header> {
|
, Vector<Header> {
|
||||||
JS_CELL(HeaderList, JS::Cell);
|
JS_CELL(HeaderList, JS::Cell);
|
||||||
|
JS_DECLARE_ALLOCATOR(HeaderList);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using Vector::begin;
|
using Vector::begin;
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
|
|
||||||
namespace Web::Geometry {
|
namespace Web::Geometry {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(DOMMatrixReadOnly);
|
||||||
|
|
||||||
// https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-dommatrixreadonly
|
// https://drafts.fxtf.org/geometry/#dom-dommatrixreadonly-dommatrixreadonly
|
||||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMMatrixReadOnly>> DOMMatrixReadOnly::construct_impl(JS::Realm& realm, Optional<Variant<String, Vector<double>>> const& init)
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMMatrixReadOnly>> DOMMatrixReadOnly::construct_impl(JS::Realm& realm, Optional<Variant<String, Vector<double>>> const& init)
|
||||||
{
|
{
|
||||||
|
|
|
@ -52,6 +52,7 @@ class DOMMatrixReadOnly
|
||||||
: public Bindings::PlatformObject
|
: public Bindings::PlatformObject
|
||||||
, public Bindings::Serializable {
|
, public Bindings::Serializable {
|
||||||
WEB_PLATFORM_OBJECT(DOMMatrixReadOnly, Bindings::PlatformObject);
|
WEB_PLATFORM_OBJECT(DOMMatrixReadOnly, Bindings::PlatformObject);
|
||||||
|
JS_DECLARE_ALLOCATOR(DOMMatrixReadOnly);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMMatrixReadOnly>> construct_impl(JS::Realm&, Optional<Variant<String, Vector<double>>> const& init);
|
static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMMatrixReadOnly>> construct_impl(JS::Realm&, Optional<Variant<String, Vector<double>>> const& init);
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
|
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(EventLoop);
|
||||||
|
|
||||||
EventLoop::EventLoop()
|
EventLoop::EventLoop()
|
||||||
{
|
{
|
||||||
m_task_queue = heap().allocate_without_realm<TaskQueue>(*this);
|
m_task_queue = heap().allocate_without_realm<TaskQueue>(*this);
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace Web::HTML {
|
||||||
|
|
||||||
class EventLoop : public JS::Cell {
|
class EventLoop : public JS::Cell {
|
||||||
JS_CELL(EventLoop, Cell);
|
JS_CELL(EventLoop, Cell);
|
||||||
|
JS_DECLARE_ALLOCATOR(EventLoop);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum class Type {
|
enum class Type {
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(TaskQueue);
|
||||||
|
|
||||||
TaskQueue::TaskQueue(HTML::EventLoop& event_loop)
|
TaskQueue::TaskQueue(HTML::EventLoop& event_loop)
|
||||||
: m_event_loop(event_loop)
|
: m_event_loop(event_loop)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Web::HTML {
|
||||||
|
|
||||||
class TaskQueue : public JS::Cell {
|
class TaskQueue : public JS::Cell {
|
||||||
JS_CELL(TaskQueue, Cell);
|
JS_CELL(TaskQueue, Cell);
|
||||||
|
JS_DECLARE_ALLOCATOR(TaskQueue);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TaskQueue(HTML::EventLoop&);
|
explicit TaskQueue(HTML::EventLoop&);
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
JS_DEFINE_ALLOCATOR(Navigation);
|
JS_DEFINE_ALLOCATOR(Navigation);
|
||||||
|
JS_DEFINE_ALLOCATOR(NavigationAPIMethodTracker);
|
||||||
|
|
||||||
static NavigationResult navigation_api_method_tracker_derived_result(JS::NonnullGCPtr<NavigationAPIMethodTracker> api_method_tracker);
|
static NavigationResult navigation_api_method_tracker_derived_result(JS::NonnullGCPtr<NavigationAPIMethodTracker> api_method_tracker);
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ struct NavigationResult {
|
||||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api-method-tracker
|
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api-method-tracker
|
||||||
struct NavigationAPIMethodTracker final : public JS::Cell {
|
struct NavigationAPIMethodTracker final : public JS::Cell {
|
||||||
JS_CELL(NavigationAPIMethodTracker, JS::Cell);
|
JS_CELL(NavigationAPIMethodTracker, JS::Cell);
|
||||||
|
JS_DECLARE_ALLOCATOR(NavigationAPIMethodTracker);
|
||||||
|
|
||||||
NavigationAPIMethodTracker(JS::NonnullGCPtr<Navigation> navigation,
|
NavigationAPIMethodTracker(JS::NonnullGCPtr<Navigation> navigation,
|
||||||
Optional<String> key,
|
Optional<String> key,
|
||||||
|
|
|
@ -28,6 +28,8 @@
|
||||||
|
|
||||||
namespace Web::HTML {
|
namespace Web::HTML {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(FetchContext);
|
||||||
|
|
||||||
OnFetchScriptComplete create_on_fetch_script_complete(JS::Heap& heap, Function<void(JS::GCPtr<Script>)> function)
|
OnFetchScriptComplete create_on_fetch_script_complete(JS::Heap& heap, Function<void(JS::GCPtr<Script>)> function)
|
||||||
{
|
{
|
||||||
return JS::create_heap_function(heap, move(function));
|
return JS::create_heap_function(heap, move(function));
|
||||||
|
|
|
@ -56,6 +56,7 @@ ScriptFetchOptions default_classic_script_fetch_options();
|
||||||
|
|
||||||
class FetchContext : public JS::GraphLoadingState::HostDefined {
|
class FetchContext : public JS::GraphLoadingState::HostDefined {
|
||||||
JS_CELL(FetchContext, JS::GraphLoadingState::HostDefined);
|
JS_CELL(FetchContext, JS::GraphLoadingState::HostDefined);
|
||||||
|
JS_DECLARE_ALLOCATOR(FetchContext);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
JS::Value parse_error; // [[ParseError]]
|
JS::Value parse_error; // [[ParseError]]
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(AudioBox);
|
||||||
|
|
||||||
AudioBox::AudioBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style)
|
AudioBox::AudioBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: ReplacedBox(document, element, move(style))
|
: ReplacedBox(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class AudioBox final : public ReplacedBox {
|
class AudioBox final : public ReplacedBox {
|
||||||
JS_CELL(AudioBox, ReplacedBox);
|
JS_CELL(AudioBox, ReplacedBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(AudioBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
HTML::HTMLAudioElement& dom_node();
|
HTML::HTMLAudioElement& dom_node();
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(BreakNode);
|
||||||
|
|
||||||
BreakNode::BreakNode(DOM::Document& document, HTML::HTMLBRElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
BreakNode::BreakNode(DOM::Document& document, HTML::HTMLBRElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: Layout::NodeWithStyleAndBoxModelMetrics(document, &element, move(style))
|
: Layout::NodeWithStyleAndBoxModelMetrics(document, &element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class BreakNode final : public NodeWithStyleAndBoxModelMetrics {
|
class BreakNode final : public NodeWithStyleAndBoxModelMetrics {
|
||||||
JS_CELL(BreakNode, NodeWithStyleAndBoxModelMetrics);
|
JS_CELL(BreakNode, NodeWithStyleAndBoxModelMetrics);
|
||||||
|
JS_DECLARE_ALLOCATOR(BreakNode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BreakNode(DOM::Document&, HTML::HTMLBRElement&, NonnullRefPtr<CSS::StyleProperties>);
|
BreakNode(DOM::Document&, HTML::HTMLBRElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(ButtonBox);
|
||||||
|
|
||||||
ButtonBox::ButtonBox(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
ButtonBox::ButtonBox(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: FormAssociatedLabelableNode(document, element, move(style))
|
: FormAssociatedLabelableNode(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class ButtonBox final : public FormAssociatedLabelableNode {
|
class ButtonBox final : public FormAssociatedLabelableNode {
|
||||||
JS_CELL(ButtonBox, FormAssociatedLabelableNode);
|
JS_CELL(ButtonBox, FormAssociatedLabelableNode);
|
||||||
|
JS_DECLARE_ALLOCATOR(ButtonBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ButtonBox(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr<CSS::StyleProperties>);
|
ButtonBox(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(CanvasBox);
|
||||||
|
|
||||||
CanvasBox::CanvasBox(DOM::Document& document, HTML::HTMLCanvasElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
CanvasBox::CanvasBox(DOM::Document& document, HTML::HTMLCanvasElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: ReplacedBox(document, element, move(style))
|
: ReplacedBox(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class CanvasBox final : public ReplacedBox {
|
class CanvasBox final : public ReplacedBox {
|
||||||
JS_CELL(CanvasBox, ReplacedBox);
|
JS_CELL(CanvasBox, ReplacedBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(CanvasBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CanvasBox(DOM::Document&, HTML::HTMLCanvasElement&, NonnullRefPtr<CSS::StyleProperties>);
|
CanvasBox(DOM::Document&, HTML::HTMLCanvasElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(CheckBox);
|
||||||
|
|
||||||
CheckBox::CheckBox(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
CheckBox::CheckBox(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: FormAssociatedLabelableNode(document, element, move(style))
|
: FormAssociatedLabelableNode(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class CheckBox final : public FormAssociatedLabelableNode {
|
class CheckBox final : public FormAssociatedLabelableNode {
|
||||||
JS_CELL(CheckBox, FormAssociatedLabelableNode);
|
JS_CELL(CheckBox, FormAssociatedLabelableNode);
|
||||||
|
JS_DECLARE_ALLOCATOR(CheckBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CheckBox(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr<CSS::StyleProperties>);
|
CheckBox(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(FrameBox);
|
||||||
|
|
||||||
FrameBox::FrameBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style)
|
FrameBox::FrameBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: ReplacedBox(document, element, move(style))
|
: ReplacedBox(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class FrameBox final : public ReplacedBox {
|
class FrameBox final : public ReplacedBox {
|
||||||
JS_CELL(FrameBox, ReplacedBox);
|
JS_CELL(FrameBox, ReplacedBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(FrameBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FrameBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>);
|
FrameBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(ImageBox);
|
||||||
|
|
||||||
ImageBox::ImageBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style, ImageProvider const& image_provider)
|
ImageBox::ImageBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style, ImageProvider const& image_provider)
|
||||||
: ReplacedBox(document, element, move(style))
|
: ReplacedBox(document, element, move(style))
|
||||||
, m_image_provider(image_provider)
|
, m_image_provider(image_provider)
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class ImageBox final : public ReplacedBox {
|
class ImageBox final : public ReplacedBox {
|
||||||
JS_CELL(ImageBox, ReplacedBox);
|
JS_CELL(ImageBox, ReplacedBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(ImageBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ImageBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>, ImageProvider const&);
|
ImageBox(DOM::Document&, DOM::Element&, NonnullRefPtr<CSS::StyleProperties>, ImageProvider const&);
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(InlineNode);
|
||||||
|
|
||||||
InlineNode::InlineNode(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
|
InlineNode::InlineNode(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: Layout::NodeWithStyleAndBoxModelMetrics(document, element, move(style))
|
: Layout::NodeWithStyleAndBoxModelMetrics(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class InlineNode final : public NodeWithStyleAndBoxModelMetrics {
|
class InlineNode final : public NodeWithStyleAndBoxModelMetrics {
|
||||||
JS_CELL(InlineNode, NodeWithStyleAndBoxModelMetrics);
|
JS_CELL(InlineNode, NodeWithStyleAndBoxModelMetrics);
|
||||||
|
JS_DECLARE_ALLOCATOR(InlineNode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
InlineNode(DOM::Document&, DOM::Element*, NonnullRefPtr<CSS::StyleProperties>);
|
InlineNode(DOM::Document&, DOM::Element*, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(Label);
|
||||||
|
|
||||||
Label::Label(DOM::Document& document, HTML::HTMLLabelElement* element, NonnullRefPtr<CSS::StyleProperties> style)
|
Label::Label(DOM::Document& document, HTML::HTMLLabelElement* element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: BlockContainer(document, element, move(style))
|
: BlockContainer(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class Label final : public BlockContainer {
|
class Label final : public BlockContainer {
|
||||||
JS_CELL(Label, BlockContainer);
|
JS_CELL(Label, BlockContainer);
|
||||||
|
JS_DECLARE_ALLOCATOR(Label);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Label(DOM::Document&, HTML::HTMLLabelElement*, NonnullRefPtr<CSS::StyleProperties>);
|
Label(DOM::Document&, HTML::HTMLLabelElement*, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(ListItemBox);
|
||||||
|
|
||||||
ListItemBox::ListItemBox(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
|
ListItemBox::ListItemBox(DOM::Document& document, DOM::Element* element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: Layout::BlockContainer(document, element, move(style))
|
: Layout::BlockContainer(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class ListItemBox final : public BlockContainer {
|
class ListItemBox final : public BlockContainer {
|
||||||
JS_CELL(ListItemBox, BlockContainer);
|
JS_CELL(ListItemBox, BlockContainer);
|
||||||
|
JS_DECLARE_ALLOCATOR(ListItemBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ListItemBox(DOM::Document&, DOM::Element*, NonnullRefPtr<CSS::StyleProperties>);
|
ListItemBox(DOM::Document&, DOM::Element*, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(ListItemMarkerBox);
|
||||||
|
|
||||||
ListItemMarkerBox::ListItemMarkerBox(DOM::Document& document, CSS::ListStyleType style_type, CSS::ListStylePosition style_position, size_t index, NonnullRefPtr<CSS::StyleProperties> style)
|
ListItemMarkerBox::ListItemMarkerBox(DOM::Document& document, CSS::ListStyleType style_type, CSS::ListStylePosition style_position, size_t index, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: Box(document, nullptr, move(style))
|
: Box(document, nullptr, move(style))
|
||||||
, m_list_style_type(style_type)
|
, m_list_style_type(style_type)
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class ListItemMarkerBox final : public Box {
|
class ListItemMarkerBox final : public Box {
|
||||||
JS_CELL(ListItemMarkerBox, Box);
|
JS_CELL(ListItemMarkerBox, Box);
|
||||||
|
JS_DECLARE_ALLOCATOR(ListItemMarkerBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ListItemMarkerBox(DOM::Document&, CSS::ListStyleType, CSS::ListStylePosition, size_t index, NonnullRefPtr<CSS::StyleProperties>);
|
explicit ListItemMarkerBox(DOM::Document&, CSS::ListStyleType, CSS::ListStylePosition, size_t index, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(RadioButton);
|
||||||
|
|
||||||
RadioButton::RadioButton(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
RadioButton::RadioButton(DOM::Document& document, HTML::HTMLInputElement& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: FormAssociatedLabelableNode(document, element, move(style))
|
: FormAssociatedLabelableNode(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class RadioButton final : public FormAssociatedLabelableNode {
|
class RadioButton final : public FormAssociatedLabelableNode {
|
||||||
JS_CELL(RadioButton, FormAssociatedLabelableNode);
|
JS_CELL(RadioButton, FormAssociatedLabelableNode);
|
||||||
|
JS_DECLARE_ALLOCATOR(RadioButton);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RadioButton(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr<CSS::StyleProperties>);
|
RadioButton(DOM::Document&, HTML::HTMLInputElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(SVGClipBox);
|
||||||
|
|
||||||
SVGClipBox::SVGClipBox(DOM::Document& document, SVG::SVGClipPathElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
SVGClipBox::SVGClipBox(DOM::Document& document, SVG::SVGClipPathElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
||||||
: SVGBox(document, element, properties)
|
: SVGBox(document, element, properties)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class SVGClipBox : public SVGBox {
|
class SVGClipBox : public SVGBox {
|
||||||
JS_CELL(SVGClipBox, SVGBox);
|
JS_CELL(SVGClipBox, SVGBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(SVGClipBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SVGClipBox(DOM::Document&, SVG::SVGClipPathElement&, NonnullRefPtr<CSS::StyleProperties>);
|
SVGClipBox(DOM::Document&, SVG::SVGClipPathElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(SVGGeometryBox);
|
||||||
|
|
||||||
SVGGeometryBox::SVGGeometryBox(DOM::Document& document, SVG::SVGGeometryElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
SVGGeometryBox::SVGGeometryBox(DOM::Document& document, SVG::SVGGeometryElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
||||||
: SVGGraphicsBox(document, element, properties)
|
: SVGGraphicsBox(document, element, properties)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class SVGGeometryBox final : public SVGGraphicsBox {
|
class SVGGeometryBox final : public SVGGraphicsBox {
|
||||||
JS_CELL(SVGGeometryBox, SVGGraphicsBox);
|
JS_CELL(SVGGeometryBox, SVGGraphicsBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(SVGGeometryBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SVGGeometryBox(DOM::Document&, SVG::SVGGeometryElement&, NonnullRefPtr<CSS::StyleProperties>);
|
SVGGeometryBox(DOM::Document&, SVG::SVGGeometryElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(SVGMaskBox);
|
||||||
|
|
||||||
SVGMaskBox::SVGMaskBox(DOM::Document& document, SVG::SVGMaskElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
SVGMaskBox::SVGMaskBox(DOM::Document& document, SVG::SVGMaskElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
||||||
: SVGGraphicsBox(document, element, properties)
|
: SVGGraphicsBox(document, element, properties)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class SVGMaskBox : public SVGGraphicsBox {
|
class SVGMaskBox : public SVGGraphicsBox {
|
||||||
JS_CELL(SVGMaskBox, SVGBox);
|
JS_CELL(SVGMaskBox, SVGBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(SVGMaskBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SVGMaskBox(DOM::Document&, SVG::SVGMaskElement&, NonnullRefPtr<CSS::StyleProperties>);
|
SVGMaskBox(DOM::Document&, SVG::SVGMaskElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(SVGSVGBox);
|
||||||
|
|
||||||
SVGSVGBox::SVGSVGBox(DOM::Document& document, SVG::SVGSVGElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
SVGSVGBox::SVGSVGBox(DOM::Document& document, SVG::SVGSVGElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
||||||
: ReplacedBox(document, element, move(properties))
|
: ReplacedBox(document, element, move(properties))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class SVGSVGBox final : public ReplacedBox {
|
class SVGSVGBox final : public ReplacedBox {
|
||||||
JS_CELL(SVGSVGBox, ReplacedBox);
|
JS_CELL(SVGSVGBox, ReplacedBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(SVGSVGBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SVGSVGBox(DOM::Document&, SVG::SVGSVGElement&, NonnullRefPtr<CSS::StyleProperties>);
|
SVGSVGBox(DOM::Document&, SVG::SVGSVGElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(SVGTextBox);
|
||||||
|
|
||||||
SVGTextBox::SVGTextBox(DOM::Document& document, SVG::SVGTextPositioningElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
SVGTextBox::SVGTextBox(DOM::Document& document, SVG::SVGTextPositioningElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
||||||
: SVGGraphicsBox(document, element, properties)
|
: SVGGraphicsBox(document, element, properties)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class SVGTextBox final : public SVGGraphicsBox {
|
class SVGTextBox final : public SVGGraphicsBox {
|
||||||
JS_CELL(SVGTextBox, SVGGraphicsBox);
|
JS_CELL(SVGTextBox, SVGGraphicsBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(SVGTextBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SVGTextBox(DOM::Document&, SVG::SVGTextPositioningElement&, NonnullRefPtr<CSS::StyleProperties>);
|
SVGTextBox(DOM::Document&, SVG::SVGTextPositioningElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(SVGTextPathBox);
|
||||||
|
|
||||||
SVGTextPathBox::SVGTextPathBox(DOM::Document& document, SVG::SVGTextPathElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
SVGTextPathBox::SVGTextPathBox(DOM::Document& document, SVG::SVGTextPathElement& element, NonnullRefPtr<CSS::StyleProperties> properties)
|
||||||
: SVGGraphicsBox(document, element, properties)
|
: SVGGraphicsBox(document, element, properties)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class SVGTextPathBox final : public SVGGraphicsBox {
|
class SVGTextPathBox final : public SVGGraphicsBox {
|
||||||
JS_CELL(SVGTextPathBox, SVGGraphicsBox);
|
JS_CELL(SVGTextPathBox, SVGGraphicsBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(SVGTextPathBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SVGTextPathBox(DOM::Document&, SVG::SVGTextPathElement&, NonnullRefPtr<CSS::StyleProperties>);
|
SVGTextPathBox(DOM::Document&, SVG::SVGTextPathElement&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(TableWrapper);
|
||||||
|
|
||||||
TableWrapper::TableWrapper(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style)
|
TableWrapper::TableWrapper(DOM::Document& document, DOM::Node* node, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: BlockContainer(document, node, move(style))
|
: BlockContainer(document, node, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class TableWrapper : public BlockContainer {
|
class TableWrapper : public BlockContainer {
|
||||||
JS_CELL(TableWrapper, BlockContainer);
|
JS_CELL(TableWrapper, BlockContainer);
|
||||||
|
JS_DECLARE_ALLOCATOR(TableWrapper);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TableWrapper(DOM::Document&, DOM::Node*, NonnullRefPtr<CSS::StyleProperties>);
|
TableWrapper(DOM::Document&, DOM::Node*, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(TextNode);
|
||||||
|
|
||||||
TextNode::TextNode(DOM::Document& document, DOM::Text& text)
|
TextNode::TextNode(DOM::Document& document, DOM::Text& text)
|
||||||
: Node(document, &text)
|
: Node(document, &text)
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@ class LineBoxFragment;
|
||||||
|
|
||||||
class TextNode final : public Node {
|
class TextNode final : public Node {
|
||||||
JS_CELL(TextNode, Node);
|
JS_CELL(TextNode, Node);
|
||||||
|
JS_DECLARE_ALLOCATOR(TextNode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TextNode(DOM::Document&, DOM::Text&);
|
TextNode(DOM::Document&, DOM::Text&);
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(VideoBox);
|
||||||
|
|
||||||
VideoBox::VideoBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style)
|
VideoBox::VideoBox(DOM::Document& document, DOM::Element& element, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: ReplacedBox(document, element, move(style))
|
: ReplacedBox(document, element, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,7 @@ class VideoBox final
|
||||||
: public ReplacedBox
|
: public ReplacedBox
|
||||||
, public DOM::Document::ViewportClient {
|
, public DOM::Document::ViewportClient {
|
||||||
JS_CELL(VideoBox, ReplacedBox);
|
JS_CELL(VideoBox, ReplacedBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(VideoBox);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void prepare_for_replaced_layout() override;
|
virtual void prepare_for_replaced_layout() override;
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
namespace Web::Layout {
|
namespace Web::Layout {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(Viewport);
|
||||||
|
|
||||||
Viewport::Viewport(DOM::Document& document, NonnullRefPtr<CSS::StyleProperties> style)
|
Viewport::Viewport(DOM::Document& document, NonnullRefPtr<CSS::StyleProperties> style)
|
||||||
: BlockContainer(document, &document, move(style))
|
: BlockContainer(document, &document, move(style))
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Layout {
|
||||||
|
|
||||||
class Viewport final : public BlockContainer {
|
class Viewport final : public BlockContainer {
|
||||||
JS_CELL(Viewport, BlockContainer);
|
JS_CELL(Viewport, BlockContainer);
|
||||||
|
JS_DECLARE_ALLOCATOR(Viewport);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Viewport(DOM::Document&, NonnullRefPtr<CSS::StyleProperties>);
|
explicit Viewport(DOM::Document&, NonnullRefPtr<CSS::StyleProperties>);
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
|
|
||||||
namespace Web {
|
namespace Web {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(Page);
|
||||||
|
|
||||||
JS::NonnullGCPtr<Page> Page::create(JS::VM& vm, JS::NonnullGCPtr<PageClient> page_client)
|
JS::NonnullGCPtr<Page> Page::create(JS::VM& vm, JS::NonnullGCPtr<PageClient> page_client)
|
||||||
{
|
{
|
||||||
return vm.heap().allocate_without_realm<Page>(page_client);
|
return vm.heap().allocate_without_realm<Page>(page_client);
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
#include <LibGfx/Size.h>
|
#include <LibGfx/Size.h>
|
||||||
#include <LibGfx/StandardCursor.h>
|
#include <LibGfx/StandardCursor.h>
|
||||||
#include <LibIPC/Forward.h>
|
#include <LibIPC/Forward.h>
|
||||||
#include <LibJS/Heap/Cell.h>
|
|
||||||
#include <LibJS/Heap/Handle.h>
|
#include <LibJS/Heap/Handle.h>
|
||||||
|
#include <LibJS/Heap/Heap.h>
|
||||||
#include <LibURL/URL.h>
|
#include <LibURL/URL.h>
|
||||||
#include <LibWeb/CSS/PreferredColorScheme.h>
|
#include <LibWeb/CSS/PreferredColorScheme.h>
|
||||||
#include <LibWeb/CSS/Selector.h>
|
#include <LibWeb/CSS/Selector.h>
|
||||||
|
@ -47,6 +47,7 @@ class PageClient;
|
||||||
|
|
||||||
class Page final : public JS::Cell {
|
class Page final : public JS::Cell {
|
||||||
JS_CELL(Page, JS::Cell);
|
JS_CELL(Page, JS::Cell);
|
||||||
|
JS_DECLARE_ALLOCATOR(Page);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<Page> create(JS::VM&, JS::NonnullGCPtr<PageClient>);
|
static JS::NonnullGCPtr<Page> create(JS::VM&, JS::NonnullGCPtr<PageClient>);
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(AudioPaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<AudioPaintable> AudioPaintable::create(Layout::AudioBox const& layout_box)
|
JS::NonnullGCPtr<AudioPaintable> AudioPaintable::create(Layout::AudioBox const& layout_box)
|
||||||
{
|
{
|
||||||
return layout_box.heap().allocate_without_realm<AudioPaintable>(layout_box);
|
return layout_box.heap().allocate_without_realm<AudioPaintable>(layout_box);
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class AudioPaintable final : public MediaPaintable {
|
class AudioPaintable final : public MediaPaintable {
|
||||||
JS_CELL(AudioPaintable, MediaPaintable);
|
JS_CELL(AudioPaintable, MediaPaintable);
|
||||||
|
JS_DECLARE_ALLOCATOR(AudioPaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<AudioPaintable> create(Layout::AudioBox const&);
|
static JS::NonnullGCPtr<AudioPaintable> create(Layout::AudioBox const&);
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(ButtonPaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<ButtonPaintable> ButtonPaintable::create(Layout::ButtonBox const& layout_box)
|
JS::NonnullGCPtr<ButtonPaintable> ButtonPaintable::create(Layout::ButtonBox const& layout_box)
|
||||||
{
|
{
|
||||||
return layout_box.heap().allocate_without_realm<ButtonPaintable>(layout_box);
|
return layout_box.heap().allocate_without_realm<ButtonPaintable>(layout_box);
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class ButtonPaintable final : public LabelablePaintable {
|
class ButtonPaintable final : public LabelablePaintable {
|
||||||
JS_CELL(ButtonPaintable, LabelablePaintable);
|
JS_CELL(ButtonPaintable, LabelablePaintable);
|
||||||
|
JS_DECLARE_ALLOCATOR(ButtonPaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<ButtonPaintable> create(Layout::ButtonBox const&);
|
static JS::NonnullGCPtr<ButtonPaintable> create(Layout::ButtonBox const&);
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(CanvasPaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<CanvasPaintable> CanvasPaintable::create(Layout::CanvasBox const& layout_box)
|
JS::NonnullGCPtr<CanvasPaintable> CanvasPaintable::create(Layout::CanvasBox const& layout_box)
|
||||||
{
|
{
|
||||||
return layout_box.heap().allocate_without_realm<CanvasPaintable>(layout_box);
|
return layout_box.heap().allocate_without_realm<CanvasPaintable>(layout_box);
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class CanvasPaintable final : public PaintableBox {
|
class CanvasPaintable final : public PaintableBox {
|
||||||
JS_CELL(CanvasPaintable, PaintableBox);
|
JS_CELL(CanvasPaintable, PaintableBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(CanvasPaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<CanvasPaintable> create(Layout::CanvasBox const&);
|
static JS::NonnullGCPtr<CanvasPaintable> create(Layout::CanvasBox const&);
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(CheckBoxPaintable);
|
||||||
|
|
||||||
// A 16x16 signed distance field for the checkbox's tick (slightly rounded):
|
// A 16x16 signed distance field for the checkbox's tick (slightly rounded):
|
||||||
static constexpr Array<u8, 16 * 16> s_check_mark_sdf {
|
static constexpr Array<u8, 16 * 16> s_check_mark_sdf {
|
||||||
254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 251, 254, 254, 254,
|
254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 251, 254, 254, 254,
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class CheckBoxPaintable final : public LabelablePaintable {
|
class CheckBoxPaintable final : public LabelablePaintable {
|
||||||
JS_CELL(CheckBoxPaintable, LabelablePaintable);
|
JS_CELL(CheckBoxPaintable, LabelablePaintable);
|
||||||
|
JS_DECLARE_ALLOCATOR(CheckBoxPaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<CheckBoxPaintable> create(Layout::CheckBox const&);
|
static JS::NonnullGCPtr<CheckBoxPaintable> create(Layout::CheckBox const&);
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(ImagePaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<ImagePaintable> ImagePaintable::create(Layout::ImageBox const& layout_box)
|
JS::NonnullGCPtr<ImagePaintable> ImagePaintable::create(Layout::ImageBox const& layout_box)
|
||||||
{
|
{
|
||||||
auto alt = layout_box.dom_node().get_attribute_value(HTML::AttributeNames::alt);
|
auto alt = layout_box.dom_node().get_attribute_value(HTML::AttributeNames::alt);
|
||||||
|
|
|
@ -15,6 +15,7 @@ class ImagePaintable final
|
||||||
: public PaintableBox
|
: public PaintableBox
|
||||||
, public DOM::Document::ViewportClient {
|
, public DOM::Document::ViewportClient {
|
||||||
JS_CELL(ImagePaintable, PaintableBox);
|
JS_CELL(ImagePaintable, PaintableBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(ImagePaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<ImagePaintable> create(Layout::ImageBox const&);
|
static JS::NonnullGCPtr<ImagePaintable> create(Layout::ImageBox const&);
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(InlinePaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<InlinePaintable> InlinePaintable::create(Layout::InlineNode const& layout_node)
|
JS::NonnullGCPtr<InlinePaintable> InlinePaintable::create(Layout::InlineNode const& layout_node)
|
||||||
{
|
{
|
||||||
return layout_node.heap().allocate_without_realm<InlinePaintable>(layout_node);
|
return layout_node.heap().allocate_without_realm<InlinePaintable>(layout_node);
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class InlinePaintable final : public Paintable {
|
class InlinePaintable final : public Paintable {
|
||||||
JS_CELL(InlinePaintable, Paintable);
|
JS_CELL(InlinePaintable, Paintable);
|
||||||
|
JS_DECLARE_ALLOCATOR(InlinePaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<InlinePaintable> create(Layout::InlineNode const&);
|
static JS::NonnullGCPtr<InlinePaintable> create(Layout::InlineNode const&);
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(MarkerPaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<MarkerPaintable> MarkerPaintable::create(Layout::ListItemMarkerBox const& layout_box)
|
JS::NonnullGCPtr<MarkerPaintable> MarkerPaintable::create(Layout::ListItemMarkerBox const& layout_box)
|
||||||
{
|
{
|
||||||
return layout_box.heap().allocate_without_realm<MarkerPaintable>(layout_box);
|
return layout_box.heap().allocate_without_realm<MarkerPaintable>(layout_box);
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class MarkerPaintable final : public PaintableBox {
|
class MarkerPaintable final : public PaintableBox {
|
||||||
JS_CELL(MarkerPaintable, PaintableBox);
|
JS_CELL(MarkerPaintable, PaintableBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(MarkerPaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<MarkerPaintable> create(Layout::ListItemMarkerBox const&);
|
static JS::NonnullGCPtr<MarkerPaintable> create(Layout::ListItemMarkerBox const&);
|
||||||
|
|
|
@ -14,6 +14,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(NestedBrowsingContextPaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<NestedBrowsingContextPaintable> NestedBrowsingContextPaintable::create(Layout::FrameBox const& layout_box)
|
JS::NonnullGCPtr<NestedBrowsingContextPaintable> NestedBrowsingContextPaintable::create(Layout::FrameBox const& layout_box)
|
||||||
{
|
{
|
||||||
return layout_box.heap().allocate_without_realm<NestedBrowsingContextPaintable>(layout_box);
|
return layout_box.heap().allocate_without_realm<NestedBrowsingContextPaintable>(layout_box);
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class NestedBrowsingContextPaintable final : public PaintableBox {
|
class NestedBrowsingContextPaintable final : public PaintableBox {
|
||||||
JS_CELL(NestedBrowsingContextPaintable, PaintableBox);
|
JS_CELL(NestedBrowsingContextPaintable, PaintableBox);
|
||||||
|
JS_DECLARE_ALLOCATOR(NestedBrowsingContextPaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<NestedBrowsingContextPaintable> create(Layout::FrameBox const&);
|
static JS::NonnullGCPtr<NestedBrowsingContextPaintable> create(Layout::FrameBox const&);
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(RadioButtonPaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<RadioButtonPaintable> RadioButtonPaintable::create(Layout::RadioButton const& layout_box)
|
JS::NonnullGCPtr<RadioButtonPaintable> RadioButtonPaintable::create(Layout::RadioButton const& layout_box)
|
||||||
{
|
{
|
||||||
return layout_box.heap().allocate_without_realm<RadioButtonPaintable>(layout_box);
|
return layout_box.heap().allocate_without_realm<RadioButtonPaintable>(layout_box);
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class RadioButtonPaintable final : public LabelablePaintable {
|
class RadioButtonPaintable final : public LabelablePaintable {
|
||||||
JS_CELL(RadioButtonPaintable, LabelablePaintable);
|
JS_CELL(RadioButtonPaintable, LabelablePaintable);
|
||||||
|
JS_DECLARE_ALLOCATOR(RadioButtonPaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<RadioButtonPaintable> create(Layout::RadioButton const&);
|
static JS::NonnullGCPtr<RadioButtonPaintable> create(Layout::RadioButton const&);
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
namespace Web::Painting {
|
namespace Web::Painting {
|
||||||
|
|
||||||
|
JS_DEFINE_ALLOCATOR(SVGClipPaintable);
|
||||||
|
|
||||||
JS::NonnullGCPtr<SVGClipPaintable> SVGClipPaintable::create(Layout::SVGClipBox const& layout_box)
|
JS::NonnullGCPtr<SVGClipPaintable> SVGClipPaintable::create(Layout::SVGClipBox const& layout_box)
|
||||||
{
|
{
|
||||||
return layout_box.heap().allocate_without_realm<SVGClipPaintable>(layout_box);
|
return layout_box.heap().allocate_without_realm<SVGClipPaintable>(layout_box);
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Web::Painting {
|
||||||
|
|
||||||
class SVGClipPaintable : public SVGPaintable {
|
class SVGClipPaintable : public SVGPaintable {
|
||||||
JS_CELL(SVGClipPaintable, SVGPaintable);
|
JS_CELL(SVGClipPaintable, SVGPaintable);
|
||||||
|
JS_DECLARE_ALLOCATOR(SVGClipPaintable);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<SVGClipPaintable> create(Layout::SVGClipBox const&);
|
static JS::NonnullGCPtr<SVGClipPaintable> create(Layout::SVGClipBox const&);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue