Commit e45cb179 authored by haraken@chromium.org's avatar haraken@chromium.org

Rename [TreatNullAs=EmptyString] to [TreatNullAs=NullString],

[TreatUndefinedAs=EmptyString] to [TreatUndefinedAs=NullString]
https://bugs.webkit.org/show_bug.cgi?id=77611

Reviewed by Adam Barth.

While the Web IDL spec requires [TreatNullAs=EmptyString] and [TreatUndefinedAs=EmptyString],
the current WebKit treats them as (not an empty string but) a null string.
To avoid confusion, this patch renames [TreatNullAs=EmptyString] to [TreatNullAs=NullString],
and [TreatUndefinedAs=EmptyString] to [TreatUndefinedAs=NullString].
(Eventually we should fix WebKit so that it uses an empty string and then
rename them to [TreatNullAs=EmptyString] and [TreatUndefinedAs=EmptyString].)

No tests. No change in behavior.

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

* bindings/scripts/test/TestObj.idl:
* 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:
* fileapi/Blob.idl:
* fileapi/DirectoryEntry.idl:
* fileapi/DirectoryEntrySync.idl:
* fileapi/Entry.idl:
* fileapi/EntrySync.idl:
* fileapi/WebKitBlobBuilder.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLScriptElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLTitleElement.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* page/Console.idl:
* page/DOMWindow.idl:
* storage/StorageEvent.idl:
* svg/SVGAngle.idl:
* svg/SVGElement.idl:
* svg/SVGLength.idl:
* svg/SVGScriptElement.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1996b4ba
2012-02-05 Kentaro Hara <haraken@chromium.org>
Rename [TreatNullAs=EmptyString] to [TreatNullAs=NullString],
[TreatUndefinedAs=EmptyString] to [TreatUndefinedAs=NullString]
https://bugs.webkit.org/show_bug.cgi?id=77611
Reviewed by Adam Barth.
While the Web IDL spec requires [TreatNullAs=EmptyString] and [TreatUndefinedAs=EmptyString],
the current WebKit treats them as (not an empty string but) a null string.
To avoid confusion, this patch renames [TreatNullAs=EmptyString] to [TreatNullAs=NullString],
and [TreatUndefinedAs=EmptyString] to [TreatUndefinedAs=NullString].
(Eventually we should fix WebKit so that it uses an empty string and then
rename them to [TreatNullAs=EmptyString] and [TreatUndefinedAs=EmptyString].)
No tests. No change in behavior.
* bindings/scripts/CodeGeneratorJS.pm: Added FIXME.
(JSValueToNative):
* bindings/scripts/CodeGeneratorV8.pm: Ditto.
(GetNativeTypeFromSignature):
* bindings/scripts/test/TestObj.idl:
* 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:
* fileapi/Blob.idl:
* fileapi/DirectoryEntry.idl:
* fileapi/DirectoryEntrySync.idl:
* fileapi/Entry.idl:
* fileapi/EntrySync.idl:
* fileapi/WebKitBlobBuilder.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLScriptElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLTitleElement.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* page/Console.idl:
* page/DOMWindow.idl:
* storage/StorageEvent.idl:
* svg/SVGAngle.idl:
* svg/SVGElement.idl:
* svg/SVGLength.idl:
* svg/SVGScriptElement.idl:
2012-02-05 Kentaro Hara <haraken@chromium.org>
Rename [JSCCustom*] IDL to [JSCustom*] IDL
......@@ -2868,13 +2868,15 @@ sub JSValueToNative
return "static_cast<Range::CompareHow>($value.toInt32(exec))" if $type eq "CompareHow";
if ($type eq "DOMString") {
if (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "EmptyString") and ($signature->extendedAttributes->{"TreatUndefinedAs"} and $signature->extendedAttributes->{"TreatUndefinedAs"} eq "EmptyString")) {
# FIXME: This implements [TreatNullAs=NullString] and [TreatUndefinedAs=NullString],
# but the Web IDL spec requires [TreatNullAs=EmptyString] and [TreatUndefinedAs=EmptyString].
if (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "NullString") and ($signature->extendedAttributes->{"TreatUndefinedAs"} and $signature->extendedAttributes->{"TreatUndefinedAs"} eq "NullString")) {
return "valueToStringWithUndefinedOrNullCheck(exec, $value)"
}
if (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "EmptyString") or $signature->extendedAttributes->{"Reflect"}) {
if (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "NullString") or $signature->extendedAttributes->{"Reflect"}) {
return "valueToStringWithNullCheck(exec, $value)"
}
# FIXME: Add the case for 'if ($signature->extendedAttributes->{"TreatUndefinedAs"} and $signature->extendedAttributes->{"TreatUndefinedAs"} eq "EmptyString"))'.
# FIXME: Add the case for 'if ($signature->extendedAttributes->{"TreatUndefinedAs"} and $signature->extendedAttributes->{"TreatUndefinedAs"} eq "NullString"))'.
return "ustringToString($value.isEmpty() ? UString() : $value.toString(exec)->value(exec))";
}
......
......@@ -3309,13 +3309,15 @@ sub GetNativeTypeFromSignature
$type = GetNativeType($type, $parameterIndex >= 0 ? 1 : 0);
if ($parameterIndex >= 0 && $type eq "V8Parameter") {
# FIXME: This implements [TreatNullAs=NullString] and [TreatUndefinedAs=NullString],
# but the Web IDL spec requires [TreatNullAs=EmptyString] and [TreatUndefinedAs=EmptyString].
my $mode = "";
if (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "EmptyString") and ($signature->extendedAttributes->{"TreatUndefinedAs"} and $signature->extendedAttributes->{"TreatUndefinedAs"} eq "EmptyString")) {
if (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "NullString") and ($signature->extendedAttributes->{"TreatUndefinedAs"} and $signature->extendedAttributes->{"TreatUndefinedAs"} eq "NullString")) {
$mode = "WithUndefinedOrNullCheck";
} elsif (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "EmptyString") or $signature->extendedAttributes->{"Reflect"}) {
} elsif (($signature->extendedAttributes->{"TreatNullAs"} and $signature->extendedAttributes->{"TreatNullAs"} eq "NullString") or $signature->extendedAttributes->{"Reflect"}) {
$mode = "WithNullCheck";
}
# FIXME: Add the case for 'elsif ($signature->extendedAttributes->{"TreatUndefinedAs"} and $signature->extendedAttributes->{"TreatUndefinedAs"} eq "EmptyString"))'.
# FIXME: Add the case for 'elsif ($signature->extendedAttributes->{"TreatUndefinedAs"} and $signature->extendedAttributes->{"TreatUndefinedAs"} eq "NullString"))'.
$type .= "<$mode>";
}
......
......@@ -191,8 +191,8 @@ module test {
void convert1(in [ConvertNullStringTo=Null] a);
void convert2(in [ConvertNullStringTo=Undefined] b);
void convert3(in [ConvertNullStringTo=False] c);
void convert4(in [TreatNullAs=EmptyString] d);
void convert5(in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] e);
void convert4(in [TreatNullAs=NullString] d);
void convert5(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] e);
attribute SVGPoint mutablePoint;
attribute [Immutable] SVGPoint immutablePoint;
......
......@@ -25,7 +25,7 @@ module css {
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
readonly attribute [ConvertNullStringTo=Null] DOMString encoding;
#else
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString encoding
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString encoding
setter raises(DOMException);
#endif
};
......
......@@ -23,7 +23,7 @@ module css {
// Introduced in DOM Level 2:
interface CSSPageRule : CSSRule {
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString selectorText;
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString selectorText;
readonly attribute CSSStyleDeclaration style;
......
......@@ -43,7 +43,7 @@ module css {
readonly attribute unsigned short type;
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString cssText
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString cssText
setter raises (DOMException);
readonly attribute CSSStyleSheet parentStyleSheet;
......
......@@ -30,7 +30,7 @@ module css {
CustomGetPropertyNames,
V8DependentLifetime
] CSSStyleDeclaration {
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString cssText
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] 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);
[ObjCLegacyUnnamedParameters] void setProperty(in [Optional=CallWithDefaultValue] DOMString propertyName,
in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString value,
in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString value,
in [Optional=CallWithDefaultValue] DOMString priority)
raises(DOMException);
......
......@@ -23,7 +23,7 @@ module css {
// Introduced in DOM Level 2:
interface CSSStyleRule : CSSRule {
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString selectorText;
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString selectorText;
readonly attribute CSSStyleDeclaration style;
......
......@@ -34,7 +34,7 @@ module css {
const unsigned short CSS_VALUE_LIST = 2;
const unsigned short CSS_CUSTOM = 3;
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString cssText
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString cssText
setter raises(DOMException);
readonly attribute unsigned short cssValueType;
......
......@@ -31,7 +31,7 @@ module stylesheets {
HasIndexGetter
] MediaList {
attribute [TreatNullAs=EmptyString, ConvertNullStringTo=Null] DOMString mediaText
attribute [TreatNullAs=NullString, ConvertNullStringTo=Null] DOMString mediaText
setter raises(DOMException);
readonly attribute unsigned long length;
......
......@@ -33,7 +33,7 @@ module css {
HasIndexGetter
] WebKitCSSKeyframesRule : CSSRule {
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString name;
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString name;
readonly attribute CSSRuleList cssRules;
void insertRule(in [Optional=CallWithDefaultValue] DOMString rule);
......
......@@ -31,7 +31,7 @@ module core {
readonly attribute boolean specified;
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString value
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString value
setter raises(DOMException);
// DOM Level 2
......
......@@ -21,7 +21,7 @@ module core {
interface CharacterData : Node {
attribute [TreatNullAs=EmptyString] DOMString data
attribute [TreatNullAs=NullString] DOMString data
setter raises(DOMException);
readonly attribute unsigned long length;
......
......@@ -28,17 +28,17 @@ module core {
// DOM Level 1
[ObjCLegacyUnnamedParameters] boolean hasFeature(in [Optional=CallWithDefaultValue] DOMString feature,
in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString version);
in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString version);
// DOM Level 2
[ObjCLegacyUnnamedParameters] DocumentType createDocumentType(in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString,Optional=CallWithDefaultValue] DOMString qualifiedName,
in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString,Optional=CallWithDefaultValue] DOMString publicId,
in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString,Optional=CallWithDefaultValue] DOMString systemId)
[ObjCLegacyUnnamedParameters] DocumentType createDocumentType(in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString qualifiedName,
in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString publicId,
in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString systemId)
raises(DOMException);
[ObjCLegacyUnnamedParameters] Document createDocument(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString qualifiedName,
in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DocumentType doctype)
[ObjCLegacyUnnamedParameters] Document createDocument(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString qualifiedName,
in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DocumentType doctype)
raises(DOMException);
// DOMImplementationCSS interface from DOM Level 2 CSS
......
......@@ -31,7 +31,7 @@ module core {
readonly attribute DOMImplementation implementation;
readonly attribute Element documentElement;
[ReturnsNew] Element createElement(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString tagName)
[ReturnsNew] Element createElement(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString tagName)
raises (DOMException);
DocumentFragment createDocumentFragment();
[ReturnsNew] Text createTextNode(in [Optional=CallWithDefaultValue] DOMString data);
......@@ -52,13 +52,13 @@ module core {
[ObjCLegacyUnnamedParameters, ReturnsNew] Node importNode(in [Optional=CallWithDefaultValue] Node importedNode,
in [Optional] boolean deep)
raises (DOMException);
[ObjCLegacyUnnamedParameters, ReturnsNew] Element createElementNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString qualifiedName)
[ObjCLegacyUnnamedParameters, ReturnsNew] Element createElementNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString qualifiedName)
raises (DOMException);
[ObjCLegacyUnnamedParameters, ReturnsNew] Attr createAttributeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString qualifiedName)
[ObjCLegacyUnnamedParameters, ReturnsNew] Attr createAttributeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString qualifiedName)
raises (DOMException);
[ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,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, TreatNullAs=EmptyString] DOMString xmlVersion
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] 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, TreatNullAs=EmptyString] DOMString documentURI;
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString documentURI;
// DOM Level 2 Events (DocumentEvents interface)
......@@ -128,7 +128,7 @@ module core {
boolean execCommand(in [Optional=CallWithDefaultValue] DOMString command,
in [Optional=CallWithDefaultValue] boolean userInterface,
in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString,Optional=CallWithDefaultValue] DOMString value);
in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString value);
#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
// FIXME: remove the these two versions once [Optional] is implemented for Objective-C.
......@@ -145,17 +145,17 @@ module core {
// Moved down from HTMLDocument
attribute [TreatNullAs=EmptyString] DOMString title;
attribute [TreatNullAs=NullString] DOMString title;
readonly attribute DOMString referrer;
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
attribute [TreatNullAs=EmptyString] DOMString domain
attribute [TreatNullAs=NullString] DOMString domain
setter raises (DOMException);
#else
readonly attribute DOMString domain;
#endif
readonly attribute DOMString URL;
attribute [TreatNullAs=EmptyString] DOMString cookie
attribute [TreatNullAs=NullString] DOMString cookie
setter raises (DOMException),
getter raises (DOMException);
......@@ -175,7 +175,7 @@ module core {
NodeList getElementsByName(in [Optional=CallWithDefaultValue] DOMString elementName);
#if defined(ENABLE_MICRODATA) && ENABLE_MICRODATA
NodeList getItems(in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString, Optional=CallWithDefaultValue] DOMString typeNames);
NodeList getItems(in [TreatNullAs=NullString, TreatUndefinedAs=NullString, Optional=CallWithDefaultValue] DOMString typeNames);
#endif
#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
......@@ -184,7 +184,7 @@ module core {
// IE extensions
attribute [ConvertNullStringTo=Undefined, TreatNullAs=EmptyString] DOMString charset;
attribute [ConvertNullStringTo=Undefined, TreatNullAs=NullString] 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, TreatNullAs=EmptyString] DOMString selectedStylesheetSet;
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString selectedStylesheetSet;
#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
CSSStyleDeclaration createCSSStyleDeclaration();
......
......@@ -43,22 +43,22 @@ module core {
// DOM Level 2 Core
[ObjCLegacyUnnamedParameters] DOMString getAttributeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] DOMString getAttributeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [Optional=CallWithDefaultValue] DOMString localName);
[ObjCLegacyUnnamedParameters] void setAttributeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] void setAttributeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [Optional=CallWithDefaultValue] DOMString qualifiedName,
in [Optional=CallWithDefaultValue] DOMString value)
raises(DOMException);
[ObjCLegacyUnnamedParameters] void removeAttributeNS(in [TreatNullAs=EmptyString] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] void removeAttributeNS(in [TreatNullAs=NullString] DOMString namespaceURI,
in DOMString localName);
[ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [Optional=CallWithDefaultValue] DOMString localName);
[ObjCLegacyUnnamedParameters] Attr getAttributeNodeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] Attr getAttributeNodeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [Optional=CallWithDefaultValue] DOMString localName);
Attr setAttributeNodeNS(in [Optional=CallWithDefaultValue] Attr newAttr)
raises(DOMException);
boolean hasAttribute(in DOMString name);
[ObjCLegacyUnnamedParameters] boolean hasAttributeNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] boolean hasAttributeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [Optional=CallWithDefaultValue] DOMString localName);
readonly attribute CSSStyleDeclaration style;
......
......@@ -42,7 +42,7 @@ module core {
// Introduced in DOM Level 2:
[ObjCLegacyUnnamedParameters] Node getNamedItemNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] Node getNamedItemNS(in [TreatNullAs=NullString,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);
[ObjCLegacyUnnamedParameters] Node removeNamedItemNS(in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
[ObjCLegacyUnnamedParameters] Node removeNamedItemNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [Optional=CallWithDefaultValue] DOMString localName)
raises(DOMException);
......
......@@ -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, TreatNullAs=EmptyString] DOMString nodeValue
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString nodeValue
setter raises(DOMException);
readonly attribute unsigned short nodeType;
......@@ -85,10 +85,10 @@ module core {
// Introduced in DOM Level 2:
[ObjCLegacyUnnamedParameters] boolean isSupported(in [Optional=CallWithDefaultValue] DOMString feature,
in [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString version);
in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString version);
readonly attribute [ConvertNullStringTo=Null] DOMString namespaceURI;
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString prefix
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] 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, TreatNullAs=EmptyString] DOMString textContent
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString textContent
setter raises(DOMException);
boolean isSameNode(in [Optional=CallWithDefaultValue] Node other);
boolean isEqualNode(in [Optional=CallWithDefaultValue] Node other);
[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);
[ConvertNullStringTo=Null] DOMString lookupPrefix(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI);
boolean isDefaultNamespace(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI);
[ConvertNullStringTo=Null] DOMString lookupNamespaceURI(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString prefix);
// DocumentPosition
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
......
......@@ -25,7 +25,7 @@ module core {
// DOM Level 1
readonly attribute [ConvertNullStringTo=Null] DOMString target;
attribute [ConvertNullStringTo=Null, TreatNullAs=EmptyString] DOMString data
attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString data
setter raises(DOMException);
// interface LinkStyle from DOM Level 2 Style Sheets
......
......@@ -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 [TreatNullAs=EmptyString,Optional=CallWithDefaultValue] DOMString namespaceURI,
NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI,
in [Optional=CallWithDefaultValue] DOMString localName);
};
......
......@@ -40,7 +40,7 @@ module html {
#if !defined(LANGUAGE_OBJECTIVE_C)
#if defined(ENABLE_BLOB) && ENABLE_BLOB
Blob webkitSlice(in [Optional] long long start, in [Optional] long long end, in [Optional, TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString contentType);
Blob webkitSlice(in [Optional] long long start, in [Optional] long long end, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString contentType);
#endif
#endif
};
......
......@@ -36,8 +36,8 @@ module storage {
JSNoStaticTables
] DirectoryEntry : Entry {
DirectoryReader createReader();
[Custom] void getFile(in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString path, in [Optional] WebKitFlags flags, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
[Custom] void getDirectory(in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString path, in [Optional] WebKitFlags flags, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
[Custom] void getFile(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, in [Optional] WebKitFlags flags, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
[Custom] void getDirectory(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, in [Optional] WebKitFlags flags, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
void removeRecursively(in [Callback] VoidCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
};
}
......@@ -36,8 +36,8 @@ module storage {
JSNoStaticTables
] DirectoryEntrySync : EntrySync {
DirectoryReaderSync createReader() raises (FileException);
[Custom] FileEntrySync getFile(in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString path, in WebKitFlags flags) raises (FileException);
[Custom] DirectoryEntrySync getDirectory(in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString path, in WebKitFlags flags) raises (FileException);
[Custom] FileEntrySync getFile(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, in WebKitFlags flags) raises (FileException);
[Custom] DirectoryEntrySync getDirectory(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, in WebKitFlags flags) raises (FileException);
void removeRecursively() raises (FileException);
};
}
......@@ -41,8 +41,8 @@ module storage {
readonly attribute DOMFileSystem filesystem;
void getMetadata(in [Callback] MetadataCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
void moveTo(in DirectoryEntry parent, in [Optional, TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString name, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
void copyTo(in DirectoryEntry parent, in [Optional, TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString name, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
void moveTo(in DirectoryEntry parent, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString name, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
void copyTo(in DirectoryEntry parent, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString name, in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
DOMString toURL();
void remove(in [Callback] VoidCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
void getParent(in [Optional, Callback] EntryCallback successCallback, in [Optional, Callback] ErrorCallback errorCallback);
......
......@@ -41,8 +41,8 @@ module storage {
readonly attribute DOMFileSystemSync filesystem;
Metadata getMetadata() raises (FileException);
EntrySync moveTo(in DirectoryEntrySync parent, in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString name) raises (FileException);
EntrySync copyTo(in DirectoryEntrySync parent, in [TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString name) raises (FileException);
EntrySync moveTo(in DirectoryEntrySync parent, in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString name) raises (FileException);
EntrySync copyTo(in DirectoryEntrySync parent, in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString name) raises (FileException);
DOMString toURL();
void remove() raises (FileException);
DirectoryEntrySync getParent();
......
......@@ -35,13 +35,13 @@ module html {
JSNoStaticTables
] WebKitBlobBuilder {
#if !defined(LANGUAGE_OBJECTIVE_C)
Blob getBlob(in [Optional, TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString contentType);
Blob getBlob(in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString contentType);
#endif
void append(in Blob blob);
#if defined(ENABLE_BLOB) && ENABLE_BLOB
void append(in ArrayBuffer arrayBuffer);
#endif
void append(in DOMString value, in [Optional, TreatNullAs=EmptyString, TreatUndefinedAs=EmptyString] DOMString endings) raises (DOMException);
void append(in DOMString value, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString endings) raises (DOMException);
};
}
......
......@@ -43,15 +43,15 @@ module html {
readonly attribute DOMString protocol;
readonly attribute DOMString search;
#else
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;