LibWeb: Misc. cleanup of code

Some things I came across while working on a bugfix. No functional
changes.
This commit is contained in:
Jelle Raaijmakers 2025-10-26 12:15:34 +01:00 committed by Jelle Raaijmakers
parent e4de6c0d05
commit 6f50c35d68
Notes: github-actions[bot] 2025-10-27 23:43:37 +00:00
4 changed files with 2 additions and 6 deletions

View file

@ -114,13 +114,12 @@ NumberPercentage SVGLinearGradientElement::end_y_impl(HashTable<SVGGradientEleme
Optional<Painting::PaintStyle> SVGLinearGradientElement::to_gfx_paint_style(SVGPaintContext const& paint_context) const
{
auto units = gradient_units();
// FIXME: Resolve percentages properly
Gfx::FloatPoint start_point {};
Gfx::FloatPoint end_point {};
// https://svgwg.org/svg2-draft/pservers.html#LinearGradientElementGradientUnitsAttribute
if (units == GradientUnits::ObjectBoundingBox) {
if (gradient_units() == GradientUnits::ObjectBoundingBox) {
// If gradientUnits="objectBoundingBox", the user coordinate system for attributes x1, y1, x2 and y2
// is established using the bounding box of the element to which the gradient is applied (see Object bounding
// box units) and then applying the transform specified by attribute gradientTransform. Percentages represent