
Note that as of this commit, there aren't any such throwers, and the call site in Heap::allocate will drop exceptions on the floor. This commit only serves to change the declaration of the overrides, make sure they return an empty value, and to propagate OOM errors frm their base initialize invocations.
32 lines
859 B
C++
32 lines
859 B
C++
/*
|
|
* Copyright (c) 2020, Matthew Olsson <mattco@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/Geometry/DOMPoint.h>
|
|
#include <LibWeb/SVG/SVGGraphicsElement.h>
|
|
|
|
namespace Web::SVG {
|
|
|
|
// https://svgwg.org/svg2-draft/types.html#InterfaceSVGGeometryElement
|
|
class SVGGeometryElement : public SVGGraphicsElement {
|
|
WEB_PLATFORM_OBJECT(SVGGeometryElement, SVGGraphicsElement);
|
|
|
|
public:
|
|
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
|
|
|
virtual Gfx::Path& get_path() = 0;
|
|
|
|
float get_total_length();
|
|
JS::NonnullGCPtr<Geometry::DOMPoint> get_point_at_length(float distance);
|
|
|
|
protected:
|
|
SVGGeometryElement(DOM::Document& document, DOM::QualifiedName qualified_name);
|
|
|
|
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
|
};
|
|
|
|
}
|