mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibWeb: Use the new to_px() helpers in CSS, SVG and layout code
There should be no behavior change from this, only slightly less verbosity. :^)
This commit is contained in:
parent
cdf0d3e905
commit
ca1fa5f748
Notes:
sideshowbarker
2024-07-17 08:35:21 +09:00
Author: https://github.com/awesomekling
Commit: ca1fa5f748
Pull-request: https://github.com/SerenityOS/serenity/pull/18681
14 changed files with 141 additions and 149 deletions
|
@ -428,8 +428,8 @@ Gfx::FloatPoint StackingContext::compute_transform_origin() const
|
|||
auto style_value = m_box->computed_values().transform_origin();
|
||||
// FIXME: respect transform-box property
|
||||
auto reference_box = paintable_box().absolute_border_box_rect();
|
||||
auto x = reference_box.left() + style_value.x.resolved(m_box, CSS::Length::make_px(reference_box.width())).to_px(m_box);
|
||||
auto y = reference_box.top() + style_value.y.resolved(m_box, CSS::Length::make_px(reference_box.height())).to_px(m_box);
|
||||
auto x = reference_box.left() + style_value.x.to_px(m_box, reference_box.width());
|
||||
auto y = reference_box.top() + style_value.y.to_px(m_box, reference_box.height());
|
||||
return { x, y };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue