diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS')
39 files changed, 57 insertions, 142 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp index 018315bd21..f6ac1a254b 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp @@ -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 { if (condition_matches()) diff --git a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h index 9c41847a2b..78f58a9655 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.h @@ -17,7 +17,7 @@ class CSSConditionRule : public CSSGroupingRule { AK_MAKE_NONMOVABLE(CSSConditionRule); public: - ~CSSConditionRule(); + ~CSSConditionRule() = default; virtual String condition_text() const = 0; virtual void set_condition_text(String) = 0; diff --git a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp index 60584d02c5..66eb4e1dae 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.cpp @@ -14,10 +14,6 @@ CSSGroupingRule::CSSGroupingRule(NonnullRefPtrVector<CSSRule>&& rules) { } -CSSGroupingRule::~CSSGroupingRule() -{ -} - size_t CSSGroupingRule::insert_rule(StringView, size_t) { // https://www.w3.org/TR/cssom-1/#insert-a-css-rule diff --git a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.h b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.h index 20859e98cd..7161c7edaf 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSGroupingRule.h @@ -19,7 +19,7 @@ class CSSGroupingRule : public CSSRule { AK_MAKE_NONMOVABLE(CSSGroupingRule); public: - ~CSSGroupingRule(); + ~CSSGroupingRule() = default; CSSRuleList const& css_rules() const { return m_rules; } CSSRuleList& css_rules() { return m_rules; } diff --git a/Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp index c088d6030d..0715fb1395 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSImportRule.cpp @@ -28,10 +28,6 @@ CSSImportRule::CSSImportRule(AK::URL url, DOM::Document& document) set_resource(ResourceLoader::the().load_resource(Resource::Type::Generic, request)); } -CSSImportRule::~CSSImportRule() -{ -} - // https://www.w3.org/TR/cssom/#serialize-a-css-rule String CSSImportRule::serialized() const { diff --git a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h index 1c6e37a55c..37c219005e 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSImportRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSImportRule.h @@ -26,7 +26,7 @@ public: return adopt_ref(*new CSSImportRule(move(url), document)); } - ~CSSImportRule(); + ~CSSImportRule() = default; const AK::URL& url() const { return m_url; } diff --git a/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp index 484f79b4ca..c59feb2a63 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp @@ -14,10 +14,6 @@ CSSMediaRule::CSSMediaRule(NonnullRefPtr<MediaList>&& media, NonnullRefPtrVector { } -CSSMediaRule::~CSSMediaRule() -{ -} - String CSSMediaRule::condition_text() const { return m_media->media_text(); diff --git a/Userland/Libraries/LibWeb/CSS/CSSMediaRule.h b/Userland/Libraries/LibWeb/CSS/CSSMediaRule.h index 43f475824b..47b99a8ec5 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSMediaRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSMediaRule.h @@ -23,7 +23,7 @@ public: return adopt_ref(*new CSSMediaRule(move(media_queries), move(rules))); } - ~CSSMediaRule(); + ~CSSMediaRule() = default; virtual StringView class_name() const override { return "CSSMediaRule"; }; virtual Type type() const override { return Type::Media; }; diff --git a/Userland/Libraries/LibWeb/CSS/CSSRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSRule.cpp index 707cd21f7e..e6a2aac960 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSRule.cpp @@ -8,10 +8,6 @@ namespace Web::CSS { -CSSRule::~CSSRule() -{ -} - // https://www.w3.org/TR/cssom/#dom-cssrule-csstext String CSSRule::css_text() const { diff --git a/Userland/Libraries/LibWeb/CSS/CSSRule.h b/Userland/Libraries/LibWeb/CSS/CSSRule.h index 156c055436..125f38d63d 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSRule.h @@ -22,7 +22,7 @@ class CSSRule public: using WrapperType = Bindings::CSSRuleWrapper; - virtual ~CSSRule(); + virtual ~CSSRule() = default; enum class Type : u32 { Style, diff --git a/Userland/Libraries/LibWeb/CSS/CSSRuleList.cpp b/Userland/Libraries/LibWeb/CSS/CSSRuleList.cpp index 1f4e40447c..0ee0b1fd43 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSRuleList.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSRuleList.cpp @@ -18,10 +18,6 @@ CSSRuleList::CSSRuleList(NonnullRefPtrVector<CSSRule>&& rules) { } -CSSRuleList::~CSSRuleList() -{ -} - 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. diff --git a/Userland/Libraries/LibWeb/CSS/CSSRuleList.h b/Userland/Libraries/LibWeb/CSS/CSSRuleList.h index 1e88a87c9b..65d8e86693 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSRuleList.h +++ b/Userland/Libraries/LibWeb/CSS/CSSRuleList.h @@ -27,7 +27,7 @@ public: { return adopt_ref(*new CSSRuleList(move(rules))); } - ~CSSRuleList(); + ~CSSRuleList() = default; RefPtr<CSSRule> item(size_t index) const { diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp index 726e4f6c0c..f41c4c0541 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp @@ -16,14 +16,6 @@ PropertyOwningCSSStyleDeclaration::PropertyOwningCSSStyleDeclaration(Vector<Styl { } -PropertyOwningCSSStyleDeclaration::~PropertyOwningCSSStyleDeclaration() -{ -} - -CSSStyleDeclaration::~CSSStyleDeclaration() -{ -} - String PropertyOwningCSSStyleDeclaration::item(size_t index) const { if (index >= m_properties.size()) @@ -43,10 +35,6 @@ ElementInlineCSSStyleDeclaration::ElementInlineCSSStyleDeclaration(DOM::Element& { } -ElementInlineCSSStyleDeclaration::~ElementInlineCSSStyleDeclaration() -{ -} - size_t PropertyOwningCSSStyleDeclaration::length() const { return m_properties.size(); diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h index 5c047e09f9..2383fca7cd 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.h @@ -31,7 +31,7 @@ class CSSStyleDeclaration public: using WrapperType = Bindings::CSSStyleDeclarationWrapper; - virtual ~CSSStyleDeclaration(); + virtual ~CSSStyleDeclaration() = default; virtual size_t length() const = 0; virtual String item(size_t index) const = 0; @@ -49,7 +49,7 @@ public: virtual String serialized() const = 0; protected: - CSSStyleDeclaration() { } + CSSStyleDeclaration() = default; }; class PropertyOwningCSSStyleDeclaration : public CSSStyleDeclaration { @@ -61,7 +61,7 @@ public: return adopt_ref(*new PropertyOwningCSSStyleDeclaration(move(properties), move(custom_properties))); } - virtual ~PropertyOwningCSSStyleDeclaration() override; + virtual ~PropertyOwningCSSStyleDeclaration() override = default; virtual size_t length() const override; virtual String item(size_t index) const override; @@ -88,7 +88,7 @@ class ElementInlineCSSStyleDeclaration final : public PropertyOwningCSSStyleDecl public: 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)); } - virtual ~ElementInlineCSSStyleDeclaration() override; + virtual ~ElementInlineCSSStyleDeclaration() override = default; DOM::Element* element() { return m_element.ptr(); } const DOM::Element* element() const { return m_element.ptr(); } diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp index 79748719a4..9b6a2ad0c2 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleRule.cpp @@ -15,10 +15,6 @@ CSSStyleRule::CSSStyleRule(NonnullRefPtrVector<Selector>&& selectors, NonnullRef { } -CSSStyleRule::~CSSStyleRule() -{ -} - // https://www.w3.org/TR/cssom/#dom-cssstylerule-style CSSStyleDeclaration* CSSStyleRule::style() { diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h b/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h index e01a0a9742..23f8c1564c 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleRule.h @@ -27,7 +27,7 @@ public: 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 CSSStyleDeclaration& declaration() const { return m_declaration; } diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp index b44a87eb7e..4d3ca3b577 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.cpp @@ -17,10 +17,6 @@ CSSStyleSheet::CSSStyleSheet(NonnullRefPtrVector<CSSRule> rules) { } -CSSStyleSheet::~CSSStyleSheet() -{ -} - // https://www.w3.org/TR/cssom/#dom-cssstylesheet-insertrule DOM::ExceptionOr<unsigned> CSSStyleSheet::insert_rule(StringView rule, unsigned index) { diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.h b/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.h index 3b7a9a402f..a650009bab 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.h +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleSheet.h @@ -29,7 +29,7 @@ public: 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; } diff --git a/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp index 347852ff25..89e9b48d01 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp @@ -15,10 +15,6 @@ CSSSupportsRule::CSSSupportsRule(NonnullRefPtr<Supports>&& supports, NonnullRefP { } -CSSSupportsRule::~CSSSupportsRule() -{ -} - String CSSSupportsRule::condition_text() const { // FIXME: Serializing supports rules! diff --git a/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.h b/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.h index a4a4e2a7b9..19d678865e 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.h +++ b/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.h @@ -26,7 +26,7 @@ public: return adopt_ref(*new CSSSupportsRule(move(supports), move(rules))); } - ~CSSSupportsRule(); + ~CSSSupportsRule() = default; virtual StringView class_name() const override { return "CSSSupportsRule"; }; virtual Type type() const override { return Type::Supports; }; diff --git a/Userland/Libraries/LibWeb/CSS/MediaList.cpp b/Userland/Libraries/LibWeb/CSS/MediaList.cpp index 4d98ca7241..3edf00a746 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaList.cpp +++ b/Userland/Libraries/LibWeb/CSS/MediaList.cpp @@ -14,10 +14,6 @@ MediaList::MediaList(NonnullRefPtrVector<MediaQuery>&& media) { } -MediaList::~MediaList() -{ -} - // https://www.w3.org/TR/cssom-1/#dom-medialist-mediatext String MediaList::media_text() const { diff --git a/Userland/Libraries/LibWeb/CSS/MediaList.h b/Userland/Libraries/LibWeb/CSS/MediaList.h index adee044916..772a57c8e8 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaList.h +++ b/Userland/Libraries/LibWeb/CSS/MediaList.h @@ -20,7 +20,7 @@ public: { return adopt_ref(*new MediaList(move(media))); } - ~MediaList(); + ~MediaList() = default; String media_text() const; void set_media_text(String const&); diff --git a/Userland/Libraries/LibWeb/CSS/MediaQuery.h b/Userland/Libraries/LibWeb/CSS/MediaQuery.h index 44374c6c6d..f5092e7008 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaQuery.h +++ b/Userland/Libraries/LibWeb/CSS/MediaQuery.h @@ -205,7 +205,7 @@ struct MediaCondition { String to_string() const; private: - MediaCondition() { } + MediaCondition() = default; Type type; Optional<MediaFeature> feature; NonnullOwnPtrVector<MediaCondition> conditions; diff --git a/Userland/Libraries/LibWeb/CSS/MediaQueryList.cpp b/Userland/Libraries/LibWeb/CSS/MediaQueryList.cpp index 776db6ea0f..7f1f63f60d 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaQueryList.cpp +++ b/Userland/Libraries/LibWeb/CSS/MediaQueryList.cpp @@ -22,10 +22,6 @@ MediaQueryList::MediaQueryList(DOM::Document& document, NonnullRefPtrVector<Medi evaluate(); } -MediaQueryList::~MediaQueryList() -{ -} - // https://drafts.csswg.org/cssom-view/#dom-mediaquerylist-media String MediaQueryList::media() const { diff --git a/Userland/Libraries/LibWeb/CSS/MediaQueryList.h b/Userland/Libraries/LibWeb/CSS/MediaQueryList.h index c138255363..456a414276 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaQueryList.h +++ b/Userland/Libraries/LibWeb/CSS/MediaQueryList.h @@ -34,7 +34,7 @@ public: return adopt_ref(*new MediaQueryList(document, move(media_queries))); } - virtual ~MediaQueryList() override; + virtual ~MediaQueryList() override = default; String media() const; bool matches() const; diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 267ae7c73e..e48dec1f09 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -71,11 +71,6 @@ TokenStream<T>::TokenStream(Vector<T> const& tokens) } template<typename T> -TokenStream<T>::~TokenStream() -{ -} - -template<typename T> bool TokenStream<T>::has_next_token() { return (size_t)(m_iterator_offset + 1) < m_tokens.size(); @@ -164,10 +159,6 @@ Parser::Parser(ParsingContext const& context, StringView input, String const& en { } -Parser::~Parser() -{ -} - NonnullRefPtr<CSSStyleSheet> Parser::parse_as_stylesheet() { return parse_a_stylesheet(m_token_stream); diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h index 91abaf2584..b1fe9ef240 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.h @@ -59,7 +59,7 @@ template<typename T> class TokenStream { public: explicit TokenStream(Vector<T> const&); - ~TokenStream(); + ~TokenStream() = default; TokenStream(TokenStream<T> const&) = delete; @@ -87,7 +87,7 @@ private: class Parser { public: Parser(ParsingContext const&, StringView input, String const& encoding = "utf-8"); - ~Parser(); + ~Parser() = default; // The normal parser entry point, for parsing stylesheets. NonnullRefPtr<CSSStyleSheet> parse_as_stylesheet(); diff --git a/Userland/Libraries/LibWeb/CSS/Parser/StyleRules.cpp b/Userland/Libraries/LibWeb/CSS/Parser/StyleRules.cpp index fe574b7d30..611a733139 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/StyleRules.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/StyleRules.cpp @@ -25,16 +25,16 @@ DeclarationOrAtRule::DeclarationOrAtRule(StyleDeclarationRule declaration) , m_declaration(move(declaration)) { } -DeclarationOrAtRule::~DeclarationOrAtRule() { } +DeclarationOrAtRule::~DeclarationOrAtRule() = default; StyleRule::StyleRule(StyleRule::Type type) : m_type(type) { } -StyleRule::~StyleRule() { } +StyleRule::~StyleRule() = default; -StyleBlockRule::StyleBlockRule() { } -StyleBlockRule::~StyleBlockRule() { } +StyleBlockRule::StyleBlockRule() = default; +StyleBlockRule::~StyleBlockRule() = default; StyleComponentValueRule::StyleComponentValueRule(Token token) : m_type(StyleComponentValueRule::ComponentType::Token) @@ -51,10 +51,10 @@ StyleComponentValueRule::StyleComponentValueRule(NonnullRefPtr<StyleBlockRule> b , m_block(block) { } -StyleComponentValueRule::~StyleComponentValueRule() { } +StyleComponentValueRule::~StyleComponentValueRule() = default; -StyleDeclarationRule::StyleDeclarationRule() { } -StyleDeclarationRule::~StyleDeclarationRule() { } +StyleDeclarationRule::StyleDeclarationRule() = default; +StyleDeclarationRule::~StyleDeclarationRule() = default; StyleFunctionRule::StyleFunctionRule(String name) : m_name(move(name)) @@ -66,7 +66,7 @@ StyleFunctionRule::StyleFunctionRule(String name, Vector<StyleComponentValueRule , m_values(move(values)) { } -StyleFunctionRule::~StyleFunctionRule() { } +StyleFunctionRule::~StyleFunctionRule() = default; template<class SeparatorType, class CollectionType> void append_with_to_string(StringBuilder& builder, SeparatorType& separator, CollectionType& collection) diff --git a/Userland/Libraries/LibWeb/CSS/Percentage.h b/Userland/Libraries/LibWeb/CSS/Percentage.h index 8349da1920..c9479b514a 100644 --- a/Userland/Libraries/LibWeb/CSS/Percentage.h +++ b/Userland/Libraries/LibWeb/CSS/Percentage.h @@ -60,7 +60,7 @@ public: { } - virtual ~PercentageOr() { } + virtual ~PercentageOr() = default; PercentageOr<T>& operator=(T t) { diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp index 296bc7ab6e..6caed5fd62 100644 --- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp +++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp @@ -19,10 +19,6 @@ ResolvedCSSStyleDeclaration::ResolvedCSSStyleDeclaration(DOM::Element& element) { } -ResolvedCSSStyleDeclaration::~ResolvedCSSStyleDeclaration() -{ -} - size_t ResolvedCSSStyleDeclaration::length() const { return 0; diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.h b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.h index 429b23ed5c..3fc5f67716 100644 --- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.h +++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.h @@ -17,7 +17,7 @@ public: return adopt_ref(*new ResolvedCSSStyleDeclaration(element)); } - virtual ~ResolvedCSSStyleDeclaration() override; + virtual ~ResolvedCSSStyleDeclaration() override = default; virtual size_t length() const override; virtual String item(size_t index) const override; diff --git a/Userland/Libraries/LibWeb/CSS/Selector.cpp b/Userland/Libraries/LibWeb/CSS/Selector.cpp index 14bac1c4e3..c2e7a8ca2e 100644 --- a/Userland/Libraries/LibWeb/CSS/Selector.cpp +++ b/Userland/Libraries/LibWeb/CSS/Selector.cpp @@ -25,10 +25,6 @@ Selector::Selector(Vector<CompoundSelector>&& compound_selectors) } } -Selector::~Selector() -{ -} - // https://www.w3.org/TR/selectors-4/#specificity-rules u32 Selector::specificity() const { diff --git a/Userland/Libraries/LibWeb/CSS/Selector.h b/Userland/Libraries/LibWeb/CSS/Selector.h index 8d05b6e312..cbc8a874f0 100644 --- a/Userland/Libraries/LibWeb/CSS/Selector.h +++ b/Userland/Libraries/LibWeb/CSS/Selector.h @@ -132,7 +132,7 @@ public: return adopt_ref(*new Selector(move(compound_selectors))); } - ~Selector(); + ~Selector() = default; Vector<CompoundSelector> const& compound_selectors() const { return m_compound_selectors; } Optional<PseudoElement> pseudo_element() const { return m_pseudo_element; } diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index 8d85470452..42ab41dcd1 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -30,10 +30,6 @@ StyleComputer::StyleComputer(DOM::Document& document) { } -StyleComputer::~StyleComputer() -{ -} - static StyleSheet& default_stylesheet() { static StyleSheet* sheet; diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.h b/Userland/Libraries/LibWeb/CSS/StyleComputer.h index 2c688b3cc2..dcd2de17e3 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.h +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.h @@ -48,7 +48,7 @@ private: class StyleComputer { public: explicit StyleComputer(DOM::Document&); - ~StyleComputer(); + ~StyleComputer() = default; DOM::Document& document() { return m_document; } DOM::Document const& document() const { return m_document; } diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp index a297e1274c..0374a4d617 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -15,10 +15,6 @@ namespace Web::CSS { -StyleProperties::StyleProperties() -{ -} - StyleProperties::StyleProperties(const StyleProperties& other) : m_property_values(other.m_property_values) { diff --git a/Userland/Libraries/LibWeb/CSS/StyleProperties.h b/Userland/Libraries/LibWeb/CSS/StyleProperties.h index 4d63dc36cd..1d5febe700 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleProperties.h +++ b/Userland/Libraries/LibWeb/CSS/StyleProperties.h @@ -18,7 +18,7 @@ namespace Web::CSS { class StyleProperties : public RefCounted<StyleProperties> { public: - StyleProperties(); + StyleProperties() = default; explicit StyleProperties(const StyleProperties&); diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp index 12e87244a4..7376dd44e4 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.cpp @@ -23,10 +23,6 @@ StyleValue::StyleValue(Type type) { } -StyleValue::~StyleValue() -{ -} - AngleStyleValue const& StyleValue::as_angle() const { VERIFY(is_angle()); diff --git a/Userland/Libraries/LibWeb/CSS/StyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValue.h index 078c32c03d..c464108e12 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValue.h @@ -321,7 +321,7 @@ enum class PointerEvents { class StyleValue : public RefCounted<StyleValue> { public: - virtual ~StyleValue(); + virtual ~StyleValue() = default; enum class Type { Angle, @@ -539,7 +539,7 @@ public: { 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; } @@ -583,7 +583,7 @@ public: { 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_y() const { return m_repeat_y; } @@ -617,7 +617,7 @@ public: { 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_y() const { return m_size_y; } @@ -653,7 +653,7 @@ public: { 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_style() const { return m_border_style; } @@ -684,7 +684,7 @@ public: { 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& 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)); } - virtual ~BoxShadowStyleValue() override { } + virtual ~BoxShadowStyleValue() override = default; Color const& color() const { return m_color; } Length const& offset_x() const { return m_offset_x; } @@ -966,7 +966,7 @@ private: class ColorStyleValue : public StyleValue { public: static NonnullRefPtr<ColorStyleValue> create(Color color); - virtual ~ColorStyleValue() override { } + virtual ~ColorStyleValue() override = default; Color color() const { return m_color; } virtual String to_string() const override; @@ -996,7 +996,7 @@ public: { 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_right() const { return m_top_right; } @@ -1055,7 +1055,7 @@ public: { return adopt_ref(*new FlexStyleValue(grow, shrink, basis)); } - virtual ~FlexStyleValue() override { } + virtual ~FlexStyleValue() override = default; NonnullRefPtr<StyleValue> grow() const { return m_grow; } NonnullRefPtr<StyleValue> shrink() const { return m_shrink; } @@ -1086,7 +1086,7 @@ public: { 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_wrap() const { return m_flex_wrap; } @@ -1108,7 +1108,7 @@ private: class FontStyleValue final : public StyleValue { 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)); } - virtual ~FontStyleValue() override { } + virtual ~FontStyleValue() override = default; NonnullRefPtr<StyleValue> font_style() const { return m_font_style; } NonnullRefPtr<StyleValue> font_weight() const { return m_font_weight; } @@ -1172,7 +1172,7 @@ public: { return adopt_ref(*new IdentifierStyleValue(id)); } - virtual ~IdentifierStyleValue() override { } + virtual ~IdentifierStyleValue() override = default; CSS::ValueID id() const { return m_id; } @@ -1205,7 +1205,7 @@ class ImageStyleValue final , public ImageResourceClient { public: 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; @@ -1230,7 +1230,7 @@ public: static NonnullRefPtr<InheritStyleValue> instance = adopt_ref(*new InheritStyleValue); return instance; } - virtual ~InheritStyleValue() override { } + virtual ~InheritStyleValue() override = default; String to_string() const override { return "inherit"; } @@ -1248,7 +1248,7 @@ public: static NonnullRefPtr<InitialStyleValue> instance = adopt_ref(*new InitialStyleValue); return instance; } - virtual ~InitialStyleValue() override { } + virtual ~InitialStyleValue() override = default; String to_string() const override { return "initial"; } @@ -1262,7 +1262,7 @@ private: class LengthStyleValue : public StyleValue { public: static NonnullRefPtr<LengthStyleValue> create(Length const&); - virtual ~LengthStyleValue() override { } + virtual ~LengthStyleValue() override = default; Length const& length() const { return m_length; } @@ -1300,7 +1300,7 @@ public: { 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> image() const { return m_image; } @@ -1380,7 +1380,7 @@ public: { 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_y() const { return m_overflow_y; } @@ -1405,7 +1405,7 @@ public: { return adopt_ref(*new PercentageStyleValue(move(percentage))); } - virtual ~PercentageStyleValue() override { } + virtual ~PercentageStyleValue() override = default; Percentage const& percentage() const { 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)); } - virtual ~PositionStyleValue() override { } + virtual ~PositionStyleValue() override = default; PositionEdge edge_x() const { return m_edge_x; } LengthPercentage const& offset_x() const { return m_offset_x; } @@ -1499,7 +1499,7 @@ public: { return adopt_ref(*new StringStyleValue(string)); } - virtual ~StringStyleValue() override { } + virtual ~StringStyleValue() override = default; String to_string() const override { return m_string; } @@ -1523,7 +1523,7 @@ public: { 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> thickness() const { return m_thickness; } @@ -1587,7 +1587,7 @@ public: { 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; } NonnullRefPtrVector<StyleValue> values() const { return m_values; } @@ -1612,7 +1612,7 @@ public: { return adopt_ref(*new UnresolvedStyleValue(move(values), contains_var)); } - virtual ~UnresolvedStyleValue() override { } + virtual ~UnresolvedStyleValue() override = default; virtual String to_string() const override; @@ -1638,7 +1638,7 @@ public: static NonnullRefPtr<UnsetStyleValue> instance = adopt_ref(*new UnsetStyleValue); return instance; } - virtual ~UnsetStyleValue() override { } + virtual ~UnsetStyleValue() override = default; String to_string() const override { return "unset"; } |