mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +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
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
return adopt_ref(*new CSSImportRule(move(url), document));
|
||||
}
|
||||
|
||||
~CSSImportRule();
|
||||
~CSSImportRule() = default;
|
||||
|
||||
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
|
||||
{
|
||||
return m_media->media_text();
|
||||
|
|
|
@ -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; };
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
CSSRule::~CSSRule()
|
||||
{
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom/#dom-cssrule-csstext
|
||||
String CSSRule::css_text() const
|
||||
{
|
||||
|
|
|
@ -22,7 +22,7 @@ class CSSRule
|
|||
public:
|
||||
using WrapperType = Bindings::CSSRuleWrapper;
|
||||
|
||||
virtual ~CSSRule();
|
||||
virtual ~CSSRule() = default;
|
||||
|
||||
enum class Type : u32 {
|
||||
Style,
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -27,7 +27,7 @@ public:
|
|||
{
|
||||
return adopt_ref(*new CSSRuleList(move(rules)));
|
||||
}
|
||||
~CSSRuleList();
|
||||
~CSSRuleList() = default;
|
||||
|
||||
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
|
||||
{
|
||||
if (index >= m_properties.size())
|
||||
|
@ -43,10 +35,6 @@ ElementInlineCSSStyleDeclaration::ElementInlineCSSStyleDeclaration(DOM::Element&
|
|||
{
|
||||
}
|
||||
|
||||
ElementInlineCSSStyleDeclaration::~ElementInlineCSSStyleDeclaration()
|
||||
{
|
||||
}
|
||||
|
||||
size_t PropertyOwningCSSStyleDeclaration::length() const
|
||||
{
|
||||
return m_properties.size();
|
||||
|
|
|
@ -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(); }
|
||||
|
|
|
@ -15,10 +15,6 @@ CSSStyleRule::CSSStyleRule(NonnullRefPtrVector<Selector>&& selectors, NonnullRef
|
|||
{
|
||||
}
|
||||
|
||||
CSSStyleRule::~CSSStyleRule()
|
||||
{
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/cssom/#dom-cssstylerule-style
|
||||
CSSStyleDeclaration* CSSStyleRule::style()
|
||||
{
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -15,10 +15,6 @@ CSSSupportsRule::CSSSupportsRule(NonnullRefPtr<Supports>&& supports, NonnullRefP
|
|||
{
|
||||
}
|
||||
|
||||
CSSSupportsRule::~CSSSupportsRule()
|
||||
{
|
||||
}
|
||||
|
||||
String CSSSupportsRule::condition_text() const
|
||||
{
|
||||
// FIXME: Serializing supports rules!
|
||||
|
|
|
@ -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; };
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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&);
|
||||
|
|
|
@ -205,7 +205,7 @@ struct MediaCondition {
|
|||
String to_string() const;
|
||||
|
||||
private:
|
||||
MediaCondition() { }
|
||||
MediaCondition() = default;
|
||||
Type type;
|
||||
Optional<MediaFeature> feature;
|
||||
NonnullOwnPtrVector<MediaCondition> conditions;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -70,11 +70,6 @@ TokenStream<T>::TokenStream(Vector<T> const& tokens)
|
|||
{
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
TokenStream<T>::~TokenStream()
|
||||
{
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
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()
|
||||
{
|
||||
return parse_a_stylesheet(m_token_stream);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual ~PercentageOr() { }
|
||||
virtual ~PercentageOr() = default;
|
||||
|
||||
PercentageOr<T>& operator=(T t)
|
||||
{
|
||||
|
|
|
@ -19,10 +19,6 @@ ResolvedCSSStyleDeclaration::ResolvedCSSStyleDeclaration(DOM::Element& element)
|
|||
{
|
||||
}
|
||||
|
||||
ResolvedCSSStyleDeclaration::~ResolvedCSSStyleDeclaration()
|
||||
{
|
||||
}
|
||||
|
||||
size_t ResolvedCSSStyleDeclaration::length() const
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -30,10 +30,6 @@ StyleComputer::StyleComputer(DOM::Document& document)
|
|||
{
|
||||
}
|
||||
|
||||
StyleComputer::~StyleComputer()
|
||||
{
|
||||
}
|
||||
|
||||
static StyleSheet& default_stylesheet()
|
||||
{
|
||||
static StyleSheet* sheet;
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -15,10 +15,6 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
StyleProperties::StyleProperties()
|
||||
{
|
||||
}
|
||||
|
||||
StyleProperties::StyleProperties(const StyleProperties& other)
|
||||
: m_property_values(other.m_property_values)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace Web::CSS {
|
|||
|
||||
class StyleProperties : public RefCounted<StyleProperties> {
|
||||
public:
|
||||
StyleProperties();
|
||||
StyleProperties() = default;
|
||||
|
||||
explicit StyleProperties(const StyleProperties&);
|
||||
|
||||
|
|
|
@ -23,10 +23,6 @@ StyleValue::StyleValue(Type type)
|
|||
{
|
||||
}
|
||||
|
||||
StyleValue::~StyleValue()
|
||||
{
|
||||
}
|
||||
|
||||
AngleStyleValue const& StyleValue::as_angle() const
|
||||
{
|
||||
VERIFY(is_angle());
|
||||
|
|
|
@ -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"; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue