mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-21 07:47:32 +09:00
Fix build error
This commit is contained in:
parent
3ad2791ea1
commit
89b2dcbb96
1 changed files with 19 additions and 0 deletions
|
|
@ -1788,6 +1788,25 @@ SetFactor(const nsCSSValue& aValue, float& aField, RuleNodeCacheConditions& aCon
|
|||
}
|
||||
return;
|
||||
|
||||
#include "CSSCalc.h"
|
||||
|
||||
struct RuleNodeReduceNumberCalcOps
|
||||
: public mozilla::css::BasicFloatCalcOps
|
||||
, public mozilla::css::CSSValueInputCalcOps
|
||||
{
|
||||
float ComputeLeafValue(const nsCSSValue& aValue)
|
||||
{
|
||||
MOZ_ASSERT(aValue.GetUnit() == eCSSUnit_Number,
|
||||
"Expected a number-only calc expression");
|
||||
return aValue.GetFloatValue();
|
||||
}
|
||||
|
||||
float ComputeNumber(const nsCSSValue& aValue)
|
||||
{
|
||||
return mozilla::css::ComputeCalc(aValue, *this);
|
||||
}
|
||||
};
|
||||
|
||||
case eCSSUnit_Calc: {
|
||||
RuleNodeReduceNumberCalcOps ops;
|
||||
aField = css::ComputeCalc(aValue, ops);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue