diff --git a/Documentation/CSSGeneratedFiles.md b/Documentation/CSSGeneratedFiles.md index 2d43ce20564..f6cfa808ab3 100644 --- a/Documentation/CSSGeneratedFiles.md +++ b/Documentation/CSSGeneratedFiles.md @@ -25,7 +25,7 @@ Each property will have some set of these fields on it: | `affects-stacking-context` | No | `false` | Boolean. Whether this property can cause a new stacking context for the element. | `bool property_affects_stacking_context(PropertyID)` | | `animation-type` | Yes | | String. How the property should be animated. Defined by the spec. See below. | `AnimationType animation_type_from_longhand_property(PropertyID)` | | `inherited` | Yes | | Boolean. Whether the property is inherited by its child elements. | `bool is_inherited_property(PropertyID)` | -| `initial` | Yes | | String. The property's initial value if it is not specified. | `NonnullRefPtr property_initial_value(PropertyID)` | +| `initial` | Yes | | String. The property's initial value if it is not specified. | `NonnullRefPtr property_initial_value(PropertyID)` | | `legacy-alias-for` | No | Nothing | String. The name of a property this is an alias for. See below. | | | `logical-alias-for` | No | Nothing | Array of strings. The name of a property this is an alias for. See below. | | | `longhands` | No | `[]` | Array of strings. If this is a shorthand, these are the property names that it expands out into. | `Vector longhands_for_shorthand(PropertyID)` | @@ -89,7 +89,7 @@ The generated code provides: it exists in that at-rule. - `FlyString to_string(DescriptorID)` for serializing descriptor names. - `bool at_rule_supports_descriptor(AtRuleID, DescriptorID)` to query if the given at-rule allows the descriptor. -- `RefPtr descriptor_initial_value(AtRuleID, DescriptorID)` for getting a descriptor's initial value. +- `RefPtr descriptor_initial_value(AtRuleID, DescriptorID)` for getting a descriptor's initial value. - `DescriptorMetadata get_descriptor_metadata(AtRuleID, DescriptorID)` returns data used for parsing the descriptor. ### At-rule fields diff --git a/Libraries/LibWeb/CSS/Angle.cpp b/Libraries/LibWeb/CSS/Angle.cpp index 44fa016ba03..68eb0023201 100644 --- a/Libraries/LibWeb/CSS/Angle.cpp +++ b/Libraries/LibWeb/CSS/Angle.cpp @@ -84,7 +84,7 @@ Optional Angle::unit_from_name(StringView name) return {}; } -Angle Angle::resolve_calculated(NonnullRefPtr const& calculated, Layout::Node const& layout_node, Angle const& reference_value) +Angle Angle::resolve_calculated(NonnullRefPtr const& calculated, Layout::Node const& layout_node, Angle const& reference_value) { return calculated->resolve_angle( { diff --git a/Libraries/LibWeb/CSS/Angle.h b/Libraries/LibWeb/CSS/Angle.h index 533de18f08e..5972b2d6935 100644 --- a/Libraries/LibWeb/CSS/Angle.h +++ b/Libraries/LibWeb/CSS/Angle.h @@ -52,7 +52,7 @@ public: return 0; } - static Angle resolve_calculated(NonnullRefPtr const&, Layout::Node const&, Angle const& reference_value); + static Angle resolve_calculated(NonnullRefPtr const&, Layout::Node const&, Angle const& reference_value); private: Type m_type; diff --git a/Libraries/LibWeb/CSS/CSSFontFaceDescriptors.cpp b/Libraries/LibWeb/CSS/CSSFontFaceDescriptors.cpp index 3e9ec1982bc..55df18b5f55 100644 --- a/Libraries/LibWeb/CSS/CSSFontFaceDescriptors.cpp +++ b/Libraries/LibWeb/CSS/CSSFontFaceDescriptors.cpp @@ -100,7 +100,7 @@ WebIDL::ExceptionOr CSSFontFaceDescriptors::set_property(StringView proper return {}; // 5. Let component value list be the result of parsing value for property property. - RefPtr component_value_list = parse_css_descriptor(Parser::ParsingParams {}, AtRuleID::FontFace, *descriptor_id, value); + RefPtr component_value_list = parse_css_descriptor(Parser::ParsingParams {}, AtRuleID::FontFace, *descriptor_id, value); // 6. If component value list is null, then return. if (!component_value_list) diff --git a/Libraries/LibWeb/CSS/CSSPropertyRule.cpp b/Libraries/LibWeb/CSS/CSSPropertyRule.cpp index e6443cb0c79..47b12afffa9 100644 --- a/Libraries/LibWeb/CSS/CSSPropertyRule.cpp +++ b/Libraries/LibWeb/CSS/CSSPropertyRule.cpp @@ -13,12 +13,12 @@ namespace Web::CSS { GC_DEFINE_ALLOCATOR(CSSPropertyRule); -GC::Ref CSSPropertyRule::create(JS::Realm& realm, FlyString name, FlyString syntax, bool inherits, RefPtr initial_value) +GC::Ref CSSPropertyRule::create(JS::Realm& realm, FlyString name, FlyString syntax, bool inherits, RefPtr initial_value) { return realm.create(realm, move(name), move(syntax), inherits, move(initial_value)); } -CSSPropertyRule::CSSPropertyRule(JS::Realm& realm, FlyString name, FlyString syntax, bool inherits, RefPtr initial_value) +CSSPropertyRule::CSSPropertyRule(JS::Realm& realm, FlyString name, FlyString syntax, bool inherits, RefPtr initial_value) : CSSRule(realm, Type::Property) , m_name(move(name)) , m_syntax(move(syntax)) diff --git a/Libraries/LibWeb/CSS/CSSPropertyRule.h b/Libraries/LibWeb/CSS/CSSPropertyRule.h index 159361fc92a..49745ea0aed 100644 --- a/Libraries/LibWeb/CSS/CSSPropertyRule.h +++ b/Libraries/LibWeb/CSS/CSSPropertyRule.h @@ -21,7 +21,7 @@ class CSSPropertyRule final : public CSSRule { GC_DECLARE_ALLOCATOR(CSSPropertyRule); public: - static GC::Ref create(JS::Realm&, FlyString name, FlyString syntax, bool inherits, RefPtr initial_value); + static GC::Ref create(JS::Realm&, FlyString name, FlyString syntax, bool inherits, RefPtr initial_value); virtual ~CSSPropertyRule() = default; @@ -31,7 +31,7 @@ public: Optional initial_value() const; private: - CSSPropertyRule(JS::Realm&, FlyString name, FlyString syntax, bool inherits, RefPtr initial_value); + CSSPropertyRule(JS::Realm&, FlyString name, FlyString syntax, bool inherits, RefPtr initial_value); virtual void initialize(JS::Realm&) override; virtual String serialized() const override; @@ -39,7 +39,7 @@ private: FlyString m_name; FlyString m_syntax; bool m_inherits; - RefPtr m_initial_value; + RefPtr m_initial_value; }; template<> diff --git a/Libraries/LibWeb/CSS/CSSStyleProperties.cpp b/Libraries/LibWeb/CSS/CSSStyleProperties.cpp index 3af27b22b93..eaab16c50b4 100644 --- a/Libraries/LibWeb/CSS/CSSStyleProperties.cpp +++ b/Libraries/LibWeb/CSS/CSSStyleProperties.cpp @@ -428,10 +428,10 @@ static Optional style_property_for_sided_shorthand(PropertyID pro if (top->important != right->important || top->important != bottom->important || top->important != left->important) return {}; - ValueComparingNonnullRefPtr const top_value { top->value }; - ValueComparingNonnullRefPtr const right_value { right->value }; - ValueComparingNonnullRefPtr const bottom_value { bottom->value }; - ValueComparingNonnullRefPtr const left_value { left->value }; + ValueComparingNonnullRefPtr const top_value { top->value }; + ValueComparingNonnullRefPtr const right_value { right->value }; + ValueComparingNonnullRefPtr const bottom_value { bottom->value }; + ValueComparingNonnullRefPtr const left_value { left->value }; bool const top_and_bottom_same = top_value == bottom_value; bool const left_and_right_same = left_value == right_value; diff --git a/Libraries/LibWeb/CSS/CalculatedOr.cpp b/Libraries/LibWeb/CSS/CalculatedOr.cpp index 470d5996df7..ec21a2bb467 100644 --- a/Libraries/LibWeb/CSS/CalculatedOr.cpp +++ b/Libraries/LibWeb/CSS/CalculatedOr.cpp @@ -17,92 +17,92 @@ namespace Web::CSS { -Optional AngleOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const +Optional AngleOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const { return calculated->resolve_angle(context); } -NonnullRefPtr AngleOrCalculated::create_style_value() const +NonnullRefPtr AngleOrCalculated::create_style_value() const { return AngleStyleValue::create(value()); } -Optional FlexOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const +Optional FlexOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const { return calculated->resolve_flex(context); } -NonnullRefPtr FlexOrCalculated::create_style_value() const +NonnullRefPtr FlexOrCalculated::create_style_value() const { return FlexStyleValue::create(value()); } -Optional FrequencyOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const +Optional FrequencyOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const { return calculated->resolve_frequency(context); } -NonnullRefPtr FrequencyOrCalculated::create_style_value() const +NonnullRefPtr FrequencyOrCalculated::create_style_value() const { return FrequencyStyleValue::create(value()); } -Optional IntegerOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const +Optional IntegerOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const { return calculated->resolve_integer(context); } -NonnullRefPtr IntegerOrCalculated::create_style_value() const +NonnullRefPtr IntegerOrCalculated::create_style_value() const { return IntegerStyleValue::create(value()); } -Optional LengthOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const +Optional LengthOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const { return calculated->resolve_length(context); } -NonnullRefPtr LengthOrCalculated::create_style_value() const +NonnullRefPtr LengthOrCalculated::create_style_value() const { return LengthStyleValue::create(value()); } -Optional NumberOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const +Optional NumberOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const { return calculated->resolve_number(context); } -NonnullRefPtr NumberOrCalculated::create_style_value() const +NonnullRefPtr NumberOrCalculated::create_style_value() const { return NumberStyleValue::create(value()); } -Optional PercentageOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const +Optional PercentageOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const { return calculated->resolve_percentage(context); } -NonnullRefPtr PercentageOrCalculated::create_style_value() const +NonnullRefPtr PercentageOrCalculated::create_style_value() const { return PercentageStyleValue::create(value()); } -Optional ResolutionOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const +Optional ResolutionOrCalculated::resolve_calculated(NonnullRefPtr const& calculated, CalculationResolutionContext const& context) const { return calculated->resolve_resolution(context); } -NonnullRefPtr ResolutionOrCalculated::create_style_value() const +NonnullRefPtr ResolutionOrCalculated::create_style_value() const { return ResolutionStyleValue::create(value()); } -Optional