LibWeb: Reduce ShadowData struct from 80 to 72 bytes

This commit is contained in:
Pavel Shliak 2024-11-11 13:51:09 +04:00 committed by Andreas Kling
parent aa0811d24e
commit ddc3017464
Notes: github-actions[bot] 2024-11-11 16:07:30 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -313,11 +313,11 @@ struct TransformOrigin {
};
struct ShadowData {
Color color {};
CSS::Length offset_x { Length::make_px(0) };
CSS::Length offset_y { Length::make_px(0) };
CSS::Length blur_radius { Length::make_px(0) };
CSS::Length spread_distance { Length::make_px(0) };
Color color {};
CSS::ShadowPlacement placement { CSS::ShadowPlacement::Outer };
};

View file

@ -1074,11 +1074,11 @@ Vector<ShadowData> StyleProperties::shadow(PropertyID property_id, Layout::Node
if (!maybe_spread_distance.has_value())
return {};
return ShadowData {
value.color()->to_color(verify_cast<Layout::NodeWithStyle>(layout_node)),
maybe_offset_x.release_value(),
maybe_offset_y.release_value(),
maybe_blur_radius.release_value(),
maybe_spread_distance.release_value(),
value.color()->to_color(verify_cast<Layout::NodeWithStyle>(layout_node)),
value.placement()
};
};