mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:17:45 +00:00
LibWeb: Parse the math-shift
and math-style
CSS properties
Currently these have no effect, but they're simple, and `math-style` influences `math-depth` which is coming next.
This commit is contained in:
parent
2ef5658f31
commit
6045143d39
5 changed files with 43 additions and 0 deletions
|
@ -789,6 +789,14 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
transfer_table_box_computed_values_to_wrapper_computed_values(wrapper_computed_values);
|
||||
}
|
||||
|
||||
auto math_shift_value = computed_style.property(CSS::PropertyID::MathShift);
|
||||
if (auto math_shift = value_id_to_math_shift(math_shift_value->to_identifier()); math_shift.has_value())
|
||||
computed_values.set_math_shift(math_shift.value());
|
||||
|
||||
auto math_style_value = computed_style.property(CSS::PropertyID::MathStyle);
|
||||
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());
|
||||
|
||||
// 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