Skip to content

Commit

Permalink
Sync interfaces/ with @webref/idl 3.45.3 (#45297)
Browse files Browse the repository at this point in the history
Co-authored-by: wpt-pr-bot <[email protected]>
  • Loading branch information
github-actions[bot] and wpt-pr-bot authored Mar 29, 2024
1 parent 89a96e5 commit ac8b032
Show file tree
Hide file tree
Showing 14 changed files with 210 additions and 124 deletions.
2 changes: 1 addition & 1 deletion interfaces/compute-pressure.idl
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ interface PressureRecord {
};

dictionary PressureObserverOptions {
double sampleRate = 1.0;
[EnforceRange] unsigned long sampleInterval = 0;
};
2 changes: 1 addition & 1 deletion interfaces/css-animations.idl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ partial interface CSSRule {
[Exposed=Window]
interface CSSKeyframeRule : CSSRule {
attribute CSSOMString keyText;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleProperties style;
};

[Exposed=Window]
Expand Down
35 changes: 34 additions & 1 deletion interfaces/css-fonts.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,42 @@
// (https://github.com/w3c/webref)
// Source: CSS Fonts Module Level 4 (https://drafts.csswg.org/css-fonts-4/)

[Exposed=Window]
interface CSSFontFaceDescriptors : CSSStyleDeclaration {
attribute [LegacyNullToEmptyString] CSSOMString src;
attribute [LegacyNullToEmptyString] CSSOMString fontFamily;
attribute [LegacyNullToEmptyString] CSSOMString font-family;
attribute [LegacyNullToEmptyString] CSSOMString fontStyle;
attribute [LegacyNullToEmptyString] CSSOMString font-style;
attribute [LegacyNullToEmptyString] CSSOMString fontWeight;
attribute [LegacyNullToEmptyString] CSSOMString font-weight;
attribute [LegacyNullToEmptyString] CSSOMString fontStretch;
attribute [LegacyNullToEmptyString] CSSOMString font-stretch;
attribute [LegacyNullToEmptyString] CSSOMString fontWidth;
attribute [LegacyNullToEmptyString] CSSOMString font-width;
attribute [LegacyNullToEmptyString] CSSOMString unicodeRange;
attribute [LegacyNullToEmptyString] CSSOMString unicode-range;
attribute [LegacyNullToEmptyString] CSSOMString fontFeatureSettings;
attribute [LegacyNullToEmptyString] CSSOMString font-feature-settings;
attribute [LegacyNullToEmptyString] CSSOMString fontVariationSettings;
attribute [LegacyNullToEmptyString] CSSOMString font-variation-settings;
attribute [LegacyNullToEmptyString] CSSOMString fontNamedInstance;
attribute [LegacyNullToEmptyString] CSSOMString font-named-instance;
attribute [LegacyNullToEmptyString] CSSOMString fontDisplay;
attribute [LegacyNullToEmptyString] CSSOMString font-display;
attribute [LegacyNullToEmptyString] CSSOMString fontLanguageOverride;
attribute [LegacyNullToEmptyString] CSSOMString font-language-override;
attribute [LegacyNullToEmptyString] CSSOMString ascentOverride;
attribute [LegacyNullToEmptyString] CSSOMString ascent-override;
attribute [LegacyNullToEmptyString] CSSOMString descentOverride;
attribute [LegacyNullToEmptyString] CSSOMString descent-override;
attribute [LegacyNullToEmptyString] CSSOMString lineGapOverride;
attribute [LegacyNullToEmptyString] CSSOMString line-gap-override;
};

[Exposed=Window]
interface CSSFontFaceRule : CSSRule {
readonly attribute CSSStyleDeclaration style;
readonly attribute CSSFontFaceDescriptors style;
};

partial interface CSSRule { const unsigned short FONT_FEATURE_VALUES_RULE = 14;
Expand Down
31 changes: 7 additions & 24 deletions interfaces/css-scroll-snap-2.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,14 @@
// (https://github.com/w3c/webref)
// Source: CSS Scroll Snap Module Level 2 (https://drafts.csswg.org/css-scroll-snap-2/)

[Exposed=Window]
interface SnapEvent : Event {
constructor(DOMString type, optional SnapEventInit eventInitDict = {});
readonly attribute EventTarget? target;
readonly attribute SnapTargetList snappedTargets;
readonly attribute SnapTargetList snapTargets;
readonly attribute boolean invokedProgrammatically;
readonly attribute boolean smoothlyScrolled;
};

[Exposed=Window]
interface SnapTargetList {
readonly attribute SnapTargetArray x;
readonly attribute SnapTargetArray y;
dictionary SnapEventInit : EventInit {
Node? snapTargetBlock;
Node? snapTargetInline;
};

[Exposed=Window]
interface SnapTargetArray {
readonly attribute unsigned long length;
getter EventTarget? item (unsigned long index);
};

dictionary SnapEventInit : EventModifierInit {
sequence<EventTarget> snappedTargetsX = [];
sequence<EventTarget> snappedTargetsY = [];
sequence<EventTarget> snapTargetsListX = [];
sequence<EventTarget> snapTargetsListY = [];
interface SnapEvent : Event {
constructor(DOMString type, optional SnapEventInit eventInitDict = {});
readonly attribute Node? snapTargetBlock;
readonly attribute Node? snapTargetInline;
};
36 changes: 24 additions & 12 deletions interfaces/css-view-transitions-2.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,39 @@
// (https://github.com/w3c/webref)
// Source: CSS View Transitions Module Level 2 (https://drafts.csswg.org/css-view-transitions-2/)

dictionary StartViewTransitionOptions {
UpdateCallback? update = null;
sequence<DOMString>? type = null;
partial interface CSSRule {
const unsigned short VIEW_TRANSITION_RULE = 15;
};

partial interface Document {
enum ViewTransitionNavigation { "auto", "none" };

ViewTransition startViewTransition(optional (UpdateCallback or StartViewTransitionOptions) callbackOptions = {});
[Exposed=Window]
interface CSSViewTransitionTypeSet {
readonly setlike<CSSOMString>;
};

partial interface CSSRule {
const unsigned short VIEW_TRANSITION_RULE = 15;
[Exposed=Window]
interface CSSViewTransitionRule : CSSRule {
readonly attribute ViewTransitionNavigation navigation;
readonly attribute CSSViewTransitionTypeSet types;
};

enum ViewTransitionNavigation { "auto", "none" };
[Exposed=Window]
interface CSSViewTransitionRule : CSSRule {
attribute ViewTransitionNavigation navigation;
attribute DOMTokenList typeList;
interface ViewTransitionTypeSet {
setlike<DOMString>;
};

[Exposed=Window]
partial interface ViewTransition {
readonly attribute DOMTokenList typeList;
attribute ViewTransitionTypeSet types;
};

dictionary StartViewTransitionOptions {
UpdateCallback? update = null;
sequence<DOMString>? types = null;
};

partial interface Document {

ViewTransition startViewTransition(optional (UpdateCallback or StartViewTransitionOptions) callbackOptions = {});
};
1 change: 1 addition & 0 deletions interfaces/cssom-view.idl
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ partial interface Element {
readonly attribute long clientLeft;
readonly attribute long clientWidth;
readonly attribute long clientHeight;
readonly attribute double currentCSSZoom;
};

partial interface HTMLElement {
Expand Down
24 changes: 22 additions & 2 deletions interfaces/cssom.idl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ interface CSSRule {
[Exposed=Window]
interface CSSStyleRule : CSSGroupingRule {
attribute CSSOMString selectorText;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleProperties style;
};

[Exposed=Window]
Expand All @@ -118,10 +118,26 @@ interface CSSGroupingRule : CSSRule {
undefined deleteRule(unsigned long index);
};

[Exposed=Window]
interface CSSPageDescriptors : CSSStyleDeclaration {
attribute [LegacyNullToEmptyString] CSSOMString margin;
attribute [LegacyNullToEmptyString] CSSOMString marginTop;
attribute [LegacyNullToEmptyString] CSSOMString marginRight;
attribute [LegacyNullToEmptyString] CSSOMString marginBottom;
attribute [LegacyNullToEmptyString] CSSOMString marginLeft;
attribute [LegacyNullToEmptyString] CSSOMString margin-top;
attribute [LegacyNullToEmptyString] CSSOMString margin-right;
attribute [LegacyNullToEmptyString] CSSOMString margin-bottom;
attribute [LegacyNullToEmptyString] CSSOMString margin-left;
attribute [LegacyNullToEmptyString] CSSOMString size;
attribute [LegacyNullToEmptyString] CSSOMString marks;
attribute [LegacyNullToEmptyString] CSSOMString bleed;
};

[Exposed=Window]
interface CSSPageRule : CSSGroupingRule {
attribute CSSOMString selectorText;
[SameObject, PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
[SameObject, PutForwards=cssText] readonly attribute CSSPageDescriptors style;
};

[Exposed=Window]
Expand All @@ -146,6 +162,10 @@ interface CSSStyleDeclaration {
[CEReactions] undefined setProperty(CSSOMString property, [LegacyNullToEmptyString] CSSOMString value, optional [LegacyNullToEmptyString] CSSOMString priority = "");
[CEReactions] CSSOMString removeProperty(CSSOMString property);
readonly attribute CSSRule? parentRule;
};

[Exposed=Window]
interface CSSStyleProperties : CSSStyleDeclaration {
[CEReactions] attribute [LegacyNullToEmptyString] CSSOMString cssFloat;
};

Expand Down
20 changes: 10 additions & 10 deletions interfaces/html.idl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ typedef (HTMLScriptElement or SVGScriptElement) HTMLOrSVGScriptElement;

[LegacyOverrideBuiltIns]
partial interface Document {
static Document parseHTMLUnsafe(DOMString html);
static Document parseHTMLUnsafe(HTMLString html);

// resource metadata management
[PutForwards=href, LegacyUnforgeable] readonly attribute Location? location;
Expand Down Expand Up @@ -77,8 +77,8 @@ partial interface Document {
[CEReactions] Document open(optional DOMString unused1, optional DOMString unused2); // both arguments are ignored
WindowProxy? open(USVString url, DOMString name, DOMString features);
[CEReactions] undefined close();
[CEReactions] undefined write(DOMString... text);
[CEReactions] undefined writeln(DOMString... text);
[CEReactions] undefined write(HTMLString... text);
[CEReactions] undefined writeln(HTMLString... text);

// user interaction
readonly attribute WindowProxy? defaultView;
Expand Down Expand Up @@ -452,7 +452,7 @@ interface HTMLIFrameElement : HTMLElement {
[HTMLConstructor] constructor();

[CEReactions] attribute USVString src;
[CEReactions] attribute DOMString srcdoc;
[CEReactions] attribute HTMLString srcdoc;
[CEReactions] attribute DOMString name;
[SameObject, PutForwards=value] readonly attribute DOMTokenList sandbox;
[CEReactions] attribute DOMString allow;
Expand Down Expand Up @@ -2296,7 +2296,7 @@ WorkerGlobalScope includes WindowOrWorkerGlobalScope;
interface DOMParser {
constructor();

[NewObject] Document parseFromString(DOMString string, DOMParserSupportedType type);
[NewObject] Document parseFromString(HTMLString string, DOMParserSupportedType type);
};

enum DOMParserSupportedType {
Expand All @@ -2308,11 +2308,11 @@ enum DOMParserSupportedType {
};

partial interface Element {
[CEReactions] undefined setHTMLUnsafe(DOMString html);
[CEReactions] undefined setHTMLUnsafe(HTMLString html);
};

partial interface ShadowRoot {
[CEReactions] undefined setHTMLUnsafe(DOMString html);
[CEReactions] undefined setHTMLUnsafe(HTMLString html);
};

[Exposed=Window]
Expand Down Expand Up @@ -2527,7 +2527,7 @@ interface WorkerGlobalScope : EventTarget {
readonly attribute WorkerGlobalScope self;
readonly attribute WorkerLocation location;
readonly attribute WorkerNavigator navigator;
undefined importScripts(USVString... urls);
undefined importScripts(ScriptURLString... urls);

attribute OnErrorEventHandler onerror;
attribute EventHandler onlanguagechange;
Expand Down Expand Up @@ -2565,7 +2565,7 @@ interface mixin AbstractWorker {

[Exposed=(Window,DedicatedWorker,SharedWorker)]
interface Worker : EventTarget {
constructor(USVString scriptURL, optional WorkerOptions options = {});
constructor(ScriptURLString scriptURL, optional WorkerOptions options = {});

undefined terminate();

Expand All @@ -2587,7 +2587,7 @@ Worker includes AbstractWorker;

[Exposed=Window]
interface SharedWorker : EventTarget {
constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {});
constructor(ScriptURLString scriptURL, optional (DOMString or WorkerOptions) options = {});

readonly attribute MessagePort port;
};
Expand Down
Loading

0 comments on commit ac8b032

Please sign in to comment.