From 913fdbc3daff65952b5678a34b98e07d4e6e4fbb Mon Sep 17 00:00:00 2001 From: Tanner Rogalsky Date: Tue, 29 Oct 2019 19:11:19 -0400 Subject: [PATCH] Update HTMLImageElement IDL to latest version from gecko (#1842) * Update HTMLImageElement IDL to latest version from gecko * Remove Mozilla-specific extensions to HTMLImageElement IDL --- .../web-sys/webidls/enabled/HTMLImageElement.webidl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/crates/web-sys/webidls/enabled/HTMLImageElement.webidl b/crates/web-sys/webidls/enabled/HTMLImageElement.webidl index 8744aeb919b..f4f9360c2a1 100644 --- a/crates/web-sys/webidls/enabled/HTMLImageElement.webidl +++ b/crates/web-sys/webidls/enabled/HTMLImageElement.webidl @@ -18,9 +18,11 @@ interface URI; interface nsIStreamListener; */ -[HTMLConstructor, - NamedConstructor=Image(optional unsigned long width, optional unsigned long height)] +[NamedConstructor=Image(optional unsigned long width, optional unsigned long height), + Exposed=Window] interface HTMLImageElement : HTMLElement { + [HTMLConstructor] constructor(); + [CEReactions, SetterThrows] attribute DOMString alt; [CEReactions, SetterNeedsSubjectPrincipal=NonSystem, SetterThrows] @@ -39,9 +41,13 @@ interface HTMLImageElement : HTMLElement { attribute unsigned long width; [CEReactions, SetterThrows] attribute unsigned long height; + [CEReactions, SetterThrows] + attribute DOMString decoding; readonly attribute unsigned long naturalWidth; readonly attribute unsigned long naturalHeight; readonly attribute boolean complete; + [NewObject] + Promise decode(); }; // http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis @@ -57,7 +63,7 @@ partial interface HTMLImageElement { [CEReactions, SetterThrows] attribute DOMString longDesc; - [CEReactions, TreatNullAs=EmptyString,SetterThrows] attribute DOMString border; + [CEReactions, SetterThrows] attribute [TreatNullAs=EmptyString] DOMString border; }; // [Update me: not in whatwg spec yet]