mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Remove redundant Length::resolved() calls
Now that calc() is also resolved in to_px(), code in the form `foo.resolved(bar).to_px(bar)` can be simplified to `foo.to_px(bar)`.
This commit is contained in:
parent
6df3f9920d
commit
b715943035
Notes:
sideshowbarker
2024-07-17 18:34:25 +09:00
Author: https://github.com/AtkinsSJ
Commit: b715943035
Pull-request: https://github.com/SerenityOS/serenity/pull/12628
9 changed files with 60 additions and 72 deletions
|
@ -61,10 +61,10 @@ void InlineNode::paint(PaintContext& context, PaintPhase phase)
|
|||
for (auto const& layer : computed_box_shadow) {
|
||||
resolved_box_shadow_data.empend(
|
||||
layer.color,
|
||||
static_cast<int>(layer.offset_x.resolved(*this).to_px(*this)),
|
||||
static_cast<int>(layer.offset_y.resolved(*this).to_px(*this)),
|
||||
static_cast<int>(layer.blur_radius.resolved(*this).to_px(*this)),
|
||||
static_cast<int>(layer.spread_distance.resolved(*this).to_px(*this)),
|
||||
static_cast<int>(layer.offset_x.to_px(*this)),
|
||||
static_cast<int>(layer.offset_y.to_px(*this)),
|
||||
static_cast<int>(layer.blur_radius.to_px(*this)),
|
||||
static_cast<int>(layer.spread_distance.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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue