LibWeb: Rename transform_box_rect() to transform_reference_box()

This is closer to its name in the spec.
This commit is contained in:
Psychpsyo 2025-11-12 21:36:39 +01:00 committed by Sam Atkins
parent 9a1352fc17
commit ada3810779
Notes: github-actions[bot] 2025-11-21 11:15:45 +00:00
3 changed files with 5 additions and 5 deletions

View file

@ -68,7 +68,7 @@ ErrorOr<Gfx::FloatMatrix4x4> Transformation::to_matrix(Optional<Painting::Painta
CSSPixels width = 1;
CSSPixels height = 1;
if (paintable_box.has_value()) {
auto reference_box = paintable_box->transform_box_rect();
auto reference_box = paintable_box->transform_reference_box();
width = reference_box.width();
height = reference_box.height();
}

View file

@ -1433,8 +1433,8 @@ Optional<CSSPixelRect> PaintableBox::get_masking_area() const
return absolute_border_box_rect();
}
// https://www.w3.org/TR/css-transforms-1/#transform-box
CSSPixelRect PaintableBox::transform_box_rect() const
// https://www.w3.org/TR/css-transforms-1/#reference-box
CSSPixelRect PaintableBox::transform_reference_box() const
{
auto transform_box = computed_values().transform_box();
// For SVG elements without associated CSS layout box, the used value for content-box is fill-box and for
@ -1583,7 +1583,7 @@ void PaintableBox::resolve_paint_properties()
}
auto const& transform_origin = computed_values.transform_origin();
auto reference_box = transform_box_rect();
auto reference_box = transform_reference_box();
auto x = reference_box.left() + transform_origin.x.to_px(layout_node, reference_box.width());
auto y = reference_box.top() + transform_origin.y.to_px(layout_node, reference_box.height());
set_transform_origin({ x, y });

View file

@ -217,7 +217,7 @@ public:
virtual bool wants_mouse_events() const override;
CSSPixelRect transform_box_rect() const;
CSSPixelRect transform_reference_box() const;
virtual void resolve_paint_properties() override;
RefPtr<ScrollFrame const> nearest_scroll_frame() const;