Skip to content

Commit

Permalink
Rename legacy extended attributes in webidls
Browse files Browse the repository at this point in the history
  • Loading branch information
sagudev committed Feb 19, 2023
1 parent 2acdeab commit 55dac83
Show file tree
Hide file tree
Showing 51 changed files with 83 additions and 83 deletions.
2 changes: 1 addition & 1 deletion components/script/dom/webidls/ANGLEInstancedArrays.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* https://www.khronos.org/registry/webgl/extensions/ANGLE_instanced_arrays/
*/

[NoInterfaceObject, Exposed=Window]
[LegacyNoInterfaceObject, Exposed=Window]
interface ANGLEInstancedArrays {
const GLenum VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE = 0x88FE;
undefined drawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
Expand Down
4 changes: 2 additions & 2 deletions components/script/dom/webidls/CSSStyleDeclaration.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ interface CSSStyleDeclaration {
DOMString getPropertyValue(DOMString property);
DOMString getPropertyPriority(DOMString property);
[CEReactions, Throws]
undefined setProperty(DOMString property, [TreatNullAs=EmptyString] DOMString value,
optional [TreatNullAs=EmptyString] DOMString priority = "");
undefined setProperty(DOMString property, [LegacyNullToEmptyString] DOMString value,
optional [LegacyNullToEmptyString] DOMString priority = "");
[CEReactions, Throws]
DOMString removeProperty(DOMString property);
// readonly attribute CSSRule? parentRule;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ interface mixin CanvasFillStrokeStyles {
[Throws]
CanvasGradient createRadialGradient(double x0, double y0, double r0, double x1, double y1, double r1);
[Throws]
CanvasPattern? createPattern(CanvasImageSource image, [TreatNullAs=EmptyString] DOMString repetition);
CanvasPattern? createPattern(CanvasImageSource image, [LegacyNullToEmptyString] DOMString repetition);
};

[Exposed=(PaintWorklet, Window, Worker)]
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/CharacterData.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

[Exposed=Window, Abstract]
interface CharacterData : Node {
[Pure] attribute [TreatNullAs=EmptyString] DOMString data;
[Pure] attribute [LegacyNullToEmptyString] DOMString data;
[Pure] readonly attribute unsigned long length;
[Pure, Throws]
DOMString substringData(unsigned long offset, unsigned long count);
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/DOMImplementation.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface DOMImplementation {
DOMString systemId);
[NewObject, Throws]
XMLDocument createDocument(DOMString? namespace,
[TreatNullAs=EmptyString] DOMString qualifiedName,
[LegacyNullToEmptyString] DOMString qualifiedName,
optional DocumentType? doctype = null);
[NewObject]
Document createHTMLDocument(optional DOMString title);
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/DOMStringMap.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

// https://html.spec.whatwg.org/multipage/#the-domstringmap-interface
[Exposed=Window, OverrideBuiltins]
[Exposed=Window, LegacyOverrideBuiltIns]
interface DOMStringMap {
getter DOMString (DOMString name);
[CEReactions, Throws]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// way to enforce security policy.

// https://html.spec.whatwg.org/multipage/#location
[Exposed=(Window,DissimilarOriginWindow), Unforgeable, NoInterfaceObject]
[Exposed=(Window,DissimilarOriginWindow), LegacyUnforgeable, LegacyNoInterfaceObject]
interface DissimilarOriginLocation {
[Throws] attribute USVString href;
[Throws] undefined assign(USVString url);
Expand Down
10 changes: 5 additions & 5 deletions components/script/dom/webidls/DissimilarOriginWindow.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
// way to enforce security policy.

// https://html.spec.whatwg.org/multipage/#window
[Global, Exposed=(Window,DissimilarOriginWindow), NoInterfaceObject]
[Global, Exposed=(Window,DissimilarOriginWindow), LegacyNoInterfaceObject]
interface DissimilarOriginWindow : GlobalScope {
[Unforgeable] readonly attribute WindowProxy window;
[LegacyUnforgeable] readonly attribute WindowProxy window;
[BinaryName="Self_", Replaceable] readonly attribute WindowProxy self;
[Unforgeable] readonly attribute WindowProxy? parent;
[Unforgeable] readonly attribute WindowProxy? top;
[LegacyUnforgeable] readonly attribute WindowProxy? parent;
[LegacyUnforgeable] readonly attribute WindowProxy? top;
[Replaceable] readonly attribute WindowProxy frames;
[Replaceable] readonly attribute unsigned long length;
[Unforgeable] readonly attribute DissimilarOriginLocation location;
[LegacyUnforgeable] readonly attribute DissimilarOriginLocation location;

undefined close();
readonly attribute boolean closed;
Expand Down
22 changes: 11 additions & 11 deletions components/script/dom/webidls/Document.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ dictionary ElementCreationOptions {
};

// https://html.spec.whatwg.org/multipage/#the-document-object
// [OverrideBuiltins]
// [LegacyOverrideBuiltIns]
partial /*sealed*/ interface Document {
// resource metadata management
[PutForwards=href, Unforgeable]
[PutForwards=href, LegacyUnforgeable]
readonly attribute Location? location;
[SetterThrows] attribute DOMString domain;
readonly attribute DOMString referrer;
Expand Down Expand Up @@ -146,7 +146,7 @@ partial /*sealed*/ interface Document {
// DOMString queryCommandValue(DOMString commandId);

// special event handler IDL attributes that only apply to Document objects
[LenientThis] attribute EventHandler onreadystatechange;
[LegacyLenientThis] attribute EventHandler onreadystatechange;

// also has obsolete members
};
Expand All @@ -156,22 +156,22 @@ Document includes DocumentAndElementEventHandlers;
// https://html.spec.whatwg.org/multipage/#Document-partial
partial interface Document {
[CEReactions]
attribute [TreatNullAs=EmptyString] DOMString fgColor;
attribute [LegacyNullToEmptyString] DOMString fgColor;

// https://github.com/servo/servo/issues/8715
// [CEReactions, TreatNullAs=EmptyString]
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString linkColor;

// https://github.com/servo/servo/issues/8716
// [CEReactions, TreatNullAs=EmptyString]
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString vlinkColor;

// https://github.com/servo/servo/issues/8717
// [CEReactions, TreatNullAs=EmptyString]
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString alinkColor;

[CEReactions]
attribute [TreatNullAs=EmptyString] DOMString bgColor;
attribute [LegacyNullToEmptyString] DOMString bgColor;

[SameObject]
readonly attribute HTMLCollection anchors;
Expand All @@ -189,9 +189,9 @@ partial interface Document {

// https://fullscreen.spec.whatwg.org/#api
partial interface Document {
[LenientSetter] readonly attribute boolean fullscreenEnabled;
[LenientSetter] readonly attribute Element? fullscreenElement;
[LenientSetter] readonly attribute boolean fullscreen; // historical
[LegacyLenientSetter] readonly attribute boolean fullscreenEnabled;
[LegacyLenientSetter] readonly attribute Element? fullscreenElement;
[LegacyLenientSetter] readonly attribute boolean fullscreen; // historical

Promise<undefined> exitFullscreen();

Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/DynamicModuleOwner.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* so that we can hold a traceable owner for those dynamic modules which don't hold a owner.
*/

[NoInterfaceObject, Exposed=Window]
[LegacyNoInterfaceObject, Exposed=Window]
interface DynamicModuleOwner {
readonly attribute Promise<any> promise;
};
2 changes: 1 addition & 1 deletion components/script/dom/webidls/EXTBlendMinmax.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* https://www.khronos.org/registry/webgl/extensions/EXT_blend_minmax/
*/

[NoInterfaceObject, Exposed=Window]
[LegacyNoInterfaceObject, Exposed=Window]
interface EXTBlendMinmax {
const GLenum MIN_EXT = 0x8007;
const GLenum MAX_EXT = 0x8008;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* https://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/
*/

[NoInterfaceObject, Exposed=Window]
[LegacyNoInterfaceObject, Exposed=Window]
interface EXTColorBufferHalfFloat {
const GLenum RGBA16F_EXT = 0x881A;
const GLenum RGB16F_EXT = 0x881B;
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/EXTFragDepth.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
* https://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/
*/

[NoInterfaceObject, Exposed=Window]
[LegacyNoInterfaceObject, Exposed=Window]
interface EXTFragDepth {
}; // interface EXT_frag_depth
2 changes: 1 addition & 1 deletion components/script/dom/webidls/EXTShaderTextureLod.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
* https://www.khronos.org/registry/webgl/extensions/EXT_shader_texture_lod/
*/

[NoInterfaceObject, Exposed=Window]
[LegacyNoInterfaceObject, Exposed=Window]
interface EXTShaderTextureLod {
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* https://www.khronos.org/registry/webgl/extensions/EXT_texture_filter_anisotropic/
*/

[NoInterfaceObject, Exposed=Window]
[LegacyNoInterfaceObject, Exposed=Window]
interface EXTTextureFilterAnisotropic {
const GLenum TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
const GLenum MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
Expand Down
4 changes: 2 additions & 2 deletions components/script/dom/webidls/Element.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ partial interface Element {
// https://w3c.github.io/DOM-Parsing/#extensions-to-the-element-interface
partial interface Element {
[CEReactions, Throws]
attribute [TreatNullAs=EmptyString] DOMString innerHTML;
attribute [LegacyNullToEmptyString] DOMString innerHTML;
[CEReactions, Throws]
attribute [TreatNullAs=EmptyString] DOMString outerHTML;
attribute [LegacyNullToEmptyString] DOMString outerHTML;
};

// https://fullscreen.spec.whatwg.org/#api
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/Event.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface Event {
[Pure]
readonly attribute boolean defaultPrevented;

[Unforgeable]
[LegacyUnforgeable]
readonly attribute boolean isTrusted;
[Constant]
readonly attribute DOMHighResTimeStamp timeStamp;
Expand Down
10 changes: 5 additions & 5 deletions components/script/dom/webidls/EventHandler.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
* and create derivative works of this document.
*/

[TreatNonObjectAsNull]
[LegacyTreatNonObjectAsNull]
callback EventHandlerNonNull = any (Event event);
typedef EventHandlerNonNull? EventHandler;

[TreatNonObjectAsNull]
[LegacyTreatNonObjectAsNull]
callback OnErrorEventHandlerNonNull = any ((Event or DOMString) event, optional DOMString source,
optional unsigned long lineno, optional unsigned long column,
optional any error);
typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;

[TreatNonObjectAsNull]
[LegacyTreatNonObjectAsNull]
callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;

Expand Down Expand Up @@ -62,8 +62,8 @@ interface mixin GlobalEventHandlers {
attribute EventHandler onloadedmetadata;
attribute EventHandler onloadstart;
attribute EventHandler onmousedown;
[LenientThis] attribute EventHandler onmouseenter;
[LenientThis] attribute EventHandler onmouseleave;
[LegacyLenientThis] attribute EventHandler onmouseenter;
[LegacyLenientThis] attribute EventHandler onmouseleave;
attribute EventHandler onmousemove;
attribute EventHandler onmouseout;
attribute EventHandler onmouseover;
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/HTMLAudioElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

// https://html.spec.whatwg.org/multipage/#htmlaudioelement
[Exposed=Window, NamedConstructor=Audio(optional DOMString src)]
[Exposed=Window, LegacyFactoryFunction=Audio(optional DOMString src)]
interface HTMLAudioElement : HTMLMediaElement {
[HTMLConstructor] constructor();
};
10 changes: 5 additions & 5 deletions components/script/dom/webidls/HTMLBodyElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ HTMLBodyElement includes WindowEventHandlers;

// https://html.spec.whatwg.org/multipage/#HTMLBodyElement-partial
partial interface HTMLBodyElement {
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString text;
[CEReactions] attribute [LegacyNullToEmptyString] DOMString text;

// https://github.com/servo/servo/issues/8715
//[CEReactions, TreatNullAs=EmptyString] attribute DOMString link;
//[CEReactions, LegacyNullToEmptyString] attribute DOMString link;

// https://github.com/servo/servo/issues/8716
//[CEReactions, TreatNullAs=EmptyString] attribute DOMString vLink;
//[CEReactions, LegacyNullToEmptyString] attribute DOMString vLink;

// https://github.com/servo/servo/issues/8717
//[CEReactions, TreatNullAs=EmptyString] attribute DOMString aLink;
//[CEReactions, LegacyNullToEmptyString] attribute DOMString aLink;

[CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
[CEReactions] attribute [LegacyNullToEmptyString] DOMString bgColor;
[CEReactions] attribute DOMString background;
};
2 changes: 1 addition & 1 deletion components/script/dom/webidls/HTMLElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ interface HTMLElement : Element {
// attribute boolean spellcheck;
// void forceSpellCheck();

attribute [TreatNullAs=EmptyString] DOMString innerText;
attribute [LegacyNullToEmptyString] DOMString innerText;

// command API
// readonly attribute DOMString? commandType;
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/HTMLFontElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface HTMLFontElement : HTMLElement {
[HTMLConstructor] constructor();

[CEReactions]
attribute [TreatNullAs=EmptyString] DOMString color;
attribute [LegacyNullToEmptyString] DOMString color;
[CEReactions]
attribute DOMString face;
[CEReactions]
Expand Down
4 changes: 2 additions & 2 deletions components/script/dom/webidls/HTMLFrameElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ interface HTMLFrameElement : HTMLElement {
// readonly attribute Document? contentDocument;
// readonly attribute WindowProxy? contentWindow;

// [CEReactions, TreatNullAs=EmptyString]
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString marginHeight;
// [CEReactions, TreatNullAs=EmptyString]
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString marginWidth;
};
4 changes: 2 additions & 2 deletions components/script/dom/webidls/HTMLIFrameElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ partial interface HTMLIFrameElement {
// [CEReactions]
// attribute DOMString longDesc;

// [CEReactions, TreatNullAs=EmptyString]
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString marginHeight;
// [CEReactions, TreatNullAs=EmptyString]
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString marginWidth;
};
4 changes: 2 additions & 2 deletions components/script/dom/webidls/HTMLImageElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

// https://html.spec.whatwg.org/multipage/#htmlimageelement
[Exposed=Window, NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
[Exposed=Window, LegacyFactoryFunction=Image(optional unsigned long width, optional unsigned long height)]
interface HTMLImageElement : HTMLElement {
[HTMLConstructor] constructor();

Expand Down Expand Up @@ -48,7 +48,7 @@ partial interface HTMLImageElement {
attribute DOMString longDesc;

[CEReactions]
attribute [TreatNullAs=EmptyString] DOMString border;
attribute [LegacyNullToEmptyString] DOMString border;
};

// https://drafts.csswg.org/cssom-view/#extensions-to-the-htmlimageelement-interface
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/HTMLInputElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ interface HTMLInputElement : HTMLElement {
[CEReactions]
attribute DOMString defaultValue;
[CEReactions, SetterThrows]
attribute [TreatNullAs=EmptyString] DOMString value;
attribute [LegacyNullToEmptyString] DOMString value;
[SetterThrows]
attribute object? valueAsDate;
[SetterThrows]
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/HTMLObjectElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ partial interface HTMLObjectElement {
// attribute DOMString codeBase;
// attribute DOMString codeType;

//[TreatNullAs=EmptyString] attribute DOMString border;
//[LegacyNullToEmptyString] attribute DOMString border;
};
2 changes: 1 addition & 1 deletion components/script/dom/webidls/HTMLOptionElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

// https://html.spec.whatwg.org/multipage/#htmloptionelement
[Exposed=Window, NamedConstructor=Option(optional DOMString text = "", optional DOMString value,
[Exposed=Window, LegacyFactoryFunction=Option(optional DOMString text = "", optional DOMString value,
optional boolean defaultSelected = false,
optional boolean selected = false)]
interface HTMLOptionElement : HTMLElement {
Expand Down
2 changes: 1 addition & 1 deletion components/script/dom/webidls/HTMLTableCellElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ partial interface HTMLTableCellElement {
// attribute DOMString vAlign;

[CEReactions]
attribute [TreatNullAs=EmptyString] DOMString bgColor;
attribute [LegacyNullToEmptyString] DOMString bgColor;
};
6 changes: 3 additions & 3 deletions components/script/dom/webidls/HTMLTableElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ partial interface HTMLTableElement {
attribute DOMString width;

[CEReactions]
attribute [TreatNullAs=EmptyString] DOMString bgColor;
// [CEReactions, TreatNullAs=EmptyString]
attribute [LegacyNullToEmptyString] DOMString bgColor;
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString cellPadding;
// [CEReactions, TreatNullAs=EmptyString]
// [CEReactions, LegacyNullToEmptyString]
// attribute DOMString cellSpacing;
};
2 changes: 1 addition & 1 deletion components/script/dom/webidls/HTMLTableRowElement.webidl
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ partial interface HTMLTableRowElement {
// attribute DOMString vAlign;

[CEReactions]
attribute [TreatNullAs=EmptyString] DOMString bgColor;
attribute [LegacyNullToEmptyString] DOMString bgColor;
};
Loading

0 comments on commit 55dac83

Please sign in to comment.