From ddc30174647a6f6a0b72c16fab697c7b9985bfc3 Mon Sep 17 00:00:00 2001 From: Pavel Shliak Date: Mon, 11 Nov 2024 13:51:09 +0400 Subject: [PATCH] LibWeb: Reduce ShadowData struct from 80 to 72 bytes --- Libraries/LibWeb/CSS/ComputedValues.h | 2 +- Libraries/LibWeb/CSS/StyleProperties.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibWeb/CSS/ComputedValues.h b/Libraries/LibWeb/CSS/ComputedValues.h index 7007cf80edf..14a847a24cb 100644 --- a/Libraries/LibWeb/CSS/ComputedValues.h +++ b/Libraries/LibWeb/CSS/ComputedValues.h @@ -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 }; }; diff --git a/Libraries/LibWeb/CSS/StyleProperties.cpp b/Libraries/LibWeb/CSS/StyleProperties.cpp index 4d52f2836b3..3d1efb25652 100644 --- a/Libraries/LibWeb/CSS/StyleProperties.cpp +++ b/Libraries/LibWeb/CSS/StyleProperties.cpp @@ -1074,11 +1074,11 @@ Vector StyleProperties::shadow(PropertyID property_id, Layout::Node if (!maybe_spread_distance.has_value()) return {}; return ShadowData { - value.color()->to_color(verify_cast(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_node)), value.placement() }; };