mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Restrict CSS gap properties to values allowed by the spec
Gap values are now represented by Variant<LengthPercentage, NormalGap>. NormalGap is just an empty struct to represent the `normal` keyword. This fixes a long-standing issue where we were incorrectly storing gaps as CSS::Size, which led to us allowing a bunch of invalid gap values.
This commit is contained in:
parent
2a741f81c7
commit
107b20e84d
Notes:
github-actions[bot]
2024-11-09 18:23:29 +00:00
Author: https://github.com/awesomekling
Commit: 107b20e84d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2253
17 changed files with 157 additions and 120 deletions
|
@ -869,8 +869,8 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
|
||||
computed_values.set_column_width(computed_style.size_value(CSS::PropertyID::ColumnWidth));
|
||||
|
||||
computed_values.set_column_gap(computed_style.size_value(CSS::PropertyID::ColumnGap));
|
||||
computed_values.set_row_gap(computed_style.size_value(CSS::PropertyID::RowGap));
|
||||
computed_values.set_column_gap(computed_style.gap_value(CSS::PropertyID::ColumnGap));
|
||||
computed_values.set_row_gap(computed_style.gap_value(CSS::PropertyID::RowGap));
|
||||
|
||||
if (auto border_collapse = computed_style.border_collapse(); border_collapse.has_value())
|
||||
computed_values.set_border_collapse(border_collapse.value());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue