mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +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
|
@ -14,6 +14,7 @@
|
|||
#include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/IntegerStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/LengthStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/MathDepthStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/NumberStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/PercentageStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/RatioStyleValue.h>
|
||||
|
@ -797,6 +798,8 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
if (auto math_style = value_id_to_math_style(math_style_value->to_identifier()); math_style.has_value())
|
||||
computed_values.set_math_style(math_style.value());
|
||||
|
||||
computed_values.set_math_depth(computed_style.math_depth());
|
||||
|
||||
// Update any anonymous children that inherit from this node.
|
||||
// FIXME: This is pretty hackish. It would be nicer if they shared the inherited style
|
||||
// data structure somehow, so this wasn't necessary.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue