mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
LibWeb: Replace Length::set_calculated_style() with ::make_calculated()
There's no need to modify the Length's calculated-value after creating it, so let's make it immutable. :^)
This commit is contained in:
parent
db04b5687d
commit
ce0a516e59
4 changed files with 12 additions and 18 deletions
|
@ -773,9 +773,7 @@ void StyleComputer::compute_font(StyleProperties& style, DOM::Element const* ele
|
|||
maybe_length = font_size->to_length();
|
||||
|
||||
} else if (font_size->is_calculated()) {
|
||||
Length length = Length(0, Length::Type::Calculated);
|
||||
length.set_calculated_style(verify_cast<CalculatedStyleValue>(font_size.ptr()));
|
||||
maybe_length = length;
|
||||
maybe_length = Length::make_calculated(font_size->as_calculated());
|
||||
}
|
||||
if (maybe_length.has_value()) {
|
||||
// FIXME: Support font-size: calc(...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue