1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibWeb: Implement support for parsing CSS column-count property

This commit is contained in:
Aliaksandr Kalenik 2023-09-06 18:30:57 +02:00 committed by Andreas Kling
parent 9bd3c542b4
commit 0f75d0611f
4 changed files with 62 additions and 0 deletions

View file

@ -12,6 +12,7 @@
#include <LibWeb/CSS/StyleValues/BorderRadiusStyleValue.h>
#include <LibWeb/CSS/StyleValues/EdgeStyleValue.h>
#include <LibWeb/CSS/StyleValues/IdentifierStyleValue.h>
#include <LibWeb/CSS/StyleValues/IntegerStyleValue.h>
#include <LibWeb/CSS/StyleValues/LengthStyleValue.h>
#include <LibWeb/CSS/StyleValues/NumberStyleValue.h>
#include <LibWeb/CSS/StyleValues/PercentageStyleValue.h>
@ -758,6 +759,9 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
if (auto text_anchor = computed_style.text_anchor(); text_anchor.has_value())
computed_values.set_text_anchor(*text_anchor);
if (auto column_count = computed_style.property(CSS::PropertyID::ColumnCount); column_count->is_integer())
computed_values.set_column_count(CSS::ColumnCount::make_integer(column_count->as_integer().integer()));
computed_values.set_column_gap(computed_style.size_value(CSS::PropertyID::ColumnGap));
computed_values.set_row_gap(computed_style.size_value(CSS::PropertyID::RowGap));