Rename [ConvertNullToNullString] to [TreatNullAs=EmptyString]
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2012 07:07:50 +0000 (07:07 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Feb 2012 07:07:50 +0000 (07:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77602

Reviewed by Adam Barth.

This patch renames [ConvertNullToNullString] to [TreatNullAs=EmptyString],
according to the spec (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs).

No tests. No changes in behavior.

* bindings/scripts/CodeGeneratorJS.pm:
(JSValueToNative):
* bindings/scripts/CodeGeneratorV8.pm:
(GetNativeTypeFromSignature):

* css/CSSCharsetRule.idl:
* css/CSSPageRule.idl:
* css/CSSRule.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleRule.idl:
* css/CSSValue.idl:
* css/MediaList.idl:
* css/WebKitCSSKeyframesRule.idl:
* dom/Attr.idl:
* dom/CharacterData.idl:
* dom/DOMImplementation.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/ProcessingInstruction.idl:
* dom/ShadowRoot.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLScriptElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLTitleElement.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* page/DOMWindow.idl:
* storage/StorageEvent.idl:
* svg/SVGAngle.idl:
* svg/SVGElement.idl:
* svg/SVGLength.idl:
* svg/SVGScriptElement.idl:

* bindings/scripts/test/TestObj.idl: No change in the run-bindings-tests results.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106534 268f45cc-cd09-0410-ab3c-d52691b4dbfc

41 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/css/CSSCharsetRule.idl
Source/WebCore/css/CSSPageRule.idl
Source/WebCore/css/CSSRule.idl
Source/WebCore/css/CSSStyleDeclaration.idl
Source/WebCore/css/CSSStyleRule.idl
Source/WebCore/css/CSSValue.idl
Source/WebCore/css/MediaList.idl
Source/WebCore/css/WebKitCSSKeyframesRule.idl
Source/WebCore/dom/Attr.idl
Source/WebCore/dom/CharacterData.idl
Source/WebCore/dom/DOMImplementation.idl
Source/WebCore/dom/Document.idl
Source/WebCore/dom/Element.idl
Source/WebCore/dom/NamedNodeMap.idl
Source/WebCore/dom/Node.idl
Source/WebCore/dom/ProcessingInstruction.idl
Source/WebCore/dom/ShadowRoot.idl
Source/WebCore/html/HTMLAnchorElement.idl
Source/WebCore/html/HTMLButtonElement.idl
Source/WebCore/html/HTMLDocument.idl
Source/WebCore/html/HTMLElement.idl
Source/WebCore/html/HTMLFormElement.idl
Source/WebCore/html/HTMLFrameElement.idl
Source/WebCore/html/HTMLInputElement.idl
Source/WebCore/html/HTMLMediaElement.idl
Source/WebCore/html/HTMLOutputElement.idl
Source/WebCore/html/HTMLScriptElement.idl
Source/WebCore/html/HTMLSelectElement.idl
Source/WebCore/html/HTMLTextAreaElement.idl
Source/WebCore/html/HTMLTitleElement.idl
Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
Source/WebCore/page/DOMWindow.idl
Source/WebCore/storage/StorageEvent.idl
Source/WebCore/svg/SVGAngle.idl
Source/WebCore/svg/SVGElement.idl
Source/WebCore/svg/SVGLength.idl
Source/WebCore/svg/SVGScriptElement.idl

index d070c12..cda064b 100644 (file)
@@ -1,5 +1,62 @@
 2012-02-01  Kentaro Hara  <haraken@chromium.org>
 
+        Rename [ConvertNullToNullString] to [TreatNullAs=EmptyString]
+        https://bugs.webkit.org/show_bug.cgi?id=77602
+
+        Reviewed by Adam Barth.
+
+        This patch renames [ConvertNullToNullString] to [TreatNullAs=EmptyString],
+        according to the spec (http://dev.w3.org/2006/webapi/WebIDL/#TreatNullAs).
+
+        No tests. No changes in behavior.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (JSValueToNative):
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GetNativeTypeFromSignature):
+
+        * css/CSSCharsetRule.idl:
+        * css/CSSPageRule.idl:
+        * css/CSSRule.idl:
+        * css/CSSStyleDeclaration.idl:
+        * css/CSSStyleRule.idl:
+        * css/CSSValue.idl:
+        * css/MediaList.idl:
+        * css/WebKitCSSKeyframesRule.idl:
+        * dom/Attr.idl:
+        * dom/CharacterData.idl:
+        * dom/DOMImplementation.idl:
+        * dom/Document.idl:
+        * dom/Element.idl:
+        * dom/NamedNodeMap.idl:
+        * dom/Node.idl:
+        * dom/ProcessingInstruction.idl:
+        * dom/ShadowRoot.idl:
+        * html/HTMLAnchorElement.idl:
+        * html/HTMLButtonElement.idl:
+        * html/HTMLDocument.idl:
+        * html/HTMLElement.idl:
+        * html/HTMLFormElement.idl:
+        * html/HTMLFrameElement.idl:
+        * html/HTMLInputElement.idl:
+        * html/HTMLMediaElement.idl:
+        * html/HTMLOutputElement.idl:
+        * html/HTMLScriptElement.idl:
+        * html/HTMLSelectElement.idl:
+        * html/HTMLTextAreaElement.idl:
+        * html/HTMLTitleElement.idl:
+        * html/canvas/CanvasRenderingContext2D.idl:
+        * page/DOMWindow.idl:
+        * storage/StorageEvent.idl:
+        * svg/SVGAngle.idl:
+        * svg/SVGElement.idl:
+        * svg/SVGLength.idl:
+        * svg/SVGScriptElement.idl:
+
+        * bindings/scripts/test/TestObj.idl: No change in the run-bindings-tests results.
+
+2012-02-01  Kentaro Hara  <haraken@chromium.org>
+
         Remove [GenerateConstructor] from IDL files
         https://bugs.webkit.org/show_bug.cgi?id=77598
 
index 5202f56..f048ed1 100644 (file)
@@ -2869,7 +2869,7 @@ sub JSValueToNative
     return "static_cast<Range::CompareHow>($value.toInt32(exec))" if $type eq "CompareHow";
 
     if ($type eq "DOMString") {
-        return "valueToStringWithNullCheck(exec, $value)" if $signature->extendedAttributes->{"ConvertNullToNullString"} || $signature->extendedAttributes->{"Reflect"};
+        return "valueToStringWithNullCheck(exec, $value)" if ($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "EmptyString") or $signature->extendedAttributes->{"Reflect"};
         return "valueToStringWithUndefinedOrNullCheck(exec, $value)" if $signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"};
         return "ustringToString($value.isEmpty() ? UString() : $value.toString(exec)->value(exec))";
     }
index 08d455f..57311b3 100644 (file)
@@ -3336,7 +3336,7 @@ sub GetNativeTypeFromSignature
         my $mode = "";
         if ($signature->extendedAttributes->{"ConvertUndefinedOrNullToNullString"}) {
             $mode = "WithUndefinedOrNullCheck";
-        } elsif ($signature->extendedAttributes->{"ConvertNullToNullString"} || $signature->extendedAttributes->{"Reflect"}) {
+        } elsif (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "EmptyString") or $signature->extendedAttributes->{"Reflect"}) {
             $mode = "WithNullCheck";
         }
         $type .= "<$mode>";
index f9e3c2a..51c503e 100644 (file)
@@ -191,7 +191,7 @@ module test {
         void convert1(in [ConvertNullStringTo=Null] a);
         void convert2(in [ConvertNullStringTo=Undefined] b);
         void convert3(in [ConvertNullStringTo=False] c);
-        void convert4(in [ConvertNullToNullString] d);
+        void convert4(in [TreatNullAs=EmptyString] d);
         void convert5(in [ConvertUndefinedOrNullToNullString] e);
 
         attribute SVGPoint mutablePoint;
index 2b158ff..87f796a 100644 (file)
@@ -25,7 +25,7 @@ module css {
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
         readonly attribute [ConvertNullStringTo=Null] DOMString encoding;
 #else
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString encoding
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString encoding
                      setter raises(DOMException);
 #endif
     };
index 989fd8d..a71c24b 100644 (file)
@@ -23,7 +23,7 @@ module css {
     // Introduced in DOM Level 2:
     interface CSSPageRule : CSSRule {
 
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString selectorText;
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString selectorText;
 
         readonly attribute CSSStyleDeclaration style;
 
index 0fda9ef..69d7a8b 100644 (file)
@@ -43,7 +43,7 @@ module css {
 
         readonly attribute unsigned short   type;
 
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString        cssText
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString        cssText
                      setter raises (DOMException);
 
         readonly attribute CSSStyleSheet    parentStyleSheet;
index d1b470f..9761304 100644 (file)
@@ -30,7 +30,7 @@ module css {
         CustomGetPropertyNames,
         V8DependentLifetime
     ] CSSStyleDeclaration {
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString        cssText
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString        cssText
                      setter raises(DOMException);
 
         [ConvertNullStringTo=Null] DOMString          getPropertyValue(in [Optional=CallWithDefaultValue] DOMString propertyName);
@@ -39,7 +39,7 @@ module css {
             raises(DOMException);
         [ConvertNullStringTo=Null] DOMString          getPropertyPriority(in [Optional=CallWithDefaultValue] DOMString propertyName);
         [OldStyleObjC] void setProperty(in [Optional=CallWithDefaultValue] DOMString propertyName, 
-                                        in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString value, 
+                                        in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString value, 
                                         in [Optional=CallWithDefaultValue] DOMString priority)
             raises(DOMException);
 
index 4abfbfc..aca408e 100644 (file)
@@ -23,7 +23,7 @@ module css {
     // Introduced in DOM Level 2:
     interface CSSStyleRule : CSSRule {
 
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString selectorText;
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString selectorText;
 
         readonly attribute CSSStyleDeclaration style;
 
index 25eb803..0edc3d7 100644 (file)
@@ -34,7 +34,7 @@ module css {
         const unsigned short CSS_VALUE_LIST      = 2;
         const unsigned short CSS_CUSTOM          = 3;
 
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString cssText
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString cssText
                      setter raises(DOMException);
 
         readonly attribute unsigned short cssValueType;
index 2b441f0..73b336c 100644 (file)
@@ -31,7 +31,7 @@ module stylesheets {
         HasIndexGetter
     ] MediaList {
 
-                 attribute [ConvertNullToNullString, ConvertNullStringTo=Null] DOMString mediaText
+                 attribute [TreatNullAs=EmptyString, ConvertNullStringTo=Null] DOMString mediaText
                      setter raises(DOMException);
         readonly attribute unsigned long length;
 
index 3b08130..87c8dd6 100644 (file)
@@ -33,7 +33,7 @@ module css {
         HasIndexGetter
     ] WebKitCSSKeyframesRule : CSSRule {
 
-        attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString name;
+        attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString name;
         readonly attribute CSSRuleList cssRules;
         
         void insertRule(in [Optional=CallWithDefaultValue] DOMString rule);
index bff9c7b..992a03b 100644 (file)
@@ -31,7 +31,7 @@ module core {
 
         readonly attribute boolean specified;
 
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString value 
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString value 
                      setter raises(DOMException);
 
         // DOM Level 2
index ca44741..aeeae2f 100644 (file)
@@ -21,7 +21,7 @@ module core {
 
     interface CharacterData : Node {
 
-        attribute [ConvertNullToNullString] DOMString data
+        attribute [TreatNullAs=EmptyString] DOMString data
             setter raises(DOMException);
 
         readonly attribute unsigned long length;
index d963294..57577ec 100644 (file)
@@ -28,7 +28,7 @@ module core {
         // DOM Level 1
 
         [OldStyleObjC] boolean hasFeature(in [Optional=CallWithDefaultValue] DOMString feature, 
-                                          in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString version);
+                                          in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString version);
 
         // DOM Level 2
 
@@ -36,9 +36,9 @@ module core {
                                                        in [ConvertUndefinedOrNullToNullString,Optional=CallWithDefaultValue] DOMString publicId,
                                                        in [ConvertUndefinedOrNullToNullString,Optional=CallWithDefaultValue] DOMString systemId)
             raises(DOMException);
-        [OldStyleObjC] Document createDocument(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI, 
-                                               in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString qualifiedName, 
-                                               in [ConvertNullToNullString,Optional=CallWithDefaultValue] DocumentType doctype)
+        [OldStyleObjC] Document createDocument(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI, 
+                                               in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString qualifiedName, 
+                                               in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DocumentType doctype)
             raises(DOMException);
 
         // DOMImplementationCSS interface from DOM Level 2 CSS
index b209cbc..c04f850 100644 (file)
@@ -31,7 +31,7 @@ module core {
         readonly attribute DOMImplementation implementation;
         readonly attribute Element documentElement;
 
-        [ReturnsNew] Element createElement(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString tagName)
+        [ReturnsNew] Element createElement(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString tagName)
             raises (DOMException);
         DocumentFragment   createDocumentFragment();
         [ReturnsNew] Text createTextNode(in [Optional=CallWithDefaultValue] DOMString data);
@@ -52,13 +52,13 @@ module core {
         [OldStyleObjC, ReturnsNew] Node importNode(in [Optional=CallWithDefaultValue] Node importedNode,
                                                    in [Optional] boolean deep)
             raises (DOMException);
-        [OldStyleObjC, ReturnsNew] Element createElementNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
-                                                           in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString qualifiedName)
+        [OldStyleObjC, ReturnsNew] Element createElementNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+                                                           in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString qualifiedName)
             raises (DOMException);
-        [OldStyleObjC, ReturnsNew] Attr createAttributeNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
-                                                          in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString qualifiedName)
+        [OldStyleObjC, ReturnsNew] Attr createAttributeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+                                                          in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString qualifiedName)
             raises (DOMException);
-        [OldStyleObjC] NodeList getElementsByTagNameNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+        [OldStyleObjC] NodeList getElementsByTagNameNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
                                                        in [Optional=CallWithDefaultValue] DOMString localName);
         Element            getElementById(in [Optional=CallWithDefaultValue] DOMString elementId);
 
@@ -67,7 +67,7 @@ module core {
         readonly attribute [ConvertNullStringTo=Null] DOMString inputEncoding;
 
         readonly attribute [ConvertNullStringTo=Null] DOMString xmlEncoding;
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString xmlVersion
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString xmlVersion
                     setter raises (DOMException);
                  attribute boolean xmlStandalone
                     setter raises (DOMException);
@@ -75,7 +75,7 @@ module core {
         Node               adoptNode(in [Optional=CallWithDefaultValue] Node source)
             raises (DOMException);
 
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString documentURI;
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString documentURI;
 
         // DOM Level 2 Events (DocumentEvents interface)
 
@@ -145,17 +145,17 @@ module core {
 
         // Moved down from HTMLDocument
 
-                 attribute [ConvertNullToNullString] DOMString title;
+                 attribute [TreatNullAs=EmptyString] DOMString title;
         readonly attribute DOMString referrer;
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
-                 attribute [ConvertNullToNullString] DOMString domain
+                 attribute [TreatNullAs=EmptyString] DOMString domain
                      setter raises (DOMException);
 #else
         readonly attribute DOMString domain;
 #endif
         readonly attribute DOMString URL;
 
-                 attribute [ConvertNullToNullString] DOMString cookie
+                 attribute [TreatNullAs=EmptyString] DOMString cookie
                      setter raises (DOMException),
                      getter raises (DOMException);
 
@@ -184,7 +184,7 @@ module core {
 
         // IE extensions
 
-                 attribute [ConvertNullStringTo=Undefined, ConvertNullToNullString] DOMString charset;
+                 attribute [ConvertNullStringTo=Undefined, TreatNullAs=EmptyString] DOMString charset;
         readonly attribute [ConvertNullStringTo=Undefined] DOMString defaultCharset;
         readonly attribute [ConvertNullStringTo=Undefined] DOMString readyState;
 
@@ -202,7 +202,7 @@ module core {
         // WebKit extensions
 
         readonly attribute [ConvertNullStringTo=Null] DOMString preferredStylesheetSet;
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString selectedStylesheetSet;
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString selectedStylesheetSet;
 
 #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
         CSSStyleDeclaration createCSSStyleDeclaration();
index a0f4188..eae90b2 100644 (file)
@@ -43,22 +43,22 @@ module core {
 
         // DOM Level 2 Core
 
-        [OldStyleObjC] DOMString getAttributeNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+        [OldStyleObjC] DOMString getAttributeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
                                                 in [Optional=CallWithDefaultValue] DOMString localName);
-        [OldStyleObjC] void setAttributeNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+        [OldStyleObjC] void setAttributeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
                                            in [Optional=CallWithDefaultValue] DOMString qualifiedName, 
                                            in [Optional=CallWithDefaultValue] DOMString value)
             raises(DOMException);
-        [OldStyleObjC] void removeAttributeNS(in [ConvertNullToNullString] DOMString namespaceURI,
+        [OldStyleObjC] void removeAttributeNS(in [TreatNullAs=EmptyString] DOMString namespaceURI,
                                               in DOMString localName);
-        [OldStyleObjC] NodeList getElementsByTagNameNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+        [OldStyleObjC] NodeList getElementsByTagNameNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
                                                        in [Optional=CallWithDefaultValue] DOMString localName);
-        [OldStyleObjC] Attr getAttributeNodeNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+        [OldStyleObjC] Attr getAttributeNodeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
                                                in [Optional=CallWithDefaultValue] DOMString localName);
         Attr setAttributeNodeNS(in [Optional=CallWithDefaultValue] Attr newAttr)
             raises(DOMException);
         boolean hasAttribute(in DOMString name);
-        [OldStyleObjC] boolean hasAttributeNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+        [OldStyleObjC] boolean hasAttributeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
                                               in [Optional=CallWithDefaultValue] DOMString localName);
 
         readonly attribute CSSStyleDeclaration style;
index 1bf4521..016cac7 100644 (file)
@@ -42,7 +42,7 @@ module core {
 
         // Introduced in DOM Level 2:
 
-        [OldStyleObjC] Node getNamedItemNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI, 
+        [OldStyleObjC] Node getNamedItemNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI, 
                                            in [Optional=CallWithDefaultValue] DOMString localName)
             // FIXME: the implementation does take an exceptioncode parameter.
             /*raises(DOMException)*/;
@@ -50,7 +50,7 @@ module core {
         Node setNamedItemNS(in [Optional=CallWithDefaultValue] Node node)
             raises(DOMException);
 
-        [OldStyleObjC] Node removeNamedItemNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI, 
+        [OldStyleObjC] Node removeNamedItemNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI, 
                                               in [Optional=CallWithDefaultValue] DOMString localName)
             raises(DOMException);
 
index 8bb3349..6f3987d 100644 (file)
@@ -54,7 +54,7 @@ module core {
         readonly attribute [ConvertNullStringTo=Null] DOMString        nodeName;
 
                  // FIXME: the spec says this can also raise on retrieval.
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString        nodeValue
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString        nodeValue
                      setter raises(DOMException);
 
         readonly attribute unsigned short   nodeType;
@@ -85,10 +85,10 @@ module core {
         // Introduced in DOM Level 2:
 
         [OldStyleObjC] boolean isSupported(in [Optional=CallWithDefaultValue] DOMString feature, 
-                                           in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString version);
+                                           in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString version);
 
         readonly attribute [ConvertNullStringTo=Null] DOMString        namespaceURI;
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString        prefix
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString        prefix
                      setter raises(DOMException);
         readonly attribute [ConvertNullStringTo=Null] DOMString        localName;
 
@@ -99,14 +99,14 @@ module core {
         readonly attribute [ConvertNullStringTo=Null] DOMString       baseURI;
 
                  // FIXME: the spec says this can also raise on retrieval.
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString       textContent
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString       textContent
                      setter raises(DOMException);
 
         boolean            isSameNode(in [Optional=CallWithDefaultValue] Node other);
         boolean            isEqualNode(in [Optional=CallWithDefaultValue] Node other);
-        [ConvertNullStringTo=Null] DOMString          lookupPrefix(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI);
-        boolean            isDefaultNamespace(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI);
-        [ConvertNullStringTo=Null] DOMString          lookupNamespaceURI(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString prefix);
+        [ConvertNullStringTo=Null] DOMString          lookupPrefix(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI);
+        boolean            isDefaultNamespace(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI);
+        [ConvertNullStringTo=Null] DOMString          lookupNamespaceURI(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString prefix);
 
         // DocumentPosition
         const unsigned short      DOCUMENT_POSITION_DISCONNECTED = 0x01;
index efcc9c1..6f9f68d 100644 (file)
@@ -25,7 +25,7 @@ module core {
         // DOM Level 1
 
         readonly attribute [ConvertNullStringTo=Null] DOMString target;
-                 attribute [ConvertNullStringTo=Null, ConvertNullToNullString] DOMString data
+                 attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString data
                      setter raises(DOMException);
 
         // interface LinkStyle from DOM Level 2 Style Sheets
index 11ae63f..ee6cc36 100644 (file)
@@ -36,7 +36,7 @@ module core {
         Element getElementById(in [Optional=CallWithDefaultValue] DOMString elementId);
         NodeList getElementsByClassName(in [Optional=CallWithDefaultValue] DOMString className);
         NodeList getElementsByTagName(in [Optional=CallWithDefaultValue] DOMString tagName);
-        NodeList getElementsByTagNameNS(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
+        NodeList getElementsByTagNameNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
                                         in [Optional=CallWithDefaultValue] DOMString localName);
     };
 
index 5669a28..898f9ea 100644 (file)
@@ -43,15 +43,15 @@ module html {
         readonly attribute DOMString protocol;
         readonly attribute DOMString search;
 #else
-        attribute [ConvertNullToNullString] DOMString hash;
-        attribute [ConvertNullToNullString] DOMString host;
-        attribute [ConvertNullToNullString] DOMString hostname;
-        attribute [ConvertNullToNullString] DOMString pathname;
-        attribute [ConvertNullToNullString] DOMString port;
-        attribute [ConvertNullToNullString] DOMString protocol;
-        attribute [ConvertNullToNullString] DOMString search;
+        attribute [TreatNullAs=EmptyString] DOMString hash;
+        attribute [TreatNullAs=EmptyString] DOMString host;
+        attribute [TreatNullAs=EmptyString] DOMString hostname;
+        attribute [TreatNullAs=EmptyString] DOMString pathname;
+        attribute [TreatNullAs=EmptyString] DOMString port;
+        attribute [TreatNullAs=EmptyString] DOMString protocol;
+        attribute [TreatNullAs=EmptyString] DOMString search;
 
-        readonly attribute [ConvertNullToNullString] DOMString origin;
+        readonly attribute [TreatNullAs=EmptyString] DOMString origin;
 #endif
 
         readonly attribute DOMString text;
index ff7dab7..c91947b 100644 (file)
@@ -24,8 +24,8 @@ module html {
         readonly attribute HTMLFormElement form;
 
         attribute [Reflect, URL] DOMString formAction;
-        attribute [ConvertNullToNullString] DOMString formEnctype;
-        attribute [ConvertNullToNullString] DOMString formMethod;
+        attribute [TreatNullAs=EmptyString] DOMString formEnctype;
+        attribute [TreatNullAs=EmptyString] DOMString formMethod;
         attribute [Reflect] boolean formNoValidate;
         attribute [Reflect] DOMString formTarget;
         readonly attribute ValidityState validity;
index d2400a8..a7a6bcd 100644 (file)
@@ -48,19 +48,19 @@ module html {
         readonly attribute long width;
         readonly attribute long height;
 #endif
-                 attribute [ConvertNullToNullString] DOMString dir;
-                 attribute [ConvertNullToNullString] DOMString designMode;
+                 attribute [TreatNullAs=EmptyString] DOMString dir;
+                 attribute [TreatNullAs=EmptyString] DOMString designMode;
         readonly attribute DOMString compatMode;
 
         readonly attribute Element activeElement;
         boolean hasFocus();
 
         // Deprecated attributes
-                 attribute [ConvertNullToNullString] DOMString bgColor;
-                 attribute [ConvertNullToNullString] DOMString fgColor;
-                 attribute [ConvertNullToNullString] DOMString alinkColor;
-                 attribute [ConvertNullToNullString] DOMString linkColor;
-                 attribute [ConvertNullToNullString] DOMString vlinkColor;
+                 attribute [TreatNullAs=EmptyString] DOMString bgColor;
+                 attribute [TreatNullAs=EmptyString] DOMString fgColor;
+                 attribute [TreatNullAs=EmptyString] DOMString alinkColor;
+                 attribute [TreatNullAs=EmptyString] DOMString linkColor;
+                 attribute [TreatNullAs=EmptyString] DOMString vlinkColor;
     };
 
 }
index 7257755..068cb8d 100644 (file)
@@ -40,13 +40,13 @@ module html {
                  attribute [Reflect] DOMString accessKey;
 
         // Extensions
-                 attribute [ConvertNullToNullString] DOMString innerHTML
+                 attribute [TreatNullAs=EmptyString] DOMString innerHTML
                      setter raises(DOMException);
-                 attribute [ConvertNullToNullString] DOMString innerText
+                 attribute [TreatNullAs=EmptyString] DOMString innerText
                      setter raises(DOMException);
-                 attribute [ConvertNullToNullString] DOMString outerHTML
+                 attribute [TreatNullAs=EmptyString] DOMString outerHTML
                      setter raises(DOMException);
-                 attribute [ConvertNullToNullString] DOMString outerText
+                 attribute [TreatNullAs=EmptyString] DOMString outerText
                      setter raises(DOMException);
 
         Element insertAdjacentElement(in [Optional=CallWithDefaultValue] DOMString where,
@@ -61,7 +61,7 @@ module html {
 
         readonly attribute HTMLCollection children;
 
-                 attribute [ConvertNullToNullString] DOMString contentEditable
+                 attribute [TreatNullAs=EmptyString] DOMString contentEditable
                      setter raises(DOMException);
         readonly attribute boolean isContentEditable;
 
index c6967ea..d1884ef 100644 (file)
@@ -31,9 +31,9 @@ module html {
         attribute [Reflect] boolean noValidate;
         attribute [Reflect=accept_charset] DOMString acceptCharset;
         attribute [Reflect, URL] DOMString action;
-        attribute [ConvertNullToNullString] DOMString encoding;
-        attribute [ConvertNullToNullString] DOMString enctype;
-        attribute [ConvertNullToNullString] DOMString method;
+        attribute [TreatNullAs=EmptyString] DOMString encoding;
+        attribute [TreatNullAs=EmptyString] DOMString enctype;
+        attribute [TreatNullAs=EmptyString] DOMString method;
         attribute [Reflect] DOMString target;
         attribute [Reflect] DOMString autocomplete;
         
index dfe4ef8..0650c19 100644 (file)
@@ -44,7 +44,7 @@ module html {
 #endif
 #endif
 
-        attribute [ConvertNullToNullString, CustomSetter] DOMString location;
+        attribute [TreatNullAs=EmptyString, CustomSetter] DOMString location;
 
         readonly attribute long width;
         readonly attribute long height;
index 7463334..bedeb9a 100644 (file)
 module html {
 
     interface HTMLInputElement : HTMLElement {
-        attribute [ConvertNullToNullString] DOMString defaultValue;
+        attribute [TreatNullAs=EmptyString] DOMString defaultValue;
         attribute [Reflect=checked] boolean defaultChecked;
         attribute [Reflect] DOMString dirName;
         readonly attribute HTMLFormElement form;
         attribute [Reflect, URL] DOMString formAction;
-        attribute [ConvertNullToNullString] DOMString formEnctype;
-        attribute [ConvertNullToNullString] DOMString formMethod;
+        attribute [TreatNullAs=EmptyString] DOMString formEnctype;
+        attribute [TreatNullAs=EmptyString] DOMString formMethod;
         attribute [Reflect] boolean formNoValidate;
         attribute [Reflect] DOMString formTarget;
         readonly attribute ValidityState validity;
@@ -57,9 +57,9 @@ module html {
 #endif
         attribute [Reflect, URL] DOMString src;
         attribute [Reflect] DOMString step;
-        attribute [ConvertNullToNullString] DOMString type; // readonly dropped as part of DOM level 2
+        attribute [TreatNullAs=EmptyString] DOMString type; // readonly dropped as part of DOM level 2
         attribute [Reflect] DOMString useMap;
-        attribute [ConvertNullToNullString] DOMString value;
+        attribute [TreatNullAs=EmptyString] DOMString value;
 #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP
         attribute Date valueAsDate setter raises(DOMException);
 #endif
@@ -78,7 +78,7 @@ module html {
         void click();
 
 #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
-        void setValueForUser(in [ConvertNullToNullString] DOMString value);
+        void setValueForUser(in [TreatNullAs=EmptyString] DOMString value);
 #endif
 
         // WinIE extension:
index ba03337..484d574 100644 (file)
@@ -117,7 +117,7 @@ module html {
     readonly attribute [EnabledAtRuntime=webkitVideoTrack] TextTrackList textTracks;
 #endif
 
-    attribute [Reflect, ConvertNullToNullString, ConvertNullStringToNull] DOMString mediaGroup;
+    attribute [Reflect, TreatNullAs=EmptyString, ConvertNullStringToNull] DOMString mediaGroup;
     attribute [CustomSetter] MediaController controller;
 };
 }
index 4e6cbfb..378ae53 100644 (file)
@@ -29,8 +29,8 @@ module html {
         attribute [Reflect] DOMString name;
 
         readonly attribute DOMString type;
-        attribute [ConvertNullToNullString] DOMString defaultValue;
-        attribute [ConvertNullToNullString] DOMString value;
+        attribute [TreatNullAs=EmptyString] DOMString defaultValue;
+        attribute [TreatNullAs=EmptyString] DOMString value;
 
         readonly attribute boolean willValidate;
         readonly attribute ValidityState validity;
index fa799cb..03b5ac8 100644 (file)
@@ -20,7 +20,7 @@
 module html {
 
     interface HTMLScriptElement : HTMLElement {
-        attribute [ConvertNullToNullString] DOMString text;
+        attribute [TreatNullAs=EmptyString] DOMString text;
         attribute [Reflect=for] DOMString htmlFor;
         attribute [Reflect] DOMString event;
         attribute [Reflect] DOMString charset;
index 45a3456..9749780 100644 (file)
@@ -26,7 +26,7 @@ module html {
     ] HTMLSelectElement : HTMLElement {
         readonly attribute DOMString type;
         attribute long selectedIndex;
-        attribute [ConvertNullToNullString] DOMString value;
+        attribute [TreatNullAs=EmptyString] DOMString value;
         
         // Modified in DOM Level 2:
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
@@ -48,7 +48,7 @@ module html {
         attribute [Reflect] boolean disabled;
         attribute [Reflect] boolean autofocus;
         attribute boolean multiple;
-        attribute [ConvertNullToNullString] DOMString name;
+        attribute [TreatNullAs=EmptyString] DOMString name;
         attribute [Reflect] boolean required;
         attribute long size;
         
index 62f3e6b..b341423 100644 (file)
@@ -22,7 +22,7 @@
 module html {
 
     interface HTMLTextAreaElement : HTMLElement {
-        attribute [ConvertNullToNullString] DOMString defaultValue;
+        attribute [TreatNullAs=EmptyString] DOMString defaultValue;
         readonly attribute HTMLFormElement form;
         readonly attribute ValidityState validity;
         attribute long cols;
@@ -30,14 +30,14 @@ module html {
         attribute [Reflect] boolean disabled;
         attribute [Reflect] boolean autofocus;
         attribute long maxLength setter raises(DOMException);
-        attribute [ConvertNullToNullString] DOMString name;
+        attribute [TreatNullAs=EmptyString] DOMString name;
         attribute [Reflect] DOMString placeholder;
         attribute [Reflect] boolean readOnly;
         attribute [Reflect] boolean required;
         attribute long rows;
         attribute [Reflect] DOMString wrap;
         readonly attribute DOMString type;
-        attribute [ConvertNullToNullString] DOMString value;
+        attribute [TreatNullAs=EmptyString] DOMString value;
         readonly attribute unsigned long textLength;
 
         void select();
index de857e8..3692c39 100644 (file)
@@ -20,7 +20,7 @@
 module html {
 
     interface HTMLTitleElement : HTMLElement {
-        attribute  [ConvertNullToNullString] DOMString            text;
+        attribute  [TreatNullAs=EmptyString] DOMString            text;
     };
 
 }
index d5845b8..d7efe13 100644 (file)
@@ -49,7 +49,7 @@ module html {
                           in [Optional=CallWithDefaultValue] float dy);
 
         attribute float globalAlpha;
-        attribute [ConvertNullToNullString] DOMString globalCompositeOperation;
+        attribute [TreatNullAs=EmptyString] DOMString globalCompositeOperation;
 
         CanvasGradient createLinearGradient(in [Optional=CallWithDefaultValue] float x0,
                                             in [Optional=CallWithDefaultValue] float y0,
@@ -65,14 +65,14 @@ module html {
             raises (DOMException);
 
         attribute float lineWidth;
-        attribute [ConvertNullToNullString] DOMString lineCap;
-        attribute [ConvertNullToNullString] DOMString lineJoin;
+        attribute [TreatNullAs=EmptyString] DOMString lineCap;
+        attribute [TreatNullAs=EmptyString] DOMString lineJoin;
         attribute float miterLimit;
 
         attribute float shadowOffsetX;
         attribute float shadowOffsetY;
         attribute float shadowBlur;
-        attribute [ConvertNullToNullString] DOMString shadowColor;
+        attribute [TreatNullAs=EmptyString] DOMString shadowColor;
 
         // FIXME: These attributes should also be implemented for V8.
 #if !(defined(V8_BINDING) && V8_BINDING)
@@ -204,9 +204,9 @@ module html {
         void putImageData(in ImageData imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight)
             raises(DOMException);
 
-        CanvasPattern createPattern(in HTMLCanvasElement canvas, in [ConvertNullToNullString] DOMString repetitionType)
+        CanvasPattern createPattern(in HTMLCanvasElement canvas, in [TreatNullAs=EmptyString] DOMString repetitionType)
             raises (DOMException);
-        CanvasPattern createPattern(in HTMLImageElement image, in [ConvertNullToNullString] DOMString repetitionType)
+        CanvasPattern createPattern(in HTMLImageElement image, in [TreatNullAs=EmptyString] DOMString repetitionType)
             raises (DOMException);
         ImageData createImageData(in ImageData imagedata)
             raises (DOMException);
index 6992986..c5e45d4 100644 (file)
@@ -228,9 +228,9 @@ module window {
 #endif
 
         // Base64
-        DOMString atob(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString string)
+        DOMString atob(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString string)
             raises(DOMException);
-        DOMString btoa(in [ConvertNullToNullString,Optional=CallWithDefaultValue] DOMString string)
+        DOMString btoa(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString string)
             raises(DOMException);
 
         // Events
index 48c301e..ff548fe 100644 (file)
@@ -38,8 +38,8 @@ module storage {
                               in [Optional=CallWithDefaultValue] boolean canBubbleArg, 
                               in [Optional=CallWithDefaultValue] boolean cancelableArg, 
                               in [Optional=CallWithDefaultValue] DOMString keyArg, 
-                              in [Optional=CallWithDefaultValue,ConvertNullToNullString] DOMString oldValueArg, 
-                              in [Optional=CallWithDefaultValue,ConvertNullToNullString] DOMString newValueArg, 
+                              in [Optional=CallWithDefaultValue,TreatNullAs=EmptyString] DOMString oldValueArg, 
+                              in [Optional=CallWithDefaultValue,TreatNullAs=EmptyString] DOMString newValueArg, 
                               in [Optional=CallWithDefaultValue] DOMString urlArg, 
                               in [Optional=CallWithDefaultValue] Storage storageAreaArg);
 
index a9d0160..61ec634 100644 (file)
@@ -36,7 +36,7 @@ module svg {
         attribute [StrictTypeChecking] float value;
         attribute [StrictTypeChecking] float valueInSpecifiedUnits;
 
-        attribute [ConvertNullToNullString] DOMString valueAsString
+        attribute [TreatNullAs=EmptyString] DOMString valueAsString
             setter raises(DOMException);
 
         [StrictTypeChecking] void newValueSpecifiedUnits(in unsigned short unitType, in float valueInSpecifiedUnits)
index 1c9ee2d..21c700c 100644 (file)
@@ -27,7 +27,7 @@ module svg {
         Conditional=SVG
     ] SVGElement : Element {
         attribute [Reflect] DOMString id;
-        attribute [ConvertNullToNullString] DOMString xmlbase setter raises(DOMException);
+        attribute [TreatNullAs=EmptyString] DOMString xmlbase setter raises(DOMException);
         readonly attribute SVGSVGElement ownerSVGElement;
         readonly attribute SVGElement viewportElement;
     };
index 8e818c9..f9af7de 100644 (file)
@@ -44,7 +44,7 @@ module svg {
             getter raises(DOMException);
 
         attribute [StrictTypeChecking] float valueInSpecifiedUnits;
-        attribute [ConvertNullToNullString, StrictTypeChecking] DOMString valueAsString
+        attribute [TreatNullAs=EmptyString, StrictTypeChecking] DOMString valueAsString
             setter raises(DOMException);
 
         [StrictTypeChecking] void newValueSpecifiedUnits(in unsigned short unitType, 
index f0ef11a..b5244e6 100644 (file)
@@ -30,7 +30,7 @@ module svg {
     ] SVGScriptElement : SVGElement,
                                                    SVGURIReference,
                                                    SVGExternalResourcesRequired {
-                 attribute [ConvertNullToNullString] DOMString type
+                 attribute [TreatNullAs=EmptyString] DOMString type
                      /*setter raises(DOMException)*/;
     };