mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Make storage of CSS::StyleValues const-correct
Now we consistently use `RefPtr<StyleValue const>` for all StyleValues.
This commit is contained in:
parent
3fdad8fe22
commit
6d11414957
Notes:
github-actions[bot]
2025-04-16 16:44:32 +00:00
Author: https://github.com/ADKaster
Commit: 6d11414957
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4362
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/Hendiadyoin1
113 changed files with 628 additions and 629 deletions
|
@ -17,92 +17,92 @@
|
|||
|
||||
namespace Web::CSS {
|
||||
|
||||
Optional<Angle> AngleOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<Angle> AngleOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_angle(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> AngleOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> AngleOrCalculated::create_style_value() const
|
||||
{
|
||||
return AngleStyleValue::create(value());
|
||||
}
|
||||
|
||||
Optional<Flex> FlexOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<Flex> FlexOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_flex(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> FlexOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> FlexOrCalculated::create_style_value() const
|
||||
{
|
||||
return FlexStyleValue::create(value());
|
||||
}
|
||||
|
||||
Optional<Frequency> FrequencyOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<Frequency> FrequencyOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_frequency(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> FrequencyOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> FrequencyOrCalculated::create_style_value() const
|
||||
{
|
||||
return FrequencyStyleValue::create(value());
|
||||
}
|
||||
|
||||
Optional<i64> IntegerOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<i64> IntegerOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_integer(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> IntegerOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> IntegerOrCalculated::create_style_value() const
|
||||
{
|
||||
return IntegerStyleValue::create(value());
|
||||
}
|
||||
|
||||
Optional<Length> LengthOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<Length> LengthOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_length(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> LengthOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> LengthOrCalculated::create_style_value() const
|
||||
{
|
||||
return LengthStyleValue::create(value());
|
||||
}
|
||||
|
||||
Optional<double> NumberOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<double> NumberOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_number(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> NumberOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> NumberOrCalculated::create_style_value() const
|
||||
{
|
||||
return NumberStyleValue::create(value());
|
||||
}
|
||||
|
||||
Optional<Percentage> PercentageOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<Percentage> PercentageOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_percentage(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> PercentageOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> PercentageOrCalculated::create_style_value() const
|
||||
{
|
||||
return PercentageStyleValue::create(value());
|
||||
}
|
||||
|
||||
Optional<Resolution> ResolutionOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<Resolution> ResolutionOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_resolution(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> ResolutionOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> ResolutionOrCalculated::create_style_value() const
|
||||
{
|
||||
return ResolutionStyleValue::create(value());
|
||||
}
|
||||
|
||||
Optional<Time> TimeOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue> const& calculated, CalculationResolutionContext const& context) const
|
||||
Optional<Time> TimeOrCalculated::resolve_calculated(NonnullRefPtr<CalculatedStyleValue const> const& calculated, CalculationResolutionContext const& context) const
|
||||
{
|
||||
return calculated->resolve_time(context);
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue> TimeOrCalculated::create_style_value() const
|
||||
NonnullRefPtr<CSSStyleValue const> TimeOrCalculated::create_style_value() const
|
||||
{
|
||||
return TimeStyleValue::create(value());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue