summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-07-12 20:07:35 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-12 23:12:11 +0200
commit04cc837db9917d05eb70aab602e6f0fdd34fe1d4 (patch)
tree78bf5dcd30402c6ff7e25c3b664a99be19901980 /Userland
parente883777a18a2f8f94329985b8cc85c0c977bec90 (diff)
downloadserenity-04cc837db9917d05eb70aab602e6f0fdd34fe1d4.zip
LibWeb: Stub out two functions on SVGGeometryElement
These two were called by Discord while loading: - float getTotalLength(); - DOMPoint getPointAtLength(float distance);
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp11
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h4
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl4
3 files changed, 19 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp
index 6a038af830..40c035ebed 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp
+++ b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.cpp
@@ -19,4 +19,15 @@ RefPtr<Layout::Node> SVGGeometryElement::create_layout_node(NonnullRefPtr<CSS::S
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);
+}
+
}
diff --git a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h
index 394f927863..dc52eb7d68 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h
+++ b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.h
@@ -6,6 +6,7 @@
#pragma once
+#include <LibWeb/Geometry/DOMPoint.h>
#include <LibWeb/SVG/SVGGraphicsElement.h>
namespace Web::SVG {
@@ -19,6 +20,9 @@ public:
virtual Gfx::Path& get_path() = 0;
+ float get_total_length();
+ NonnullRefPtr<Geometry::DOMPoint> get_point_at_length(float distance);
+
protected:
SVGGeometryElement(DOM::Document& document, DOM::QualifiedName qualified_name);
};
diff --git a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl
index 437cc278eb..047fddf84c 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl
+++ b/Userland/Libraries/LibWeb/SVG/SVGGeometryElement.idl
@@ -1,5 +1,9 @@
+#import <Geometry/DOMPoint.idl>
#import <SVG/SVGGraphicsElement.idl>
interface SVGGeometryElement : SVGGraphicsElement {
+ float getTotalLength();
+ DOMPoint getPointAtLength(float distance);
+
};