summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Layout
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Layout')
-rw-r--r--Userland/Libraries/LibWeb/Layout/Box.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Layout/InlineNode.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Layout/Box.cpp b/Userland/Libraries/LibWeb/Layout/Box.cpp
index 897e1ae375..6786d62d75 100644
--- a/Userland/Libraries/LibWeb/Layout/Box.cpp
+++ b/Userland/Libraries/LibWeb/Layout/Box.cpp
@@ -106,10 +106,12 @@ void Box::paint_box_shadow(PaintContext& context)
resolved_box_shadow_data.ensure_capacity(box_shadow_data.size());
for (auto const& layer : box_shadow_data) {
resolved_box_shadow_data.empend(
+ layer.color,
static_cast<int>(layer.offset_x.resolved_or_zero(*this).to_px(*this)),
static_cast<int>(layer.offset_y.resolved_or_zero(*this).to_px(*this)),
static_cast<int>(layer.blur_radius.resolved_or_zero(*this).to_px(*this)),
- layer.color);
+ static_cast<int>(layer.spread_distance.resolved_or_zero(*this).to_px(*this)),
+ layer.placement == CSS::BoxShadowPlacement::Outer ? Painting::BoxShadowPlacement::Outer : Painting::BoxShadowPlacement::Inner);
}
Painting::paint_box_shadow(context, enclosing_int_rect(bordered_rect()), resolved_box_shadow_data);
}
diff --git a/Userland/Libraries/LibWeb/Layout/InlineNode.cpp b/Userland/Libraries/LibWeb/Layout/InlineNode.cpp
index c4ba68df0f..1ac4fd6b98 100644
--- a/Userland/Libraries/LibWeb/Layout/InlineNode.cpp
+++ b/Userland/Libraries/LibWeb/Layout/InlineNode.cpp
@@ -48,10 +48,12 @@ void InlineNode::paint(PaintContext& context, PaintPhase phase)
resolved_box_shadow_data.ensure_capacity(computed_box_shadow.size());
for (auto const& layer : computed_box_shadow) {
resolved_box_shadow_data.empend(
+ layer.color,
static_cast<int>(layer.offset_x.resolved_or_zero(*this).to_px(*this)),
static_cast<int>(layer.offset_y.resolved_or_zero(*this).to_px(*this)),
static_cast<int>(layer.blur_radius.resolved_or_zero(*this).to_px(*this)),
- layer.color);
+ static_cast<int>(layer.spread_distance.resolved_or_zero(*this).to_px(*this)),
+ layer.placement == CSS::BoxShadowPlacement::Outer ? Painting::BoxShadowPlacement::Outer : Painting::BoxShadowPlacement::Inner);
}
Painting::paint_box_shadow(context, enclosing_int_rect(absolute_fragment_rect), resolved_box_shadow_data);
}