mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue
This matches the name in the CSS Typed OM spec. There's quite a lot still to do to make it match the spec behavior, but this is the first step.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "CSSRGB.h"
|
||||
#include <AK/TypeCasts.h>
|
||||
#include <LibWeb/CSS/Serialize.h>
|
||||
#include <LibWeb/CSS/StyleValues/CalculatedStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/CSSMathValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/NumberStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/PercentageStyleValue.h>
|
||||
|
||||
@@ -27,8 +27,8 @@ Color CSSRGB::to_color(Optional<Layout::NodeWithStyle const&>) const
|
||||
if (style_value.is_percentage())
|
||||
return normalized(style_value.as_percentage().value() * 2.55);
|
||||
|
||||
if (style_value.is_calculated()) {
|
||||
auto const& calculated = style_value.as_calculated();
|
||||
if (style_value.is_math()) {
|
||||
auto const& calculated = style_value.as_math();
|
||||
if (calculated.resolves_to_number())
|
||||
return normalized(calculated.resolve_number().value());
|
||||
if (calculated.resolves_to_percentage())
|
||||
|
||||
Reference in New Issue
Block a user