mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
Revert "LibWeb/CSS: Rename CalculatedStyleValue -> CSSMathValue"
This reverts commit 76daba3069
.
We're going to need separate types for the JS-exposed style values, so
it doesn't make sense for us to match their names with our internal
types.
This commit is contained in:
parent
34f78ca152
commit
69a0f28d04
Notes:
github-actions[bot]
2024-12-21 17:15:55 +00:00
Author: https://github.com/AtkinsSJ
Commit: 69a0f28d04
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2966
37 changed files with 391 additions and 391 deletions
|
@ -7,7 +7,7 @@
|
|||
#include "CSSRGB.h"
|
||||
#include <AK/TypeCasts.h>
|
||||
#include <LibWeb/CSS/Serialize.h>
|
||||
#include <LibWeb/CSS/StyleValues/CSSMathValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/CalculatedStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/NumberStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/PercentageStyleValue.h>
|
||||
|
||||
|
@ -29,8 +29,8 @@ Color CSSRGB::to_color(Optional<Layout::NodeWithStyle const&>) const
|
|||
if (style_value.is_percentage())
|
||||
return normalized(style_value.as_percentage().value() * 255 / 100);
|
||||
|
||||
if (style_value.is_math()) {
|
||||
auto const& calculated = style_value.as_math();
|
||||
if (style_value.is_calculated()) {
|
||||
auto const& calculated = style_value.as_calculated();
|
||||
if (calculated.resolves_to_number())
|
||||
return normalized(calculated.resolve_number().value());
|
||||
if (calculated.resolves_to_percentage())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue