mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +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
|
@ -18,7 +18,7 @@
|
|||
#include <LibWeb/CSS/StyleValues/BorderRadiusStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/CSSColorValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/CSSKeywordValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/CSSMathValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/CalculatedStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/ConicGradientStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/ContentStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/CounterDefinitionsStyleValue.h>
|
||||
|
@ -104,10 +104,10 @@ BorderRadiusStyleValue const& CSSStyleValue::as_border_radius() const
|
|||
return static_cast<BorderRadiusStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
CSSMathValue const& CSSStyleValue::as_math() const
|
||||
CalculatedStyleValue const& CSSStyleValue::as_calculated() const
|
||||
{
|
||||
VERIFY(is_math());
|
||||
return static_cast<CSSMathValue const&>(*this);
|
||||
VERIFY(is_calculated());
|
||||
return static_cast<CalculatedStyleValue const&>(*this);
|
||||
}
|
||||
|
||||
CSSColorValue const& CSSStyleValue::as_color() const
|
||||
|
@ -406,8 +406,8 @@ int CSSStyleValue::to_font_weight() const
|
|||
if (is_number()) {
|
||||
return round_to<int>(as_number().number());
|
||||
}
|
||||
if (is_math()) {
|
||||
auto maybe_weight = const_cast<CSSMathValue&>(as_math()).resolve_integer();
|
||||
if (is_calculated()) {
|
||||
auto maybe_weight = const_cast<CalculatedStyleValue&>(as_calculated()).resolve_integer();
|
||||
if (maybe_weight.has_value())
|
||||
return maybe_weight.value();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue