1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

LibWeb: Convert trivial attributes to FrozenArray

This commit is contained in:
Timothy Flynn 2025-04-25 10:07:43 -04:00 committed by Jelle Raaijmakers
parent 62167d923c
commit ad34fdad48
Notes: github-actions[bot] 2025-04-25 14:44:52 +00:00
6 changed files with 10 additions and 17 deletions

View file

@ -3,6 +3,5 @@
// https://drafts.csswg.org/css-cascade-5/#the-csslayerstatementrule-interface
[Exposed=Window]
interface CSSLayerStatementRule : CSSRule {
// FIXME: Should be a FrozenArray<CSSOMString>
readonly attribute sequence<CSSOMString> nameList;
readonly attribute FrozenArray<CSSOMString> nameList;
};

View file

@ -7,8 +7,7 @@ interface ClipboardItem {
optional ClipboardItemOptions options = {});
readonly attribute PresentationStyle presentationStyle;
// FIXME: Should be a FrozenArray<DOMString>
readonly attribute sequence<DOMString> types;
readonly attribute FrozenArray<DOMString> types;
Promise<Blob> getType(DOMString type);

View file

@ -14,7 +14,7 @@ interface DataTransfer {
[FIXME] undefined setDragImage(Element image, long x, long y);
// old interface
readonly attribute sequence<DOMString> types; // FIXME: This should be FrozenArray<DOMString>
readonly attribute FrozenArray<DOMString> types;
DOMString getData(DOMString format);
[FIXME] undefined setData(DOMString format, DOMString data);
[FIXME] undefined clearData(optional DOMString format);

View file

@ -1,7 +1,6 @@
// https://html.spec.whatwg.org/multipage/system-state.html#navigatorlanguage
interface mixin NavigatorLanguage {
readonly attribute DOMString language;
// FIXME: readonly attribute FrozenArray<DOMString> languages;
// This is supposed to be a FrozenArray that always returns the same object
readonly attribute sequence<DOMString> languages;
// FIXME: This is supposed always return the same object
readonly attribute FrozenArray<DOMString> languages;
};

View file

@ -13,8 +13,7 @@ interface IntersectionObserver {
readonly attribute (Element or Document)? root;
readonly attribute DOMString rootMargin;
readonly attribute DOMString scrollMargin;
// FIXME: `sequence<double>` should be `FrozenArray<double>`
readonly attribute sequence<double> thresholds;
readonly attribute FrozenArray<double> thresholds;
readonly attribute long delay;
readonly attribute boolean trackVisibility;
undefined observe(Element target);

View file

@ -6,10 +6,7 @@
interface ResizeObserverEntry {
readonly attribute Element target;
readonly attribute DOMRectReadOnly contentRect;
// FIXME: Return FrozenArray<ResizeObserverSize> instead of any.
[ImplementedAs=border_box_size_js_array] readonly attribute any borderBoxSize;
// FIXME: Return FrozenArray<ResizeObserverSize> instead of any.
[ImplementedAs=content_box_size_js_array] readonly attribute any contentBoxSize;
// FIXME: Return FrozenArray<ResizeObserverSize> instead of any.
[ImplementedAs=device_pixel_content_box_size_js_array] readonly attribute any devicePixelContentBoxSize;
readonly attribute FrozenArray<ResizeObserverSize> borderBoxSize;
readonly attribute FrozenArray<ResizeObserverSize> contentBoxSize;
readonly attribute FrozenArray<ResizeObserverSize> devicePixelContentBoxSize;
};