mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibWeb: Implement the math-depth
CSS property
This one is a bit fun because it can be `add(<integer>)` or `auto-add`, but children have to inherit the computed value not the specified one. We also have to compute it before computing the font-size, because of `font-size: math` which will be implemented later.
This commit is contained in:
parent
53f3ed026a
commit
6476dea898
19 changed files with 285 additions and 11 deletions
|
@ -123,6 +123,7 @@ public:
|
|||
|
||||
static CSS::MathShift math_shift() { return CSS::MathShift::Normal; }
|
||||
static CSS::MathStyle math_style() { return CSS::MathStyle::Normal; }
|
||||
static int math_depth() { return 0; }
|
||||
};
|
||||
|
||||
enum class BackgroundSize {
|
||||
|
@ -351,6 +352,7 @@ public:
|
|||
|
||||
CSS::MathShift math_shift() const { return m_inherited.math_shift; }
|
||||
CSS::MathStyle math_style() const { return m_inherited.math_style; }
|
||||
int math_depth() const { return m_inherited.math_depth; }
|
||||
|
||||
ComputedValues clone_inherited_values() const
|
||||
{
|
||||
|
@ -394,6 +396,7 @@ protected:
|
|||
|
||||
CSS::MathShift math_shift { InitialValues::math_shift() };
|
||||
CSS::MathStyle math_style { InitialValues::math_style() };
|
||||
int math_depth { InitialValues::math_depth() };
|
||||
} m_inherited;
|
||||
|
||||
struct {
|
||||
|
@ -591,6 +594,7 @@ public:
|
|||
|
||||
void set_math_shift(CSS::MathShift value) { m_inherited.math_shift = value; }
|
||||
void set_math_style(CSS::MathStyle value) { m_inherited.math_style = value; }
|
||||
void set_math_depth(int value) { m_inherited.math_depth = value; }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue