mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 00:32:45 +00:00 
			
		
		
		
	Libraries: Use default constructors/destructors in LibWeb
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
This commit is contained in:
		
							parent
							
								
									c0dd188c4d
								
							
						
					
					
						commit
						c37820b898
					
				
					 237 changed files with 243 additions and 730 deletions
				
			
		|  | @ -29,10 +29,6 @@ void AudioConstructor::initialize(JS::GlobalObject& global_object) | ||||||
|     define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable); |     define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| AudioConstructor::~AudioConstructor() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| JS::ThrowCompletionOr<JS::Value> AudioConstructor::call() | JS::ThrowCompletionOr<JS::Value> AudioConstructor::call() | ||||||
| { | { | ||||||
|     return vm().throw_completion<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "Audio"); |     return vm().throw_completion<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "Audio"); | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ class AudioConstructor final : public JS::NativeFunction { | ||||||
| public: | public: | ||||||
|     explicit AudioConstructor(JS::GlobalObject&); |     explicit AudioConstructor(JS::GlobalObject&); | ||||||
|     virtual void initialize(JS::GlobalObject&) override; |     virtual void initialize(JS::GlobalObject&) override; | ||||||
|     virtual ~AudioConstructor() override; |     virtual ~AudioConstructor() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual JS::ThrowCompletionOr<JS::Value> call() override; |     virtual JS::ThrowCompletionOr<JS::Value> call() override; | ||||||
|     virtual JS::ThrowCompletionOr<JS::Object*> construct(JS::FunctionObject& new_target) override; |     virtual JS::ThrowCompletionOr<JS::Object*> construct(JS::FunctionObject& new_target) override; | ||||||
|  |  | ||||||
|  | @ -18,10 +18,6 @@ CSSNamespace::CSSNamespace(JS::GlobalObject& global_object) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSNamespace::~CSSNamespace() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void CSSNamespace::initialize(JS::GlobalObject& global_object) | void CSSNamespace::initialize(JS::GlobalObject& global_object) | ||||||
| { | { | ||||||
|     Object::initialize(global_object); |     Object::initialize(global_object); | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ class CSSNamespace final : public JS::Object { | ||||||
| public: | public: | ||||||
|     explicit CSSNamespace(JS::GlobalObject&); |     explicit CSSNamespace(JS::GlobalObject&); | ||||||
|     virtual void initialize(JS::GlobalObject&) override; |     virtual void initialize(JS::GlobalObject&) override; | ||||||
|     virtual ~CSSNamespace() override; |     virtual ~CSSNamespace() override = default; | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     JS_DECLARE_NATIVE_FUNCTION(escape); |     JS_DECLARE_NATIVE_FUNCTION(escape); | ||||||
|  |  | ||||||
|  | @ -18,9 +18,5 @@ EventListenerWrapper::EventListenerWrapper(JS::GlobalObject& global_object, DOM: | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| EventListenerWrapper::~EventListenerWrapper() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| } | } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ class EventListenerWrapper final : public Wrapper { | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|     EventListenerWrapper(JS::GlobalObject&, DOM::IDLEventListener&); |     EventListenerWrapper(JS::GlobalObject&, DOM::IDLEventListener&); | ||||||
|     virtual ~EventListenerWrapper() override; |     virtual ~EventListenerWrapper() override = default; | ||||||
| 
 | 
 | ||||||
|     DOM::IDLEventListener& impl() { return *m_impl; } |     DOM::IDLEventListener& impl() { return *m_impl; } | ||||||
|     DOM::IDLEventListener const& impl() const { return *m_impl; } |     DOM::IDLEventListener const& impl() const { return *m_impl; } | ||||||
|  |  | ||||||
|  | @ -29,10 +29,6 @@ void ImageConstructor::initialize(JS::GlobalObject& global_object) | ||||||
|     define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable); |     define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ImageConstructor::~ImageConstructor() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| JS::ThrowCompletionOr<JS::Value> ImageConstructor::call() | JS::ThrowCompletionOr<JS::Value> ImageConstructor::call() | ||||||
| { | { | ||||||
|     return vm().throw_completion<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "Image"); |     return vm().throw_completion<JS::TypeError>(global_object(), JS::ErrorType::ConstructorWithoutNew, "Image"); | ||||||
|  |  | ||||||
|  | @ -14,7 +14,7 @@ class ImageConstructor final : public JS::NativeFunction { | ||||||
| public: | public: | ||||||
|     explicit ImageConstructor(JS::GlobalObject&); |     explicit ImageConstructor(JS::GlobalObject&); | ||||||
|     virtual void initialize(JS::GlobalObject&) override; |     virtual void initialize(JS::GlobalObject&) override; | ||||||
|     virtual ~ImageConstructor() override; |     virtual ~ImageConstructor() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual JS::ThrowCompletionOr<JS::Value> call() override; |     virtual JS::ThrowCompletionOr<JS::Value> call() override; | ||||||
|     virtual JS::ThrowCompletionOr<JS::Object*> construct(JS::FunctionObject& new_target) override; |     virtual JS::ThrowCompletionOr<JS::Object*> construct(JS::FunctionObject& new_target) override; | ||||||
|  |  | ||||||
|  | @ -53,10 +53,6 @@ void LocationObject::initialize(JS::GlobalObject& global_object) | ||||||
|     m_default_properties.extend(MUST(Object::internal_own_property_keys())); |     m_default_properties.extend(MUST(Object::internal_own_property_keys())); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| LocationObject::~LocationObject() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://html.spec.whatwg.org/multipage/history.html#relevant-document
 | // https://html.spec.whatwg.org/multipage/history.html#relevant-document
 | ||||||
| DOM::Document const* LocationObject::relevant_document() const | DOM::Document const* LocationObject::relevant_document() const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ class LocationObject final : public JS::Object { | ||||||
| public: | public: | ||||||
|     explicit LocationObject(JS::GlobalObject&); |     explicit LocationObject(JS::GlobalObject&); | ||||||
|     virtual void initialize(JS::GlobalObject&) override; |     virtual void initialize(JS::GlobalObject&) override; | ||||||
|     virtual ~LocationObject() override; |     virtual ~LocationObject() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual JS::ThrowCompletionOr<JS::Object*> internal_get_prototype_of() const override; |     virtual JS::ThrowCompletionOr<JS::Object*> internal_get_prototype_of() const override; | ||||||
|     virtual JS::ThrowCompletionOr<bool> internal_set_prototype_of(Object* prototype) override; |     virtual JS::ThrowCompletionOr<bool> internal_set_prototype_of(Object* prototype) override; | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ | ||||||
| namespace Web::Bindings { | namespace Web::Bindings { | ||||||
| 
 | 
 | ||||||
| struct WebEngineCustomData final : public JS::VM::CustomData { | struct WebEngineCustomData final : public JS::VM::CustomData { | ||||||
|     virtual ~WebEngineCustomData() override { } |     virtual ~WebEngineCustomData() override = default; | ||||||
| 
 | 
 | ||||||
|     HTML::EventLoop event_loop; |     HTML::EventLoop event_loop; | ||||||
| }; | }; | ||||||
|  | @ -27,7 +27,7 @@ struct WebEngineCustomJobCallbackData final : public JS::JobCallback::CustomData | ||||||
|     { |     { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~WebEngineCustomJobCallbackData() override { } |     virtual ~WebEngineCustomJobCallbackData() override = default; | ||||||
| 
 | 
 | ||||||
|     HTML::EnvironmentSettingsObject& incumbent_settings; |     HTML::EnvironmentSettingsObject& incumbent_settings; | ||||||
|     OwnPtr<JS::ExecutionContext> active_script_context; |     OwnPtr<JS::ExecutionContext> active_script_context; | ||||||
|  |  | ||||||
|  | @ -40,10 +40,6 @@ void NavigatorObject::initialize(JS::GlobalObject& global_object) | ||||||
|     define_direct_property("onLine", JS::Value(true), attr); |     define_direct_property("onLine", JS::Value(true), attr); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| NavigatorObject::~NavigatorObject() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| JS_DEFINE_NATIVE_FUNCTION(NavigatorObject::user_agent_getter) | JS_DEFINE_NATIVE_FUNCTION(NavigatorObject::user_agent_getter) | ||||||
| { | { | ||||||
|     return JS::js_string(vm, ResourceLoader::the().user_agent()); |     return JS::js_string(vm, ResourceLoader::the().user_agent()); | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ class NavigatorObject final : public JS::Object { | ||||||
| public: | public: | ||||||
|     NavigatorObject(JS::GlobalObject&); |     NavigatorObject(JS::GlobalObject&); | ||||||
|     virtual void initialize(JS::GlobalObject&) override; |     virtual void initialize(JS::GlobalObject&) override; | ||||||
|     virtual ~NavigatorObject() override; |     virtual ~NavigatorObject() override = default; | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     JS_DECLARE_NATIVE_FUNCTION(user_agent_getter); |     JS_DECLARE_NATIVE_FUNCTION(user_agent_getter); | ||||||
|  |  | ||||||
|  | @ -140,10 +140,6 @@ void WindowObject::initialize_global_object() | ||||||
|     ADD_WINDOW_OBJECT_INTERFACES; |     ADD_WINDOW_OBJECT_INTERFACES; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| WindowObject::~WindowObject() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void WindowObject::visit_edges(Visitor& visitor) | void WindowObject::visit_edges(Visitor& visitor) | ||||||
| { | { | ||||||
|     GlobalObject::visit_edges(visitor); |     GlobalObject::visit_edges(visitor); | ||||||
|  |  | ||||||
|  | @ -32,7 +32,7 @@ class WindowObject | ||||||
| public: | public: | ||||||
|     explicit WindowObject(HTML::Window&); |     explicit WindowObject(HTML::Window&); | ||||||
|     virtual void initialize_global_object() override; |     virtual void initialize_global_object() override; | ||||||
|     virtual ~WindowObject() override; |     virtual ~WindowObject() override = default; | ||||||
| 
 | 
 | ||||||
|     HTML::Window& impl() { return *m_impl; } |     HTML::Window& impl() { return *m_impl; } | ||||||
|     const HTML::Window& impl() const { return *m_impl; } |     const HTML::Window& impl() const { return *m_impl; } | ||||||
|  |  | ||||||
|  | @ -10,10 +10,6 @@ | ||||||
| namespace Web { | namespace Web { | ||||||
| namespace Bindings { | namespace Bindings { | ||||||
| 
 | 
 | ||||||
| Wrappable::~Wrappable() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void Wrappable::set_wrapper(Wrapper& wrapper) | void Wrappable::set_wrapper(Wrapper& wrapper) | ||||||
| { | { | ||||||
|     VERIFY(!m_wrapper); |     VERIFY(!m_wrapper); | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ namespace Web::Bindings { | ||||||
| 
 | 
 | ||||||
| class Wrappable { | class Wrappable { | ||||||
| public: | public: | ||||||
|     virtual ~Wrappable(); |     virtual ~Wrappable() = default; | ||||||
| 
 | 
 | ||||||
|     void set_wrapper(Wrapper&); |     void set_wrapper(Wrapper&); | ||||||
|     Wrapper* wrapper() { return m_wrapper; } |     Wrapper* wrapper() { return m_wrapper; } | ||||||
|  |  | ||||||
|  | @ -13,10 +13,6 @@ CSSConditionRule::CSSConditionRule(NonnullRefPtrVector<CSSRule>&& rules) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSConditionRule::~CSSConditionRule() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void CSSConditionRule::for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const | void CSSConditionRule::for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const | ||||||
| { | { | ||||||
|     if (condition_matches()) |     if (condition_matches()) | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ class CSSConditionRule : public CSSGroupingRule { | ||||||
|     AK_MAKE_NONMOVABLE(CSSConditionRule); |     AK_MAKE_NONMOVABLE(CSSConditionRule); | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|     ~CSSConditionRule(); |     ~CSSConditionRule() = default; | ||||||
| 
 | 
 | ||||||
|     virtual String condition_text() const = 0; |     virtual String condition_text() const = 0; | ||||||
|     virtual void set_condition_text(String) = 0; |     virtual void set_condition_text(String) = 0; | ||||||
|  |  | ||||||
|  | @ -14,10 +14,6 @@ CSSGroupingRule::CSSGroupingRule(NonnullRefPtrVector<CSSRule>&& rules) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSGroupingRule::~CSSGroupingRule() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| size_t CSSGroupingRule::insert_rule(StringView, size_t) | size_t CSSGroupingRule::insert_rule(StringView, size_t) | ||||||
| { | { | ||||||
|     // https://www.w3.org/TR/cssom-1/#insert-a-css-rule
 |     // https://www.w3.org/TR/cssom-1/#insert-a-css-rule
 | ||||||
|  |  | ||||||
|  | @ -19,7 +19,7 @@ class CSSGroupingRule : public CSSRule { | ||||||
|     AK_MAKE_NONMOVABLE(CSSGroupingRule); |     AK_MAKE_NONMOVABLE(CSSGroupingRule); | ||||||
| 
 | 
 | ||||||
| public: | public: | ||||||
|     ~CSSGroupingRule(); |     ~CSSGroupingRule() = default; | ||||||
| 
 | 
 | ||||||
|     CSSRuleList const& css_rules() const { return m_rules; } |     CSSRuleList const& css_rules() const { return m_rules; } | ||||||
|     CSSRuleList& css_rules() { return m_rules; } |     CSSRuleList& css_rules() { return m_rules; } | ||||||
|  |  | ||||||
|  | @ -28,10 +28,6 @@ CSSImportRule::CSSImportRule(AK::URL url, DOM::Document& document) | ||||||
|     set_resource(ResourceLoader::the().load_resource(Resource::Type::Generic, request)); |     set_resource(ResourceLoader::the().load_resource(Resource::Type::Generic, request)); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSImportRule::~CSSImportRule() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://www.w3.org/TR/cssom/#serialize-a-css-rule
 | // https://www.w3.org/TR/cssom/#serialize-a-css-rule
 | ||||||
| String CSSImportRule::serialized() const | String CSSImportRule::serialized() const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ public: | ||||||
|         return adopt_ref(*new CSSImportRule(move(url), document)); |         return adopt_ref(*new CSSImportRule(move(url), document)); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ~CSSImportRule(); |     ~CSSImportRule() = default; | ||||||
| 
 | 
 | ||||||
|     const AK::URL& url() const { return m_url; } |     const AK::URL& url() const { return m_url; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -14,10 +14,6 @@ CSSMediaRule::CSSMediaRule(NonnullRefPtr<MediaList>&& media, NonnullRefPtrVector | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSMediaRule::~CSSMediaRule() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| String CSSMediaRule::condition_text() const | String CSSMediaRule::condition_text() const | ||||||
| { | { | ||||||
|     return m_media->media_text(); |     return m_media->media_text(); | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ public: | ||||||
|         return adopt_ref(*new CSSMediaRule(move(media_queries), move(rules))); |         return adopt_ref(*new CSSMediaRule(move(media_queries), move(rules))); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ~CSSMediaRule(); |     ~CSSMediaRule() = default; | ||||||
| 
 | 
 | ||||||
|     virtual StringView class_name() const override { return "CSSMediaRule"; }; |     virtual StringView class_name() const override { return "CSSMediaRule"; }; | ||||||
|     virtual Type type() const override { return Type::Media; }; |     virtual Type type() const override { return Type::Media; }; | ||||||
|  |  | ||||||
|  | @ -8,10 +8,6 @@ | ||||||
| 
 | 
 | ||||||
| namespace Web::CSS { | namespace Web::CSS { | ||||||
| 
 | 
 | ||||||
| CSSRule::~CSSRule() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://www.w3.org/TR/cssom/#dom-cssrule-csstext
 | // https://www.w3.org/TR/cssom/#dom-cssrule-csstext
 | ||||||
| String CSSRule::css_text() const | String CSSRule::css_text() const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -22,7 +22,7 @@ class CSSRule | ||||||
| public: | public: | ||||||
|     using WrapperType = Bindings::CSSRuleWrapper; |     using WrapperType = Bindings::CSSRuleWrapper; | ||||||
| 
 | 
 | ||||||
|     virtual ~CSSRule(); |     virtual ~CSSRule() = default; | ||||||
| 
 | 
 | ||||||
|     enum class Type : u32 { |     enum class Type : u32 { | ||||||
|         Style, |         Style, | ||||||
|  |  | ||||||
|  | @ -18,10 +18,6 @@ CSSRuleList::CSSRuleList(NonnullRefPtrVector<CSSRule>&& rules) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSRuleList::~CSSRuleList() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| bool CSSRuleList::is_supported_property_index(u32 index) const | bool CSSRuleList::is_supported_property_index(u32 index) const | ||||||
| { | { | ||||||
|     // The object’s supported property indices are the numbers in the range zero to one less than the number of CSSRule objects represented by the collection.
 |     // The object’s supported property indices are the numbers in the range zero to one less than the number of CSSRule objects represented by the collection.
 | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new CSSRuleList(move(rules))); |         return adopt_ref(*new CSSRuleList(move(rules))); | ||||||
|     } |     } | ||||||
|     ~CSSRuleList(); |     ~CSSRuleList() = default; | ||||||
| 
 | 
 | ||||||
|     RefPtr<CSSRule> item(size_t index) const |     RefPtr<CSSRule> item(size_t index) const | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -16,14 +16,6 @@ PropertyOwningCSSStyleDeclaration::PropertyOwningCSSStyleDeclaration(Vector<Styl | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| PropertyOwningCSSStyleDeclaration::~PropertyOwningCSSStyleDeclaration() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| CSSStyleDeclaration::~CSSStyleDeclaration() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| String PropertyOwningCSSStyleDeclaration::item(size_t index) const | String PropertyOwningCSSStyleDeclaration::item(size_t index) const | ||||||
| { | { | ||||||
|     if (index >= m_properties.size()) |     if (index >= m_properties.size()) | ||||||
|  | @ -43,10 +35,6 @@ ElementInlineCSSStyleDeclaration::ElementInlineCSSStyleDeclaration(DOM::Element& | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ElementInlineCSSStyleDeclaration::~ElementInlineCSSStyleDeclaration() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| size_t PropertyOwningCSSStyleDeclaration::length() const | size_t PropertyOwningCSSStyleDeclaration::length() const | ||||||
| { | { | ||||||
|     return m_properties.size(); |     return m_properties.size(); | ||||||
|  |  | ||||||
|  | @ -31,7 +31,7 @@ class CSSStyleDeclaration | ||||||
| public: | public: | ||||||
|     using WrapperType = Bindings::CSSStyleDeclarationWrapper; |     using WrapperType = Bindings::CSSStyleDeclarationWrapper; | ||||||
| 
 | 
 | ||||||
|     virtual ~CSSStyleDeclaration(); |     virtual ~CSSStyleDeclaration() = default; | ||||||
| 
 | 
 | ||||||
|     virtual size_t length() const = 0; |     virtual size_t length() const = 0; | ||||||
|     virtual String item(size_t index) const = 0; |     virtual String item(size_t index) const = 0; | ||||||
|  | @ -49,7 +49,7 @@ public: | ||||||
|     virtual String serialized() const = 0; |     virtual String serialized() const = 0; | ||||||
| 
 | 
 | ||||||
| protected: | protected: | ||||||
|     CSSStyleDeclaration() { } |     CSSStyleDeclaration() = default; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| class PropertyOwningCSSStyleDeclaration : public CSSStyleDeclaration { | class PropertyOwningCSSStyleDeclaration : public CSSStyleDeclaration { | ||||||
|  | @ -61,7 +61,7 @@ public: | ||||||
|         return adopt_ref(*new PropertyOwningCSSStyleDeclaration(move(properties), move(custom_properties))); |         return adopt_ref(*new PropertyOwningCSSStyleDeclaration(move(properties), move(custom_properties))); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~PropertyOwningCSSStyleDeclaration() override; |     virtual ~PropertyOwningCSSStyleDeclaration() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual size_t length() const override; |     virtual size_t length() const override; | ||||||
|     virtual String item(size_t index) const override; |     virtual String item(size_t index) const override; | ||||||
|  | @ -88,7 +88,7 @@ class ElementInlineCSSStyleDeclaration final : public PropertyOwningCSSStyleDecl | ||||||
| public: | public: | ||||||
|     static NonnullRefPtr<ElementInlineCSSStyleDeclaration> create(DOM::Element& element) { return adopt_ref(*new ElementInlineCSSStyleDeclaration(element)); } |     static NonnullRefPtr<ElementInlineCSSStyleDeclaration> create(DOM::Element& element) { return adopt_ref(*new ElementInlineCSSStyleDeclaration(element)); } | ||||||
|     static NonnullRefPtr<ElementInlineCSSStyleDeclaration> create_and_take_properties_from(DOM::Element& element, PropertyOwningCSSStyleDeclaration& declaration) { return adopt_ref(*new ElementInlineCSSStyleDeclaration(element, declaration)); } |     static NonnullRefPtr<ElementInlineCSSStyleDeclaration> create_and_take_properties_from(DOM::Element& element, PropertyOwningCSSStyleDeclaration& declaration) { return adopt_ref(*new ElementInlineCSSStyleDeclaration(element, declaration)); } | ||||||
|     virtual ~ElementInlineCSSStyleDeclaration() override; |     virtual ~ElementInlineCSSStyleDeclaration() override = default; | ||||||
| 
 | 
 | ||||||
|     DOM::Element* element() { return m_element.ptr(); } |     DOM::Element* element() { return m_element.ptr(); } | ||||||
|     const DOM::Element* element() const { return m_element.ptr(); } |     const DOM::Element* element() const { return m_element.ptr(); } | ||||||
|  |  | ||||||
|  | @ -15,10 +15,6 @@ CSSStyleRule::CSSStyleRule(NonnullRefPtrVector<Selector>&& selectors, NonnullRef | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSStyleRule::~CSSStyleRule() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://www.w3.org/TR/cssom/#dom-cssstylerule-style
 | // https://www.w3.org/TR/cssom/#dom-cssstylerule-style
 | ||||||
| CSSStyleDeclaration* CSSStyleRule::style() | CSSStyleDeclaration* CSSStyleRule::style() | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ public: | ||||||
|         return adopt_ref(*new CSSStyleRule(move(selectors), move(declaration))); |         return adopt_ref(*new CSSStyleRule(move(selectors), move(declaration))); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~CSSStyleRule() override; |     virtual ~CSSStyleRule() override = default; | ||||||
| 
 | 
 | ||||||
|     const NonnullRefPtrVector<Selector>& selectors() const { return m_selectors; } |     const NonnullRefPtrVector<Selector>& selectors() const { return m_selectors; } | ||||||
|     const CSSStyleDeclaration& declaration() const { return m_declaration; } |     const CSSStyleDeclaration& declaration() const { return m_declaration; } | ||||||
|  |  | ||||||
|  | @ -17,10 +17,6 @@ CSSStyleSheet::CSSStyleSheet(NonnullRefPtrVector<CSSRule> rules) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSStyleSheet::~CSSStyleSheet() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://www.w3.org/TR/cssom/#dom-cssstylesheet-insertrule
 | // https://www.w3.org/TR/cssom/#dom-cssstylesheet-insertrule
 | ||||||
| DOM::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsigned index) | DOM::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsigned index) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -29,7 +29,7 @@ public: | ||||||
|         return adopt_ref(*new CSSStyleSheet(move(rules))); |         return adopt_ref(*new CSSStyleSheet(move(rules))); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~CSSStyleSheet() override; |     virtual ~CSSStyleSheet() override = default; | ||||||
| 
 | 
 | ||||||
|     void set_owner_css_rule(CSSRule* rule) { m_owner_css_rule = rule; } |     void set_owner_css_rule(CSSRule* rule) { m_owner_css_rule = rule; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -15,10 +15,6 @@ CSSSupportsRule::CSSSupportsRule(NonnullRefPtr<Supports>&& supports, NonnullRefP | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CSSSupportsRule::~CSSSupportsRule() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| String CSSSupportsRule::condition_text() const | String CSSSupportsRule::condition_text() const | ||||||
| { | { | ||||||
|     // FIXME: Serializing supports rules!
 |     // FIXME: Serializing supports rules!
 | ||||||
|  |  | ||||||
|  | @ -26,7 +26,7 @@ public: | ||||||
|         return adopt_ref(*new CSSSupportsRule(move(supports), move(rules))); |         return adopt_ref(*new CSSSupportsRule(move(supports), move(rules))); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ~CSSSupportsRule(); |     ~CSSSupportsRule() = default; | ||||||
| 
 | 
 | ||||||
|     virtual StringView class_name() const override { return "CSSSupportsRule"; }; |     virtual StringView class_name() const override { return "CSSSupportsRule"; }; | ||||||
|     virtual Type type() const override { return Type::Supports; }; |     virtual Type type() const override { return Type::Supports; }; | ||||||
|  |  | ||||||
|  | @ -14,10 +14,6 @@ MediaList::MediaList(NonnullRefPtrVector<MediaQuery>&& media) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| MediaList::~MediaList() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://www.w3.org/TR/cssom-1/#dom-medialist-mediatext
 | // https://www.w3.org/TR/cssom-1/#dom-medialist-mediatext
 | ||||||
| String MediaList::media_text() const | String MediaList::media_text() const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -20,7 +20,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new MediaList(move(media))); |         return adopt_ref(*new MediaList(move(media))); | ||||||
|     } |     } | ||||||
|     ~MediaList(); |     ~MediaList() = default; | ||||||
| 
 | 
 | ||||||
|     String media_text() const; |     String media_text() const; | ||||||
|     void set_media_text(String const&); |     void set_media_text(String const&); | ||||||
|  |  | ||||||
|  | @ -205,7 +205,7 @@ struct MediaCondition { | ||||||
|     String to_string() const; |     String to_string() const; | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     MediaCondition() { } |     MediaCondition() = default; | ||||||
|     Type type; |     Type type; | ||||||
|     Optional<MediaFeature> feature; |     Optional<MediaFeature> feature; | ||||||
|     NonnullOwnPtrVector<MediaCondition> conditions; |     NonnullOwnPtrVector<MediaCondition> conditions; | ||||||
|  |  | ||||||
|  | @ -22,10 +22,6 @@ MediaQueryList::MediaQueryList(DOM::Document& document, NonnullRefPtrVector<Medi | ||||||
|     evaluate(); |     evaluate(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| MediaQueryList::~MediaQueryList() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://drafts.csswg.org/cssom-view/#dom-mediaquerylist-media
 | // https://drafts.csswg.org/cssom-view/#dom-mediaquerylist-media
 | ||||||
| String MediaQueryList::media() const | String MediaQueryList::media() const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -34,7 +34,7 @@ public: | ||||||
|         return adopt_ref(*new MediaQueryList(document, move(media_queries))); |         return adopt_ref(*new MediaQueryList(document, move(media_queries))); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~MediaQueryList() override; |     virtual ~MediaQueryList() override = default; | ||||||
| 
 | 
 | ||||||
|     String media() const; |     String media() const; | ||||||
|     bool matches() const; |     bool matches() const; | ||||||
|  |  | ||||||
|  | @ -70,11 +70,6 @@ TokenStream<T>::TokenStream(Vector<T> const& tokens) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| template<typename T> |  | ||||||
| TokenStream<T>::~TokenStream() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| template<typename T> | template<typename T> | ||||||
| bool TokenStream<T>::has_next_token() | bool TokenStream<T>::has_next_token() | ||||||
| { | { | ||||||
|  | @ -164,10 +159,6 @@ Parser::Parser(ParsingContext const& context, StringView input, String const& en | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Parser::~Parser() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| NonnullRefPtr<CSSStyleSheet> Parser::parse_as_stylesheet() | NonnullRefPtr<CSSStyleSheet> Parser::parse_as_stylesheet() | ||||||
| { | { | ||||||
|     return parse_a_stylesheet(m_token_stream); |     return parse_a_stylesheet(m_token_stream); | ||||||
|  |  | ||||||
|  | @ -59,7 +59,7 @@ template<typename T> | ||||||
| class TokenStream { | class TokenStream { | ||||||
| public: | public: | ||||||
|     explicit TokenStream(Vector<T> const&); |     explicit TokenStream(Vector<T> const&); | ||||||
|     ~TokenStream(); |     ~TokenStream() = default; | ||||||
| 
 | 
 | ||||||
|     TokenStream(TokenStream<T> const&) = delete; |     TokenStream(TokenStream<T> const&) = delete; | ||||||
| 
 | 
 | ||||||
|  | @ -87,7 +87,7 @@ private: | ||||||
| class Parser { | class Parser { | ||||||
| public: | public: | ||||||
|     Parser(ParsingContext const&, StringView input, String const& encoding = "utf-8"); |     Parser(ParsingContext const&, StringView input, String const& encoding = "utf-8"); | ||||||
|     ~Parser(); |     ~Parser() = default; | ||||||
| 
 | 
 | ||||||
|     // The normal parser entry point, for parsing stylesheets.
 |     // The normal parser entry point, for parsing stylesheets.
 | ||||||
|     NonnullRefPtr<CSSStyleSheet> parse_as_stylesheet(); |     NonnullRefPtr<CSSStyleSheet> parse_as_stylesheet(); | ||||||
|  |  | ||||||
|  | @ -25,16 +25,16 @@ DeclarationOrAtRule::DeclarationOrAtRule(StyleDeclarationRule declaration) | ||||||
|     , m_declaration(move(declaration)) |     , m_declaration(move(declaration)) | ||||||
| { | { | ||||||
| } | } | ||||||
| DeclarationOrAtRule::~DeclarationOrAtRule() { } | DeclarationOrAtRule::~DeclarationOrAtRule() = default; | ||||||
| 
 | 
 | ||||||
| StyleRule::StyleRule(StyleRule::Type type) | StyleRule::StyleRule(StyleRule::Type type) | ||||||
|     : m_type(type) |     : m_type(type) | ||||||
| { | { | ||||||
| } | } | ||||||
| StyleRule::~StyleRule() { } | StyleRule::~StyleRule() = default; | ||||||
| 
 | 
 | ||||||
| StyleBlockRule::StyleBlockRule() { } | StyleBlockRule::StyleBlockRule() = default; | ||||||
| StyleBlockRule::~StyleBlockRule() { } | StyleBlockRule::~StyleBlockRule() = default; | ||||||
| 
 | 
 | ||||||
| StyleComponentValueRule::StyleComponentValueRule(Token token) | StyleComponentValueRule::StyleComponentValueRule(Token token) | ||||||
|     : m_type(StyleComponentValueRule::ComponentType::Token) |     : m_type(StyleComponentValueRule::ComponentType::Token) | ||||||
|  | @ -51,10 +51,10 @@ StyleComponentValueRule::StyleComponentValueRule(NonnullRefPtr<StyleBlockRule> b | ||||||
|     , m_block(block) |     , m_block(block) | ||||||
| { | { | ||||||
| } | } | ||||||
| StyleComponentValueRule::~StyleComponentValueRule() { } | StyleComponentValueRule::~StyleComponentValueRule() = default; | ||||||
| 
 | 
 | ||||||
| StyleDeclarationRule::StyleDeclarationRule() { } | StyleDeclarationRule::StyleDeclarationRule() = default; | ||||||
| StyleDeclarationRule::~StyleDeclarationRule() { } | StyleDeclarationRule::~StyleDeclarationRule() = default; | ||||||
| 
 | 
 | ||||||
| StyleFunctionRule::StyleFunctionRule(String name) | StyleFunctionRule::StyleFunctionRule(String name) | ||||||
|     : m_name(move(name)) |     : m_name(move(name)) | ||||||
|  | @ -66,7 +66,7 @@ StyleFunctionRule::StyleFunctionRule(String name, Vector<StyleComponentValueRule | ||||||
|     , m_values(move(values)) |     , m_values(move(values)) | ||||||
| { | { | ||||||
| } | } | ||||||
| StyleFunctionRule::~StyleFunctionRule() { } | StyleFunctionRule::~StyleFunctionRule() = default; | ||||||
| 
 | 
 | ||||||
| template<class SeparatorType, class CollectionType> | template<class SeparatorType, class CollectionType> | ||||||
| void append_with_to_string(StringBuilder& builder, SeparatorType& separator, CollectionType& collection) | void append_with_to_string(StringBuilder& builder, SeparatorType& separator, CollectionType& collection) | ||||||
|  |  | ||||||
|  | @ -60,7 +60,7 @@ public: | ||||||
|     { |     { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~PercentageOr() { } |     virtual ~PercentageOr() = default; | ||||||
| 
 | 
 | ||||||
|     PercentageOr<T>& operator=(T t) |     PercentageOr<T>& operator=(T t) | ||||||
|     { |     { | ||||||
|  |  | ||||||
|  | @ -19,10 +19,6 @@ ResolvedCSSStyleDeclaration::ResolvedCSSStyleDeclaration(DOM::Element& element) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ResolvedCSSStyleDeclaration::~ResolvedCSSStyleDeclaration() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| size_t ResolvedCSSStyleDeclaration::length() const | size_t ResolvedCSSStyleDeclaration::length() const | ||||||
| { | { | ||||||
|     return 0; |     return 0; | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ public: | ||||||
|         return adopt_ref(*new ResolvedCSSStyleDeclaration(element)); |         return adopt_ref(*new ResolvedCSSStyleDeclaration(element)); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~ResolvedCSSStyleDeclaration() override; |     virtual ~ResolvedCSSStyleDeclaration() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual size_t length() const override; |     virtual size_t length() const override; | ||||||
|     virtual String item(size_t index) const override; |     virtual String item(size_t index) const override; | ||||||
|  |  | ||||||
|  | @ -25,10 +25,6 @@ Selector::Selector(Vector<CompoundSelector>&& compound_selectors) | ||||||
|     } |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Selector::~Selector() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://www.w3.org/TR/selectors-4/#specificity-rules
 | // https://www.w3.org/TR/selectors-4/#specificity-rules
 | ||||||
| u32 Selector::specificity() const | u32 Selector::specificity() const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -132,7 +132,7 @@ public: | ||||||
|         return adopt_ref(*new Selector(move(compound_selectors))); |         return adopt_ref(*new Selector(move(compound_selectors))); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     ~Selector(); |     ~Selector() = default; | ||||||
| 
 | 
 | ||||||
|     Vector<CompoundSelector> const& compound_selectors() const { return m_compound_selectors; } |     Vector<CompoundSelector> const& compound_selectors() const { return m_compound_selectors; } | ||||||
|     Optional<PseudoElement> pseudo_element() const { return m_pseudo_element; } |     Optional<PseudoElement> pseudo_element() const { return m_pseudo_element; } | ||||||
|  |  | ||||||
|  | @ -30,10 +30,6 @@ StyleComputer::StyleComputer(DOM::Document& document) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| StyleComputer::~StyleComputer() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| static StyleSheet& default_stylesheet() | static StyleSheet& default_stylesheet() | ||||||
| { | { | ||||||
|     static StyleSheet* sheet; |     static StyleSheet* sheet; | ||||||
|  |  | ||||||
|  | @ -48,7 +48,7 @@ private: | ||||||
| class StyleComputer { | class StyleComputer { | ||||||
| public: | public: | ||||||
|     explicit StyleComputer(DOM::Document&); |     explicit StyleComputer(DOM::Document&); | ||||||
|     ~StyleComputer(); |     ~StyleComputer() = default; | ||||||
| 
 | 
 | ||||||
|     DOM::Document& document() { return m_document; } |     DOM::Document& document() { return m_document; } | ||||||
|     DOM::Document const& document() const { return m_document; } |     DOM::Document const& document() const { return m_document; } | ||||||
|  |  | ||||||
|  | @ -15,10 +15,6 @@ | ||||||
| 
 | 
 | ||||||
| namespace Web::CSS { | namespace Web::CSS { | ||||||
| 
 | 
 | ||||||
| StyleProperties::StyleProperties() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| StyleProperties::StyleProperties(const StyleProperties& other) | StyleProperties::StyleProperties(const StyleProperties& other) | ||||||
|     : m_property_values(other.m_property_values) |     : m_property_values(other.m_property_values) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -18,7 +18,7 @@ namespace Web::CSS { | ||||||
| 
 | 
 | ||||||
| class StyleProperties : public RefCounted<StyleProperties> { | class StyleProperties : public RefCounted<StyleProperties> { | ||||||
| public: | public: | ||||||
|     StyleProperties(); |     StyleProperties() = default; | ||||||
| 
 | 
 | ||||||
|     explicit StyleProperties(const StyleProperties&); |     explicit StyleProperties(const StyleProperties&); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -23,10 +23,6 @@ StyleValue::StyleValue(Type type) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| StyleValue::~StyleValue() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| AngleStyleValue const& StyleValue::as_angle() const | AngleStyleValue const& StyleValue::as_angle() const | ||||||
| { | { | ||||||
|     VERIFY(is_angle()); |     VERIFY(is_angle()); | ||||||
|  |  | ||||||
|  | @ -321,7 +321,7 @@ enum class PointerEvents { | ||||||
| 
 | 
 | ||||||
| class StyleValue : public RefCounted<StyleValue> { | class StyleValue : public RefCounted<StyleValue> { | ||||||
| public: | public: | ||||||
|     virtual ~StyleValue(); |     virtual ~StyleValue() = default; | ||||||
| 
 | 
 | ||||||
|     enum class Type { |     enum class Type { | ||||||
|         Angle, |         Angle, | ||||||
|  | @ -539,7 +539,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new BackgroundStyleValue(color, image, position, size, repeat, attachment, origin, clip)); |         return adopt_ref(*new BackgroundStyleValue(color, image, position, size, repeat, attachment, origin, clip)); | ||||||
|     } |     } | ||||||
|     virtual ~BackgroundStyleValue() override { } |     virtual ~BackgroundStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     size_t layer_count() const { return m_layer_count; } |     size_t layer_count() const { return m_layer_count; } | ||||||
| 
 | 
 | ||||||
|  | @ -583,7 +583,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new BackgroundRepeatStyleValue(repeat_x, repeat_y)); |         return adopt_ref(*new BackgroundRepeatStyleValue(repeat_x, repeat_y)); | ||||||
|     } |     } | ||||||
|     virtual ~BackgroundRepeatStyleValue() override { } |     virtual ~BackgroundRepeatStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     Repeat repeat_x() const { return m_repeat_x; } |     Repeat repeat_x() const { return m_repeat_x; } | ||||||
|     Repeat repeat_y() const { return m_repeat_y; } |     Repeat repeat_y() const { return m_repeat_y; } | ||||||
|  | @ -617,7 +617,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new BackgroundSizeStyleValue(size_x, size_y)); |         return adopt_ref(*new BackgroundSizeStyleValue(size_x, size_y)); | ||||||
|     } |     } | ||||||
|     virtual ~BackgroundSizeStyleValue() override { } |     virtual ~BackgroundSizeStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     LengthPercentage size_x() const { return m_size_x; } |     LengthPercentage size_x() const { return m_size_x; } | ||||||
|     LengthPercentage size_y() const { return m_size_y; } |     LengthPercentage size_y() const { return m_size_y; } | ||||||
|  | @ -653,7 +653,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new BorderStyleValue(border_width, border_style, border_color)); |         return adopt_ref(*new BorderStyleValue(border_width, border_style, border_color)); | ||||||
|     } |     } | ||||||
|     virtual ~BorderStyleValue() override { } |     virtual ~BorderStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<StyleValue> border_width() const { return m_border_width; } |     NonnullRefPtr<StyleValue> border_width() const { return m_border_width; } | ||||||
|     NonnullRefPtr<StyleValue> border_style() const { return m_border_style; } |     NonnullRefPtr<StyleValue> border_style() const { return m_border_style; } | ||||||
|  | @ -684,7 +684,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new BorderRadiusStyleValue(horizontal_radius, vertical_radius)); |         return adopt_ref(*new BorderRadiusStyleValue(horizontal_radius, vertical_radius)); | ||||||
|     } |     } | ||||||
|     virtual ~BorderRadiusStyleValue() override { } |     virtual ~BorderRadiusStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     LengthPercentage const& horizontal_radius() const { return m_horizontal_radius; } |     LengthPercentage const& horizontal_radius() const { return m_horizontal_radius; } | ||||||
|     LengthPercentage const& vertical_radius() const { return m_vertical_radius; } |     LengthPercentage const& vertical_radius() const { return m_vertical_radius; } | ||||||
|  | @ -725,7 +725,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new BoxShadowStyleValue(color, offset_x, offset_y, blur_radius, spread_distance, placement)); |         return adopt_ref(*new BoxShadowStyleValue(color, offset_x, offset_y, blur_radius, spread_distance, placement)); | ||||||
|     } |     } | ||||||
|     virtual ~BoxShadowStyleValue() override { } |     virtual ~BoxShadowStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     Color const& color() const { return m_color; } |     Color const& color() const { return m_color; } | ||||||
|     Length const& offset_x() const { return m_offset_x; } |     Length const& offset_x() const { return m_offset_x; } | ||||||
|  | @ -966,7 +966,7 @@ private: | ||||||
| class ColorStyleValue : public StyleValue { | class ColorStyleValue : public StyleValue { | ||||||
| public: | public: | ||||||
|     static NonnullRefPtr<ColorStyleValue> create(Color color); |     static NonnullRefPtr<ColorStyleValue> create(Color color); | ||||||
|     virtual ~ColorStyleValue() override { } |     virtual ~ColorStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     Color color() const { return m_color; } |     Color color() const { return m_color; } | ||||||
|     virtual String to_string() const override; |     virtual String to_string() const override; | ||||||
|  | @ -996,7 +996,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new CombinedBorderRadiusStyleValue(top_left, top_right, bottom_right, bottom_left)); |         return adopt_ref(*new CombinedBorderRadiusStyleValue(top_left, top_right, bottom_right, bottom_left)); | ||||||
|     } |     } | ||||||
|     virtual ~CombinedBorderRadiusStyleValue() override { } |     virtual ~CombinedBorderRadiusStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<BorderRadiusStyleValue> top_left() const { return m_top_left; } |     NonnullRefPtr<BorderRadiusStyleValue> top_left() const { return m_top_left; } | ||||||
|     NonnullRefPtr<BorderRadiusStyleValue> top_right() const { return m_top_right; } |     NonnullRefPtr<BorderRadiusStyleValue> top_right() const { return m_top_right; } | ||||||
|  | @ -1055,7 +1055,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new FlexStyleValue(grow, shrink, basis)); |         return adopt_ref(*new FlexStyleValue(grow, shrink, basis)); | ||||||
|     } |     } | ||||||
|     virtual ~FlexStyleValue() override { } |     virtual ~FlexStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<StyleValue> grow() const { return m_grow; } |     NonnullRefPtr<StyleValue> grow() const { return m_grow; } | ||||||
|     NonnullRefPtr<StyleValue> shrink() const { return m_shrink; } |     NonnullRefPtr<StyleValue> shrink() const { return m_shrink; } | ||||||
|  | @ -1086,7 +1086,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new FlexFlowStyleValue(flex_direction, flex_wrap)); |         return adopt_ref(*new FlexFlowStyleValue(flex_direction, flex_wrap)); | ||||||
|     } |     } | ||||||
|     virtual ~FlexFlowStyleValue() override { } |     virtual ~FlexFlowStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<StyleValue> flex_direction() const { return m_flex_direction; } |     NonnullRefPtr<StyleValue> flex_direction() const { return m_flex_direction; } | ||||||
|     NonnullRefPtr<StyleValue> flex_wrap() const { return m_flex_wrap; } |     NonnullRefPtr<StyleValue> flex_wrap() const { return m_flex_wrap; } | ||||||
|  | @ -1108,7 +1108,7 @@ private: | ||||||
| class FontStyleValue final : public StyleValue { | class FontStyleValue final : public StyleValue { | ||||||
| public: | public: | ||||||
|     static NonnullRefPtr<FontStyleValue> create(NonnullRefPtr<StyleValue> font_style, NonnullRefPtr<StyleValue> font_weight, NonnullRefPtr<StyleValue> font_size, NonnullRefPtr<StyleValue> line_height, NonnullRefPtr<StyleValue> font_families) { return adopt_ref(*new FontStyleValue(font_style, font_weight, font_size, line_height, font_families)); } |     static NonnullRefPtr<FontStyleValue> create(NonnullRefPtr<StyleValue> font_style, NonnullRefPtr<StyleValue> font_weight, NonnullRefPtr<StyleValue> font_size, NonnullRefPtr<StyleValue> line_height, NonnullRefPtr<StyleValue> font_families) { return adopt_ref(*new FontStyleValue(font_style, font_weight, font_size, line_height, font_families)); } | ||||||
|     virtual ~FontStyleValue() override { } |     virtual ~FontStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<StyleValue> font_style() const { return m_font_style; } |     NonnullRefPtr<StyleValue> font_style() const { return m_font_style; } | ||||||
|     NonnullRefPtr<StyleValue> font_weight() const { return m_font_weight; } |     NonnullRefPtr<StyleValue> font_weight() const { return m_font_weight; } | ||||||
|  | @ -1172,7 +1172,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new IdentifierStyleValue(id)); |         return adopt_ref(*new IdentifierStyleValue(id)); | ||||||
|     } |     } | ||||||
|     virtual ~IdentifierStyleValue() override { } |     virtual ~IdentifierStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     CSS::ValueID id() const { return m_id; } |     CSS::ValueID id() const { return m_id; } | ||||||
| 
 | 
 | ||||||
|  | @ -1205,7 +1205,7 @@ class ImageStyleValue final | ||||||
|     , public ImageResourceClient { |     , public ImageResourceClient { | ||||||
| public: | public: | ||||||
|     static NonnullRefPtr<ImageStyleValue> create(AK::URL const& url) { return adopt_ref(*new ImageStyleValue(url)); } |     static NonnullRefPtr<ImageStyleValue> create(AK::URL const& url) { return adopt_ref(*new ImageStyleValue(url)); } | ||||||
|     virtual ~ImageStyleValue() override { } |     virtual ~ImageStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual String to_string() const override; |     virtual String to_string() const override; | ||||||
| 
 | 
 | ||||||
|  | @ -1230,7 +1230,7 @@ public: | ||||||
|         static NonnullRefPtr<InheritStyleValue> instance = adopt_ref(*new InheritStyleValue); |         static NonnullRefPtr<InheritStyleValue> instance = adopt_ref(*new InheritStyleValue); | ||||||
|         return instance; |         return instance; | ||||||
|     } |     } | ||||||
|     virtual ~InheritStyleValue() override { } |     virtual ~InheritStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     String to_string() const override { return "inherit"; } |     String to_string() const override { return "inherit"; } | ||||||
| 
 | 
 | ||||||
|  | @ -1248,7 +1248,7 @@ public: | ||||||
|         static NonnullRefPtr<InitialStyleValue> instance = adopt_ref(*new InitialStyleValue); |         static NonnullRefPtr<InitialStyleValue> instance = adopt_ref(*new InitialStyleValue); | ||||||
|         return instance; |         return instance; | ||||||
|     } |     } | ||||||
|     virtual ~InitialStyleValue() override { } |     virtual ~InitialStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     String to_string() const override { return "initial"; } |     String to_string() const override { return "initial"; } | ||||||
| 
 | 
 | ||||||
|  | @ -1262,7 +1262,7 @@ private: | ||||||
| class LengthStyleValue : public StyleValue { | class LengthStyleValue : public StyleValue { | ||||||
| public: | public: | ||||||
|     static NonnullRefPtr<LengthStyleValue> create(Length const&); |     static NonnullRefPtr<LengthStyleValue> create(Length const&); | ||||||
|     virtual ~LengthStyleValue() override { } |     virtual ~LengthStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     Length const& length() const { return m_length; } |     Length const& length() const { return m_length; } | ||||||
| 
 | 
 | ||||||
|  | @ -1300,7 +1300,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new ListStyleStyleValue(position, image, style_type)); |         return adopt_ref(*new ListStyleStyleValue(position, image, style_type)); | ||||||
|     } |     } | ||||||
|     virtual ~ListStyleStyleValue() override { } |     virtual ~ListStyleStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<StyleValue> position() const { return m_position; } |     NonnullRefPtr<StyleValue> position() const { return m_position; } | ||||||
|     NonnullRefPtr<StyleValue> image() const { return m_image; } |     NonnullRefPtr<StyleValue> image() const { return m_image; } | ||||||
|  | @ -1380,7 +1380,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new OverflowStyleValue(overflow_x, overflow_y)); |         return adopt_ref(*new OverflowStyleValue(overflow_x, overflow_y)); | ||||||
|     } |     } | ||||||
|     virtual ~OverflowStyleValue() override { } |     virtual ~OverflowStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<StyleValue> overflow_x() const { return m_overflow_x; } |     NonnullRefPtr<StyleValue> overflow_x() const { return m_overflow_x; } | ||||||
|     NonnullRefPtr<StyleValue> overflow_y() const { return m_overflow_y; } |     NonnullRefPtr<StyleValue> overflow_y() const { return m_overflow_y; } | ||||||
|  | @ -1405,7 +1405,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new PercentageStyleValue(move(percentage))); |         return adopt_ref(*new PercentageStyleValue(move(percentage))); | ||||||
|     } |     } | ||||||
|     virtual ~PercentageStyleValue() override { } |     virtual ~PercentageStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     Percentage const& percentage() const { return m_percentage; } |     Percentage const& percentage() const { return m_percentage; } | ||||||
|     Percentage& percentage() { return m_percentage; } |     Percentage& percentage() { return m_percentage; } | ||||||
|  | @ -1428,7 +1428,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new PositionStyleValue(edge_x, offset_x, edge_y, offset_y)); |         return adopt_ref(*new PositionStyleValue(edge_x, offset_x, edge_y, offset_y)); | ||||||
|     } |     } | ||||||
|     virtual ~PositionStyleValue() override { } |     virtual ~PositionStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     PositionEdge edge_x() const { return m_edge_x; } |     PositionEdge edge_x() const { return m_edge_x; } | ||||||
|     LengthPercentage const& offset_x() const { return m_offset_x; } |     LengthPercentage const& offset_x() const { return m_offset_x; } | ||||||
|  | @ -1499,7 +1499,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new StringStyleValue(string)); |         return adopt_ref(*new StringStyleValue(string)); | ||||||
|     } |     } | ||||||
|     virtual ~StringStyleValue() override { } |     virtual ~StringStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     String to_string() const override { return m_string; } |     String to_string() const override { return m_string; } | ||||||
| 
 | 
 | ||||||
|  | @ -1523,7 +1523,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new TextDecorationStyleValue(line, thickness, style, color)); |         return adopt_ref(*new TextDecorationStyleValue(line, thickness, style, color)); | ||||||
|     } |     } | ||||||
|     virtual ~TextDecorationStyleValue() override { } |     virtual ~TextDecorationStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<StyleValue> line() const { return m_line; } |     NonnullRefPtr<StyleValue> line() const { return m_line; } | ||||||
|     NonnullRefPtr<StyleValue> thickness() const { return m_thickness; } |     NonnullRefPtr<StyleValue> thickness() const { return m_thickness; } | ||||||
|  | @ -1587,7 +1587,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new TransformationStyleValue(transform_function, move(values))); |         return adopt_ref(*new TransformationStyleValue(transform_function, move(values))); | ||||||
|     } |     } | ||||||
|     virtual ~TransformationStyleValue() override { } |     virtual ~TransformationStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     CSS::TransformFunction transform_function() const { return m_transform_function; } |     CSS::TransformFunction transform_function() const { return m_transform_function; } | ||||||
|     NonnullRefPtrVector<StyleValue> values() const { return m_values; } |     NonnullRefPtrVector<StyleValue> values() const { return m_values; } | ||||||
|  | @ -1612,7 +1612,7 @@ public: | ||||||
|     { |     { | ||||||
|         return adopt_ref(*new UnresolvedStyleValue(move(values), contains_var)); |         return adopt_ref(*new UnresolvedStyleValue(move(values), contains_var)); | ||||||
|     } |     } | ||||||
|     virtual ~UnresolvedStyleValue() override { } |     virtual ~UnresolvedStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual String to_string() const override; |     virtual String to_string() const override; | ||||||
| 
 | 
 | ||||||
|  | @ -1638,7 +1638,7 @@ public: | ||||||
|         static NonnullRefPtr<UnsetStyleValue> instance = adopt_ref(*new UnsetStyleValue); |         static NonnullRefPtr<UnsetStyleValue> instance = adopt_ref(*new UnsetStyleValue); | ||||||
|         return instance; |         return instance; | ||||||
|     } |     } | ||||||
|     virtual ~UnsetStyleValue() override { } |     virtual ~UnsetStyleValue() override = default; | ||||||
| 
 | 
 | ||||||
|     String to_string() const override { return "unset"; } |     String to_string() const override { return "unset"; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -15,10 +15,6 @@ AbortController::AbortController() | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| AbortController::~AbortController() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://dom.spec.whatwg.org/#dom-abortcontroller-abort
 | // https://dom.spec.whatwg.org/#dom-abortcontroller-abort
 | ||||||
| void AbortController::abort(JS::Value reason) | void AbortController::abort(JS::Value reason) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -34,7 +34,7 @@ public: | ||||||
|         return AbortController::create(); |         return AbortController::create(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~AbortController() override; |     virtual ~AbortController() override = default; | ||||||
| 
 | 
 | ||||||
|     // https://dom.spec.whatwg.org/#dom-abortcontroller-signal
 |     // https://dom.spec.whatwg.org/#dom-abortcontroller-signal
 | ||||||
|     NonnullRefPtr<AbortSignal> signal() const { return m_signal; } |     NonnullRefPtr<AbortSignal> signal() const { return m_signal; } | ||||||
|  |  | ||||||
|  | @ -19,10 +19,6 @@ AbortSignal::AbortSignal() | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| AbortSignal::~AbortSignal() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| JS::Object* AbortSignal::create_wrapper(JS::GlobalObject& global_object) | JS::Object* AbortSignal::create_wrapper(JS::GlobalObject& global_object) | ||||||
| { | { | ||||||
|     return wrap(global_object, *this); |     return wrap(global_object, *this); | ||||||
|  |  | ||||||
|  | @ -37,7 +37,7 @@ public: | ||||||
|         return AbortSignal::create(); |         return AbortSignal::create(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~AbortSignal() override; |     virtual ~AbortSignal() override = default; | ||||||
| 
 | 
 | ||||||
|     void add_abort_algorithm(Function<void()>); |     void add_abort_algorithm(Function<void()>); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -15,10 +15,6 @@ CharacterData::CharacterData(Document& document, NodeType type, const String& da | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CharacterData::~CharacterData() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| void CharacterData::set_data(String data) | void CharacterData::set_data(String data) | ||||||
| { | { | ||||||
|     if (m_data == data) |     if (m_data == data) | ||||||
|  |  | ||||||
|  | @ -20,7 +20,7 @@ class CharacterData | ||||||
| public: | public: | ||||||
|     using WrapperType = Bindings::CharacterDataWrapper; |     using WrapperType = Bindings::CharacterDataWrapper; | ||||||
| 
 | 
 | ||||||
|     virtual ~CharacterData() override; |     virtual ~CharacterData() override = default; | ||||||
| 
 | 
 | ||||||
|     const String& data() const { return m_data; } |     const String& data() const { return m_data; } | ||||||
|     void set_data(String); |     void set_data(String); | ||||||
|  |  | ||||||
|  | @ -15,10 +15,6 @@ Comment::Comment(Document& document, const String& data) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Comment::~Comment() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://dom.spec.whatwg.org/#dom-comment-comment
 | // https://dom.spec.whatwg.org/#dom-comment-comment
 | ||||||
| NonnullRefPtr<Comment> Comment::create_with_global_object(Bindings::WindowObject& window, String const& data) | NonnullRefPtr<Comment> Comment::create_with_global_object(Bindings::WindowObject& window, String const& data) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ public: | ||||||
|     using WrapperType = Bindings::CommentWrapper; |     using WrapperType = Bindings::CommentWrapper; | ||||||
| 
 | 
 | ||||||
|     explicit Comment(Document&, const String&); |     explicit Comment(Document&, const String&); | ||||||
|     virtual ~Comment() override; |     virtual ~Comment() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual FlyString node_name() const override { return "#comment"; } |     virtual FlyString node_name() const override { return "#comment"; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -9,12 +9,6 @@ | ||||||
| #include <LibWeb/DOM/IDLEventListener.h> | #include <LibWeb/DOM/IDLEventListener.h> | ||||||
| 
 | 
 | ||||||
| namespace Web::DOM { | namespace Web::DOM { | ||||||
| 
 | DOMEventListener::DOMEventListener() = default; | ||||||
| DOMEventListener::DOMEventListener() | DOMEventListener::~DOMEventListener() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| DOMEventListener::~DOMEventListener() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -92,9 +92,7 @@ Document::Document(const AK::URL& url) | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Document::~Document() | Document::~Document() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void Document::removed_last_ref() | void Document::removed_last_ref() | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -14,10 +14,6 @@ DocumentFragment::DocumentFragment(Document& document) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| DocumentFragment::~DocumentFragment() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://dom.spec.whatwg.org/#dom-documentfragment-documentfragment
 | // https://dom.spec.whatwg.org/#dom-documentfragment-documentfragment
 | ||||||
| NonnullRefPtr<DocumentFragment> DocumentFragment::create_with_global_object(Bindings::WindowObject& window) | NonnullRefPtr<DocumentFragment> DocumentFragment::create_with_global_object(Bindings::WindowObject& window) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -22,7 +22,7 @@ public: | ||||||
|     static NonnullRefPtr<DocumentFragment> create_with_global_object(Bindings::WindowObject& window); |     static NonnullRefPtr<DocumentFragment> create_with_global_object(Bindings::WindowObject& window); | ||||||
| 
 | 
 | ||||||
|     explicit DocumentFragment(Document& document); |     explicit DocumentFragment(Document& document); | ||||||
|     virtual ~DocumentFragment() override; |     virtual ~DocumentFragment() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual FlyString node_name() const override { return "#document-fragment"; } |     virtual FlyString node_name() const override { return "#document-fragment"; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -13,8 +13,4 @@ DocumentType::DocumentType(Document& document) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| DocumentType::~DocumentType() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -24,7 +24,7 @@ public: | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     explicit DocumentType(Document&); |     explicit DocumentType(Document&); | ||||||
|     virtual ~DocumentType() override; |     virtual ~DocumentType() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual FlyString node_name() const override { return "#doctype"; } |     virtual FlyString node_name() const override { return "#doctype"; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -47,9 +47,7 @@ Element::Element(Document& document, DOM::QualifiedName qualified_name) | ||||||
|     make_html_uppercased_qualified_name(); |     make_html_uppercased_qualified_name(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Element::~Element() | Element::~Element() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| // https://dom.spec.whatwg.org/#dom-element-getattribute
 | // https://dom.spec.whatwg.org/#dom-element-getattribute
 | ||||||
| String Element::get_attribute(const FlyString& name) const | String Element::get_attribute(const FlyString& name) const | ||||||
|  |  | ||||||
|  | @ -56,7 +56,7 @@ public: | ||||||
|         return Event::create(event_name, event_init); |         return Event::create(event_name, event_init); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     virtual ~Event() { } |     virtual ~Event() = default; | ||||||
| 
 | 
 | ||||||
|     double time_stamp() const; |     double time_stamp() const; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -37,13 +37,8 @@ | ||||||
| 
 | 
 | ||||||
| namespace Web::DOM { | namespace Web::DOM { | ||||||
| 
 | 
 | ||||||
| EventTarget::EventTarget() | EventTarget::EventTarget() = default; | ||||||
| { | EventTarget::~EventTarget() = default; | ||||||
| } |  | ||||||
| 
 |  | ||||||
| EventTarget::~EventTarget() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| // https://dom.spec.whatwg.org/#concept-flatten-options
 | // https://dom.spec.whatwg.org/#concept-flatten-options
 | ||||||
| static bool flatten_event_listener_options(Variant<EventListenerOptions, bool> const& options) | static bool flatten_event_listener_options(Variant<EventListenerOptions, bool> const& options) | ||||||
|  |  | ||||||
|  | @ -18,9 +18,7 @@ HTMLCollection::HTMLCollection(ParentNode& root, Function<bool(Element const&)> | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| HTMLCollection::~HTMLCollection() | HTMLCollection::~HTMLCollection() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| Vector<NonnullRefPtr<Element>> HTMLCollection::collect_matching_elements() const | Vector<NonnullRefPtr<Element>> HTMLCollection::collect_matching_elements() const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ namespace Web::DOM { | ||||||
| 
 | 
 | ||||||
| class Position { | class Position { | ||||||
| public: | public: | ||||||
|     Position() { } |     Position() = default; | ||||||
|     Position(Node&, unsigned offset); |     Position(Node&, unsigned offset); | ||||||
| 
 | 
 | ||||||
|     bool is_valid() const { return m_node; } |     bool is_valid() const { return m_node; } | ||||||
|  |  | ||||||
|  | @ -15,8 +15,4 @@ ProcessingInstruction::ProcessingInstruction(Document& document, const String& d | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| ProcessingInstruction::~ProcessingInstruction() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ public: | ||||||
|     using WrapperType = Bindings::ProcessingInstructionWrapper; |     using WrapperType = Bindings::ProcessingInstructionWrapper; | ||||||
| 
 | 
 | ||||||
|     ProcessingInstruction(Document&, const String& data, const String& target); |     ProcessingInstruction(Document&, const String& data, const String& target); | ||||||
|     virtual ~ProcessingInstruction() override; |     virtual ~ProcessingInstruction() override = default; | ||||||
| 
 | 
 | ||||||
|     virtual FlyString node_name() const override { return m_target; } |     virtual FlyString node_name() const override { return m_target; } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -43,10 +43,6 @@ Range::Range(Node& start_container, u32 start_offset, Node& end_container, u32 e | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Range::~Range() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://dom.spec.whatwg.org/#concept-range-root
 | // https://dom.spec.whatwg.org/#concept-range-root
 | ||||||
| Node& Range::root() | Node& Range::root() | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ class Range final : public AbstractRange { | ||||||
| public: | public: | ||||||
|     using WrapperType = Bindings::RangeWrapper; |     using WrapperType = Bindings::RangeWrapper; | ||||||
| 
 | 
 | ||||||
|     virtual ~Range() override; |     virtual ~Range() override = default; | ||||||
| 
 | 
 | ||||||
|     static NonnullRefPtr<Range> create(Document&); |     static NonnullRefPtr<Range> create(Document&); | ||||||
|     static NonnullRefPtr<Range> create(HTML::Window&); |     static NonnullRefPtr<Range> create(HTML::Window&); | ||||||
|  |  | ||||||
|  | @ -17,10 +17,6 @@ StaticRange::StaticRange(Node& start_container, u32 start_offset, Node& end_cont | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| StaticRange::~StaticRange() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://dom.spec.whatwg.org/#dom-staticrange-staticrange
 | // https://dom.spec.whatwg.org/#dom-staticrange-staticrange
 | ||||||
| ExceptionOr<NonnullRefPtr<StaticRange>> StaticRange::create_with_global_object(JS::GlobalObject&, StaticRangeInit& init) | ExceptionOr<NonnullRefPtr<StaticRange>> StaticRange::create_with_global_object(JS::GlobalObject&, StaticRangeInit& init) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ class StaticRange final : public AbstractRange { | ||||||
| public: | public: | ||||||
|     using WrapperType = Bindings::StaticRangeWrapper; |     using WrapperType = Bindings::StaticRangeWrapper; | ||||||
| 
 | 
 | ||||||
|     virtual ~StaticRange() override; |     virtual ~StaticRange() override = default; | ||||||
| 
 | 
 | ||||||
|     static ExceptionOr<NonnullRefPtr<StaticRange>> create_with_global_object(JS::GlobalObject&, StaticRangeInit& init); |     static ExceptionOr<NonnullRefPtr<StaticRange>> create_with_global_object(JS::GlobalObject&, StaticRangeInit& init); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -16,10 +16,6 @@ Text::Text(Document& document, const String& data) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Text::~Text() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://dom.spec.whatwg.org/#dom-text-text
 | // https://dom.spec.whatwg.org/#dom-text-text
 | ||||||
| NonnullRefPtr<Text> Text::create_with_global_object(Bindings::WindowObject& window, String const& data) | NonnullRefPtr<Text> Text::create_with_global_object(Bindings::WindowObject& window, String const& data) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ public: | ||||||
|     using WrapperType = Bindings::TextWrapper; |     using WrapperType = Bindings::TextWrapper; | ||||||
| 
 | 
 | ||||||
|     explicit Text(Document&, const String&); |     explicit Text(Document&, const String&); | ||||||
|     virtual ~Text() override; |     virtual ~Text() override = default; | ||||||
| 
 | 
 | ||||||
|     static NonnullRefPtr<Text> create_with_global_object(Bindings::WindowObject& window, String const& data); |     static NonnullRefPtr<Text> create_with_global_object(Bindings::WindowObject& window, String const& data); | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -22,10 +22,6 @@ TreeWalker::TreeWalker(Node& root) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| TreeWalker::~TreeWalker() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| // https://dom.spec.whatwg.org/#dom-document-createtreewalker
 | // https://dom.spec.whatwg.org/#dom-document-createtreewalker
 | ||||||
| NonnullRefPtr<TreeWalker> TreeWalker::create(Node& root, unsigned what_to_show, RefPtr<NodeFilter> filter) | NonnullRefPtr<TreeWalker> TreeWalker::create(Node& root, unsigned what_to_show, RefPtr<NodeFilter> filter) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -20,7 +20,7 @@ public: | ||||||
|     using WrapperType = Bindings::TreeWalkerWrapper; |     using WrapperType = Bindings::TreeWalkerWrapper; | ||||||
| 
 | 
 | ||||||
|     static NonnullRefPtr<TreeWalker> create(Node& root, unsigned what_to_show, RefPtr<NodeFilter>); |     static NonnullRefPtr<TreeWalker> create(Node& root, unsigned what_to_show, RefPtr<NodeFilter>); | ||||||
|     virtual ~TreeWalker() override; |     virtual ~TreeWalker() override = default; | ||||||
| 
 | 
 | ||||||
|     NonnullRefPtr<Node> current_node() const; |     NonnullRefPtr<Node> current_node() const; | ||||||
|     void set_current_node(Node&); |     void set_current_node(Node&); | ||||||
|  |  | ||||||
|  | @ -25,9 +25,7 @@ DOMTreeModel::DOMTreeModel(JsonObject dom_tree, GUI::TreeView& tree_view) | ||||||
|     map_dom_nodes_to_parent(nullptr, &m_dom_tree); |     map_dom_nodes_to_parent(nullptr, &m_dom_tree); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| DOMTreeModel::~DOMTreeModel() | DOMTreeModel::~DOMTreeModel() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| GUI::ModelIndex DOMTreeModel::index(int row, int column, const GUI::ModelIndex& parent) const | GUI::ModelIndex DOMTreeModel::index(int row, int column, const GUI::ModelIndex& parent) const | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -38,6 +38,6 @@ public: | ||||||
|     void set(const FontSelector&, NonnullRefPtr<Gfx::Font>); |     void set(const FontSelector&, NonnullRefPtr<Gfx::Font>); | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     FontCache() { } |     FontCache() = default; | ||||||
|     mutable HashMap<FontSelector, NonnullRefPtr<Gfx::Font>> m_fonts; |     mutable HashMap<FontSelector, NonnullRefPtr<Gfx::Font>> m_fonts; | ||||||
| }; | }; | ||||||
|  |  | ||||||
|  | @ -35,9 +35,7 @@ BrowsingContext::BrowsingContext(Page& page, HTML::BrowsingContextContainer* con | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| BrowsingContext::~BrowsingContext() | BrowsingContext::~BrowsingContext() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void BrowsingContext::did_edit(Badge<EditEventHandler>) | void BrowsingContext::did_edit(Badge<EditEventHandler>) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -30,7 +30,7 @@ public: | ||||||
| 
 | 
 | ||||||
|     class ViewportClient { |     class ViewportClient { | ||||||
|     public: |     public: | ||||||
|         virtual ~ViewportClient() { } |         virtual ~ViewportClient() = default; | ||||||
|         virtual void browsing_context_did_set_viewport_rect(Gfx::IntRect const&) = 0; |         virtual void browsing_context_did_set_viewport_rect(Gfx::IntRect const&) = 0; | ||||||
|     }; |     }; | ||||||
|     void register_viewport_client(ViewportClient&); |     void register_viewport_client(ViewportClient&); | ||||||
|  |  | ||||||
|  | @ -19,9 +19,7 @@ BrowsingContextContainer::BrowsingContextContainer(DOM::Document& document, DOM: | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| BrowsingContextContainer::~BrowsingContextContainer() | BrowsingContextContainer::~BrowsingContextContainer() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void BrowsingContextContainer::inserted() | void BrowsingContextContainer::inserted() | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -43,9 +43,7 @@ CanvasGradient::CanvasGradient(Type type) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CanvasGradient::~CanvasGradient() | CanvasGradient::~CanvasGradient() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| // https://html.spec.whatwg.org/multipage/canvas.html#dom-canvasgradient-addcolorstop
 | // https://html.spec.whatwg.org/multipage/canvas.html#dom-canvasgradient-addcolorstop
 | ||||||
| DOM::ExceptionOr<void> CanvasGradient::add_color_stop(double offset, String const& color) | DOM::ExceptionOr<void> CanvasGradient::add_color_stop(double offset, String const& color) | ||||||
|  |  | ||||||
|  | @ -28,9 +28,7 @@ CanvasRenderingContext2D::CanvasRenderingContext2D(HTMLCanvasElement& element) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| CanvasRenderingContext2D::~CanvasRenderingContext2D() | CanvasRenderingContext2D::~CanvasRenderingContext2D() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void CanvasRenderingContext2D::set_fill_style(String style) | void CanvasRenderingContext2D::set_fill_style(String style) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -10,13 +10,8 @@ | ||||||
| 
 | 
 | ||||||
| namespace Web::HTML { | namespace Web::HTML { | ||||||
| 
 | 
 | ||||||
| DOMParser::DOMParser() | DOMParser::DOMParser() = default; | ||||||
| { | DOMParser::~DOMParser() = default; | ||||||
| } |  | ||||||
| 
 |  | ||||||
| DOMParser::~DOMParser() |  | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
 | // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-domparser-parsefromstring
 | ||||||
| NonnullRefPtr<DOM::Document> DOMParser::parse_from_string(String const& string, Bindings::DOMParserSupportedType type) | NonnullRefPtr<DOM::Document> DOMParser::parse_from_string(String const& string, Bindings::DOMParserSupportedType type) | ||||||
|  |  | ||||||
|  | @ -15,9 +15,7 @@ DOMStringMap::DOMStringMap(DOM::Element& associated_element) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| DOMStringMap::~DOMStringMap() | DOMStringMap::~DOMStringMap() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| // https://html.spec.whatwg.org/multipage/dom.html#concept-domstringmap-pairs
 | // https://html.spec.whatwg.org/multipage/dom.html#concept-domstringmap-pairs
 | ||||||
| Vector<DOMStringMap::NameValuePair> DOMStringMap::get_name_value_pairs() const | Vector<DOMStringMap::NameValuePair> DOMStringMap::get_name_value_pairs() const | ||||||
|  |  | ||||||
|  | @ -23,9 +23,7 @@ EventLoop::EventLoop() | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| EventLoop::~EventLoop() | EventLoop::~EventLoop() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void EventLoop::schedule() | void EventLoop::schedule() | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -16,9 +16,7 @@ Task::Task(Source source, DOM::Document* document, Function<void()> steps) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Task::~Task() | Task::~Task() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void Task::execute() | void Task::execute() | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -14,9 +14,7 @@ TaskQueue::TaskQueue(HTML::EventLoop& event_loop) | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| TaskQueue::~TaskQueue() | TaskQueue::~TaskQueue() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void TaskQueue::add(NonnullOwnPtr<Task> task) | void TaskQueue::add(NonnullOwnPtr<Task> task) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -28,8 +28,5 @@ namespace Web::HTML { | ||||||
| ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE) | ENUMERATE_GLOBAL_EVENT_HANDLERS(__ENUMERATE) | ||||||
| #undef __ENUMERATE | #undef __ENUMERATE | ||||||
| 
 | 
 | ||||||
| GlobalEventHandlers::~GlobalEventHandlers() | GlobalEventHandlers::~GlobalEventHandlers() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -13,9 +13,7 @@ HTMLAnchorElement::HTMLAnchorElement(DOM::Document& document, DOM::QualifiedName | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| HTMLAnchorElement::~HTMLAnchorElement() | HTMLAnchorElement::~HTMLAnchorElement() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void HTMLAnchorElement::parse_attribute(FlyString const& name, String const& value) | void HTMLAnchorElement::parse_attribute(FlyString const& name, String const& value) | ||||||
| { | { | ||||||
|  |  | ||||||
|  | @ -13,9 +13,7 @@ HTMLAreaElement::HTMLAreaElement(DOM::Document& document, DOM::QualifiedName qua | ||||||
| { | { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| HTMLAreaElement::~HTMLAreaElement() | HTMLAreaElement::~HTMLAreaElement() = default; | ||||||
| { |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
| void HTMLAreaElement::parse_attribute(FlyString const& name, String const& value) | void HTMLAreaElement::parse_attribute(FlyString const& name, String const& value) | ||||||
| { | { | ||||||
|  |  | ||||||
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
	
	 Lenny Maiorani
						Lenny Maiorani