mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 01:10:28 +03: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();
|
||||
}
|
||||
|
||||
// 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
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<SVGTransform>> SVGTransformList::get_item(WebIDL::UnsignedLong index)
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ public:
|
||||
virtual ~SVGTransformList() override;
|
||||
|
||||
WebIDL::UnsignedLong length();
|
||||
WebIDL::UnsignedLong number_of_items();
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<SVGTransform>> get_item(WebIDL::UnsignedLong index);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
[Exposed=Window]
|
||||
interface SVGTransformList {
|
||||
readonly attribute unsigned long length;
|
||||
[FIXME] readonly attribute unsigned long numberOfItems;
|
||||
readonly attribute unsigned long numberOfItems;
|
||||
|
||||
[FIXME] undefined clear();
|
||||
// FIXME: SVGTransform initialize(SVGTransform newItem);
|
||||
|
Loading…
Reference in New Issue
Block a user