mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 16:21:29 +00:00
LibWeb/SVG: Implement SVGTransformList.numberOfItems
This commit is contained in:
parent
4a1d02e7d8
commit
48e834918a
Notes:
sideshowbarker
2024-07-17 05:18:58 +09:00
Author: https://github.com/jamierocks Commit: https://github.com/SerenityOS/serenity/commit/48e834918a Pull-request: https://github.com/SerenityOS/serenity/pull/24525
|
@ -30,6 +30,13 @@ WebIDL::UnsignedLong SVGTransformList::length()
|
||||||
return m_transforms.size();
|
return m_transforms.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://svgwg.org/svg2-draft/single-page.html#types-__svg__SVGNameList__numberOfItems
|
||||||
|
WebIDL::UnsignedLong SVGTransformList::number_of_items()
|
||||||
|
{
|
||||||
|
// The length and numberOfItems IDL attributes represents the length of the list, and on getting simply return the length of the list.
|
||||||
|
return m_transforms.size();
|
||||||
|
}
|
||||||
|
|
||||||
// https://svgwg.org/svg2-draft/single-page.html#types-__svg__SVGNameList__getItem
|
// https://svgwg.org/svg2-draft/single-page.html#types-__svg__SVGNameList__getItem
|
||||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<SVGTransform>> SVGTransformList::get_item(WebIDL::UnsignedLong index)
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<SVGTransform>> SVGTransformList::get_item(WebIDL::UnsignedLong index)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,7 @@ public:
|
||||||
virtual ~SVGTransformList() override;
|
virtual ~SVGTransformList() override;
|
||||||
|
|
||||||
WebIDL::UnsignedLong length();
|
WebIDL::UnsignedLong length();
|
||||||
|
WebIDL::UnsignedLong number_of_items();
|
||||||
|
|
||||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<SVGTransform>> get_item(WebIDL::UnsignedLong index);
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<SVGTransform>> get_item(WebIDL::UnsignedLong index);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
[Exposed=Window]
|
[Exposed=Window]
|
||||||
interface SVGTransformList {
|
interface SVGTransformList {
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
[FIXME] readonly attribute unsigned long numberOfItems;
|
readonly attribute unsigned long numberOfItems;
|
||||||
|
|
||||||
[FIXME] undefined clear();
|
[FIXME] undefined clear();
|
||||||
// FIXME: SVGTransform initialize(SVGTransform newItem);
|
// FIXME: SVGTransform initialize(SVGTransform newItem);
|
||||||
|
|
Loading…
Reference in a new issue