mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:07:34 +00:00
LibWeb: Stub out two functions on SVGGeometryElement
These two were called by Discord while loading: - float getTotalLength(); - DOMPoint getPointAtLength(float distance);
This commit is contained in:
parent
e883777a18
commit
04cc837db9
3 changed files with 19 additions and 0 deletions
|
@ -19,4 +19,15 @@ RefPtr<Layout::Node> SVGGeometryElement::create_layout_node(NonnullRefPtr<CSS::S
|
||||||
return adopt_ref(*new Layout::SVGGeometryBox(document(), *this, move(style)));
|
return adopt_ref(*new Layout::SVGGeometryBox(document(), *this, move(style)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float SVGGeometryElement::get_total_length()
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
NonnullRefPtr<Geometry::DOMPoint> SVGGeometryElement::get_point_at_length(float distance)
|
||||||
|
{
|
||||||
|
(void)distance;
|
||||||
|
return Geometry::DOMPoint::create(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <LibWeb/Geometry/DOMPoint.h>
|
||||||
#include <LibWeb/SVG/SVGGraphicsElement.h>
|
#include <LibWeb/SVG/SVGGraphicsElement.h>
|
||||||
|
|
||||||
namespace Web::SVG {
|
namespace Web::SVG {
|
||||||
|
@ -19,6 +20,9 @@ public:
|
||||||
|
|
||||||
virtual Gfx::Path& get_path() = 0;
|
virtual Gfx::Path& get_path() = 0;
|
||||||
|
|
||||||
|
float get_total_length();
|
||||||
|
NonnullRefPtr<Geometry::DOMPoint> get_point_at_length(float distance);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SVGGeometryElement(DOM::Document& document, DOM::QualifiedName qualified_name);
|
SVGGeometryElement(DOM::Document& document, DOM::QualifiedName qualified_name);
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
|
#import <Geometry/DOMPoint.idl>
|
||||||
#import <SVG/SVGGraphicsElement.idl>
|
#import <SVG/SVGGraphicsElement.idl>
|
||||||
|
|
||||||
interface SVGGeometryElement : SVGGraphicsElement {
|
interface SVGGeometryElement : SVGGraphicsElement {
|
||||||
|
|
||||||
|
float getTotalLength();
|
||||||
|
DOMPoint getPointAtLength(float distance);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue