mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:37:45 +00:00
LibWeb: Remove reference_for_percent parameter from Length::resolved()
Despite looking like it was still needed, it was only used for passing to other calls to Length::resolved() recursively. This makes the various `foo.resolved().resolved()` calls a lot less awkward. (Though, still quite awkward.) I think we'd need to separate calculated lengths out to properly tidy these calls up, but one yak at a time. :^)
This commit is contained in:
parent
cff44831a8
commit
bfcbab0dcf
11 changed files with 133 additions and 132 deletions
|
@ -17,10 +17,10 @@ BorderRadiusData normalized_border_radius_data(Layout::Node const& node, Gfx::Fl
|
|||
// Spec just says "Refer to corresponding dimension of the border box."
|
||||
// For now, all relative values are relative to the width.
|
||||
auto width_length = CSS::Length::make_px(rect.width());
|
||||
auto bottom_left_radius_px = bottom_left_radius.resolved(width_length).resolved_or_zero(node, rect.width()).to_px(node);
|
||||
auto bottom_right_radius_px = bottom_right_radius.resolved(width_length).resolved_or_zero(node, rect.width()).to_px(node);
|
||||
auto top_left_radius_px = top_left_radius.resolved(width_length).resolved_or_zero(node, rect.width()).to_px(node);
|
||||
auto top_right_radius_px = top_right_radius.resolved(width_length).resolved_or_zero(node, rect.width()).to_px(node);
|
||||
auto bottom_left_radius_px = bottom_left_radius.resolved(width_length).resolved_or_zero(node).to_px(node);
|
||||
auto bottom_right_radius_px = bottom_right_radius.resolved(width_length).resolved_or_zero(node).to_px(node);
|
||||
auto top_left_radius_px = top_left_radius.resolved(width_length).resolved_or_zero(node).to_px(node);
|
||||
auto top_right_radius_px = top_right_radius.resolved(width_length).resolved_or_zero(node).to_px(node);
|
||||
|
||||
// Scale overlapping curves according to https://www.w3.org/TR/css-backgrounds-3/#corner-overlap
|
||||
auto f = 1.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue