mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibWeb: Ensure PercentageOr<T>::resolved() returns a concrete T
Which is to say, a T where `is_calculated()` is false. As is becoming a repeating theme with CSS types, we have two states for a FooPercentage that is a `calc()` expression: Either the FooPercentage holds the CalculatedStyleValue directly, or it holds a Foo which itself holds the CalculatedStyleValue. The first case was already handled to return Foo, and with this patch, the second is too. :^)
This commit is contained in:
parent
3fce4f7c91
commit
7b4004d682
9 changed files with 30 additions and 0 deletions
|
@ -76,6 +76,7 @@ public:
|
|||
}
|
||||
|
||||
float raw_value() const { return m_value; }
|
||||
NonnullRefPtr<CalculatedStyleValue> calculated_style_value() const;
|
||||
|
||||
float to_px(Layout::Node const&) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue