From 29cb20ace7c31bcf0c3e9ae20ccabfaf0c05cca8 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Mon, 24 Apr 2017 19:22:53 -0400 Subject: [PATCH] Fix Web IDL extended attribute usage for recent changes In https://github.com/heycam/webidl/pull/286 we updated Web IDL so that the extended attributes [Clamp], [EnforceRange], and [TreatNullAs] now apply to types, not attributes or arguments. This updates HTML's usage of those extended attributes to conform to this. --- source | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/source b/source index 991483625fd..902d75bafc7 100644 --- a/source +++ b/source @@ -9773,7 +9773,7 @@ interface HTMLElement : Element { [CEReactions] attribute boolean spellcheck; void forceSpellCheck(); - [CEReactions, TreatNullAs=EmptyString] attribute DOMString innerText; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString innerText; }; HTMLElement implements GlobalEventHandlers; HTMLElement implements DocumentAndElementEventHandlers; @@ -42872,7 +42872,7 @@ interface HTMLInputElement : HTMLElement { [CEReactions] attribute DOMString step; [CEReactions] attribute DOMString type; [CEReactions] attribute DOMString defaultValue; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString value; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString value; attribute object? valueAsDate; attribute unrestricted double valueAsNumber; [CEReactions] attribute unsigned long width; @@ -50239,7 +50239,7 @@ interface HTMLTextAreaElement : HTMLElement { readonly attribute DOMString type; [CEReactions] attribute DOMString defaultValue; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString value; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString value; readonly attribute unsigned long textLength; readonly attribute boolean willValidate; @@ -78472,7 +78472,7 @@ interface Window : Eve attribute any opener; [Replaceable] readonly attribute WindowProxy? parent; readonly attribute Element? frameElement; - WindowProxy? open(optional USVString url = "about:blank", optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = ""); + WindowProxy? open(optional USVString url = "about:blank", optional DOMString target = "_blank", optional [TreatNullAs=EmptyString] DOMString features = ""); getter object (DOMString name); // Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic // object on the prototype chain. Indeed, this does not make the global object an exotic object. @@ -94607,7 +94607,7 @@ interface WebSocket : EventTarget { attribute EventHandler onclose; readonly attribute DOMString extensions; readonly attribute DOMString protocol; - void close([Clamp] optional unsigned short code, optional USVString reason); + void close(optional [Clamp] unsigned short code, optional USVString reason); // messaging attribute EventHandler onmessage; @@ -113382,8 +113382,8 @@ interface HTMLFrameElement : HTMLElement { readonly attribute Document? contentDocument; readonly attribute WindowProxy? contentWindow; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString marginHeight; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString marginWidth; };

The name, scrolling, and src IDL attributes of the frame element must @@ -113472,11 +113472,11 @@ interface HTMLFrameElement : HTMLElement {


partial interface HTMLBodyElement {
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString text;
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString link;
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString vLink;
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString aLink;
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString text;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString link;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString vLink;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString aLink;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
   [CEReactions] attribute DOMString background;
 };
@@ -113599,7 +113599,7 @@ interface HTMLDirectoryElement : HTMLElement {
[HTMLConstructor]
 interface HTMLFontElement : HTMLElement {
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString color;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString color;
   [CEReactions] attribute DOMString face;
   [CEReactions] attribute DOMString size; 
 };
@@ -113660,8 +113660,8 @@ interface HTMLFontElement : HTMLElement { [CEReactions] attribute DOMString frameBorder; [CEReactions] attribute USVString longDesc; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginHeight; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString marginWidth; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString marginHeight; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString marginWidth; };

The align and scrolling IDL attributes of the @@ -113695,7 +113695,7 @@ interface HTMLFontElement : HTMLElement { [CEReactions] attribute unsigned long vspace; [CEReactions] attribute USVString longDesc; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString border; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString border; };

The name, align, border, hspace, and vspace IDL attributes of the img element @@ -113822,7 +113822,7 @@ interface HTMLFontElement : HTMLElement { [CEReactions] attribute DOMString codeBase; [CEReactions] attribute DOMString codeType; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString border; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString border; };

The align, archive, border, code, declare, hspace, standby, and vspace IDL attributes of the object @@ -113909,9 +113909,9 @@ interface HTMLFontElement : HTMLElement { [CEReactions] attribute DOMString summary; [CEReactions] attribute DOMString width; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString cellPadding; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString cellSpacing; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString cellPadding; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString cellSpacing; };

The align, border, frame, summary, rules, and width, IDL attributes of the table element @@ -113967,7 +113967,7 @@ interface HTMLFontElement : HTMLElement { [CEReactions] attribute boolean noWrap; [CEReactions] attribute DOMString vAlign; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor; };

The align, axis, height, and width IDL attributes of the td and @@ -114002,7 +114002,7 @@ interface HTMLFontElement : HTMLElement { [CEReactions] attribute DOMString chOff; [CEReactions] attribute DOMString vAlign; - [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor; + [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor; };

The align IDL attribute of the tr @@ -114043,11 +114043,11 @@ interface HTMLFontElement : HTMLElement {


partial interface Document {
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString fgColor;
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString linkColor;
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString vlinkColor;
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString alinkColor;
-  [CEReactions, TreatNullAs=EmptyString] attribute DOMString bgColor;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString fgColor;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString linkColor;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString vlinkColor;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString alinkColor;
+  [CEReactions] attribute [TreatNullAs=EmptyString] DOMString bgColor;
 
   [SameObject] readonly attribute HTMLCollection anchors;
   [SameObject] readonly attribute HTMLCollection applets;