mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
LibWeb: Reduce ShadowData struct from 80 to 72 bytes
This commit is contained in:
parent
aa0811d24e
commit
ddc3017464
Notes:
github-actions[bot]
2024-11-11 16:07:30 +00:00
Author: https://github.com/shlyakpavel
Commit: ddc3017464
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2280
2 changed files with 2 additions and 2 deletions
|
@ -313,11 +313,11 @@ struct TransformOrigin {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ShadowData {
|
struct ShadowData {
|
||||||
Color color {};
|
|
||||||
CSS::Length offset_x { Length::make_px(0) };
|
CSS::Length offset_x { Length::make_px(0) };
|
||||||
CSS::Length offset_y { Length::make_px(0) };
|
CSS::Length offset_y { Length::make_px(0) };
|
||||||
CSS::Length blur_radius { Length::make_px(0) };
|
CSS::Length blur_radius { Length::make_px(0) };
|
||||||
CSS::Length spread_distance { Length::make_px(0) };
|
CSS::Length spread_distance { Length::make_px(0) };
|
||||||
|
Color color {};
|
||||||
CSS::ShadowPlacement placement { CSS::ShadowPlacement::Outer };
|
CSS::ShadowPlacement placement { CSS::ShadowPlacement::Outer };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1074,11 +1074,11 @@ Vector<ShadowData> StyleProperties::shadow(PropertyID property_id, Layout::Node
|
||||||
if (!maybe_spread_distance.has_value())
|
if (!maybe_spread_distance.has_value())
|
||||||
return {};
|
return {};
|
||||||
return ShadowData {
|
return ShadowData {
|
||||||
value.color()->to_color(verify_cast<Layout::NodeWithStyle>(layout_node)),
|
|
||||||
maybe_offset_x.release_value(),
|
maybe_offset_x.release_value(),
|
||||||
maybe_offset_y.release_value(),
|
maybe_offset_y.release_value(),
|
||||||
maybe_blur_radius.release_value(),
|
maybe_blur_radius.release_value(),
|
||||||
maybe_spread_distance.release_value(),
|
maybe_spread_distance.release_value(),
|
||||||
|
value.color()->to_color(verify_cast<Layout::NodeWithStyle>(layout_node)),
|
||||||
value.placement()
|
value.placement()
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue