Title: [197060] trunk/Source/WebCore
Revision
197060
Author
cdu...@apple.com
Date
2016-02-24 18:39:19 -0800 (Wed, 24 Feb 2016)

Log Message

Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute
https://bugs.webkit.org/show_bug.cgi?id=154659

Reviewed by Sam Weinig.

Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute and
use nullable DOMString types instead:
http://heycam.github.io/webidl/#idl-nullable-type

This is the standard way of doing things. We already had support
in the bindings generator for nullable DOMString attributes so
we now just leverage this support. However, our IDL parser did
not correctly parse nullable DOMString return values for operations.
This patch fixes this.

This patch also drops [TreatNullAs=NullString] and
[TreatUndefinedAs=NullString] for writable DOMString attributes that
are now marked as nullable because they are implied.

* Modules/fetch/FetchHeaders.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/mediasource/DOMURLMediaSource.idl:
* Modules/mediastream/DOMURLMediaStream.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(NativeToJSValue): Deleted.
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseAttributeOrOperationRest):
(parseOperationOrIterator):
(parseSpecialOperation):
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_nullable_string_method):
(webkit_dom_test_obj_nullable_string_special_method):
(webkit_dom_test_obj_conditional_method3): Deleted.
(webkit_dom_test_obj_convert1): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertySlotByIndex):
(WebCore::JSTestObj::getOwnPropertyNames):
(WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
(WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
(WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): Deleted.
(WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2): Deleted.
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj nullableStringMethod]):
(-[DOMTestObj nullableStringStaticMethod]):
(-[DOMTestObj nullableStringSpecialMethod:]):
(-[DOMTestObj overloadedMethod1:]): Deleted.
(-[DOMTestObj getSVGDocument]): Deleted.
* bindings/scripts/test/TestObj.idl:
* css/CSSCharsetRule.idl:
* css/CSSImportRule.idl:
* css/CSSKeyframesRule.idl:
* css/CSSPageRule.idl:
* css/CSSRule.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleRule.idl:
* css/CSSValue.idl:
* css/MediaList.idl:
* css/StyleSheet.idl:
* dom/Attr.idl:
* dom/CharacterData.idl:
* dom/DOMStringList.idl:
* dom/Document.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/Entity.idl:
* dom/MutationRecord.idl:
* dom/Node.idl:
* dom/ProcessingInstruction.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/DOMURL.idl:
* html/canvas/WebGLDebugShaders.idl:
* html/canvas/WebGLRenderingContextBase.idl:
* page/DOMWindow.idl:
* storage/Storage.idl:
* storage/StorageEvent.idl:
* xml/XMLHttpRequest.idl:
* xml/XPathNSResolver.idl:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (197059 => 197060)


--- trunk/Source/WebCore/ChangeLog	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/ChangeLog	2016-02-25 02:39:19 UTC (rev 197060)
@@ -1,3 +1,91 @@
+2016-02-24  Chris Dumez  <cdu...@apple.com>
+
+        Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute
+        https://bugs.webkit.org/show_bug.cgi?id=154659
+
+        Reviewed by Sam Weinig.
+
+        Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute and
+        use nullable DOMString types instead:
+        http://heycam.github.io/webidl/#idl-nullable-type
+
+        This is the standard way of doing things. We already had support
+        in the bindings generator for nullable DOMString attributes so
+        we now just leverage this support. However, our IDL parser did
+        not correctly parse nullable DOMString return values for operations.
+        This patch fixes this.
+
+        This patch also drops [TreatNullAs=NullString] and
+        [TreatUndefinedAs=NullString] for writable DOMString attributes that
+        are now marked as nullable because they are implied.
+
+        * Modules/fetch/FetchHeaders.idl:
+        * Modules/indexeddb/IDBObjectStore.idl:
+        * Modules/mediasource/DOMURLMediaSource.idl:
+        * Modules/mediastream/DOMURLMediaStream.idl:
+        * Modules/websockets/WebSocket.idl:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (NativeToJSValue): Deleted.
+        * bindings/scripts/IDLAttributes.txt:
+        * bindings/scripts/IDLParser.pm:
+        (parseAttributeOrOperationRest):
+        (parseOperationOrIterator):
+        (parseSpecialOperation):
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        (webkit_dom_test_obj_nullable_string_method):
+        (webkit_dom_test_obj_nullable_string_special_method):
+        (webkit_dom_test_obj_conditional_method3): Deleted.
+        (webkit_dom_test_obj_convert1): Deleted.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::JSTestObj::getOwnPropertySlot):
+        (WebCore::JSTestObj::getOwnPropertySlotByIndex):
+        (WebCore::JSTestObj::getOwnPropertyNames):
+        (WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
+        (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
+        (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): Deleted.
+        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2): Deleted.
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        (-[DOMTestObj nullableStringMethod]):
+        (-[DOMTestObj nullableStringStaticMethod]):
+        (-[DOMTestObj nullableStringSpecialMethod:]):
+        (-[DOMTestObj overloadedMethod1:]): Deleted.
+        (-[DOMTestObj getSVGDocument]): Deleted.
+        * bindings/scripts/test/TestObj.idl:
+        * css/CSSCharsetRule.idl:
+        * css/CSSImportRule.idl:
+        * css/CSSKeyframesRule.idl:
+        * css/CSSPageRule.idl:
+        * css/CSSRule.idl:
+        * css/CSSStyleDeclaration.idl:
+        * css/CSSStyleRule.idl:
+        * css/CSSValue.idl:
+        * css/MediaList.idl:
+        * css/StyleSheet.idl:
+        * dom/Attr.idl:
+        * dom/CharacterData.idl:
+        * dom/DOMStringList.idl:
+        * dom/Document.idl:
+        * dom/DocumentType.idl:
+        * dom/Element.idl:
+        * dom/Entity.idl:
+        * dom/MutationRecord.idl:
+        * dom/Node.idl:
+        * dom/ProcessingInstruction.idl:
+        * html/DOMSettableTokenList.idl:
+        * html/DOMTokenList.idl:
+        * html/DOMURL.idl:
+        * html/canvas/WebGLDebugShaders.idl:
+        * html/canvas/WebGLRenderingContextBase.idl:
+        * page/DOMWindow.idl:
+        * storage/Storage.idl:
+        * storage/StorageEvent.idl:
+        * xml/XMLHttpRequest.idl:
+        * xml/XPathNSResolver.idl:
+
 2016-02-24  Nikos Andronikos  <nikos.andronikos-web...@cisra.canon.com.au>
 
         [web-animations] Add AnimationTimeline, DocumentTimeline and add extensions to Document interface

Modified: trunk/Source/WebCore/Modules/fetch/FetchHeaders.idl (197059 => 197060)


--- trunk/Source/WebCore/Modules/fetch/FetchHeaders.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/Modules/fetch/FetchHeaders.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -36,7 +36,7 @@
 interface FetchHeaders {
     [RaisesException] void append(DOMString name, DOMString value);
     [RaisesException, ImplementedAs=remove] void delete(DOMString name);
-    [RaisesException, TreatReturnedNullStringAs=Null] DOMString get(DOMString name);
+    [RaisesException] DOMString? get(DOMString name);
     [RaisesException] boolean has(DOMString name);
     [RaisesException] void set(DOMString name, DOMString value);
 

Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (197059 => 197060)


--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -30,7 +30,7 @@
     JSCustomMarkFunction,
     GenerateIsReachable=Impl,
 ] interface IDBObjectStore {
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString name;
+    readonly attribute DOMString? name;
     [ImplementedAs=keyPathAny] readonly attribute IDBAny keyPath;
     readonly attribute DOMStringList indexNames;
     readonly attribute IDBTransaction transaction;

Modified: trunk/Source/WebCore/Modules/mediasource/DOMURLMediaSource.idl (197059 => 197060)


--- trunk/Source/WebCore/Modules/mediasource/DOMURLMediaSource.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/Modules/mediasource/DOMURLMediaSource.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -31,5 +31,5 @@
     Conditional=MEDIA_SOURCE
 ]
 partial interface DOMURL {
-    [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaSource? source);
+    [CallWith=ScriptExecutionContext] static DOMString? createObjectURL(MediaSource? source);
 };

Modified: trunk/Source/WebCore/Modules/mediastream/DOMURLMediaStream.idl (197059 => 197060)


--- trunk/Source/WebCore/Modules/mediastream/DOMURLMediaStream.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/Modules/mediastream/DOMURLMediaStream.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -31,5 +31,5 @@
     Conditional=MEDIA_STREAM
 ]
 partial interface DOMURL {
-    [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaStream? stream);
+    [CallWith=ScriptExecutionContext] static DOMString? createObjectURL(MediaStream? stream);
 };

Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.idl (197059 => 197060)


--- trunk/Source/WebCore/Modules/websockets/WebSocket.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -57,8 +57,8 @@
     attribute EventHandler onerror;
     attribute EventHandler onclose;
 
-    [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol;
-    [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString extensions;
+    readonly attribute DOMString? protocol;
+    readonly attribute DOMString? extensions;
 
     attribute DOMString binaryType;
 

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm	2016-02-25 02:39:19 UTC (rev 197060)
@@ -4262,7 +4262,6 @@
         AddToImplIncludes("URL.h", $conditional);
         my $conv = $signature->extendedAttributes->{"TreatReturnedNullStringAs"};
         if (defined $conv) {
-            return "jsStringOrNull(state, $value)" if $conv eq "Null";
             return "jsStringOrUndefined(state, $value)" if $conv eq "Undefined";
 
             die "Unknown value for TreatReturnedNullStringAs extended attribute";

Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt	2016-02-25 02:39:19 UTC (rev 197060)
@@ -121,7 +121,7 @@
 SuppressToJSObject
 TreatNullAs=NullString
 TreatReturnedNaNDateAs=Null|NaN
-TreatReturnedNullStringAs=Null|Undefined
+TreatReturnedNullStringAs=Undefined
 TreatUndefinedAs=NullString
 TypedArray=*
 URL

Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm	2016-02-25 02:39:19 UTC (rev 197060)
@@ -1125,7 +1125,12 @@
         my $returnType = $self->parseReturnType();
         my $interface = $self->parseOperationRest($extendedAttributeList);
         if (defined ($interface)) {
-            $interface->signature->type($returnType);
+            if (typeHasNullableSuffix($returnType)) {
+                $interface->signature->isNullable(1);
+            } else {
+                $interface->signature->isNullable(0);
+            }
+            $interface->signature->type(typeRemoveNullableSuffix($returnType));
         }
         return $interface;
     }
@@ -1223,7 +1228,13 @@
         my $next = $self->nextToken();
         if ($next->type() == IdentifierToken || $next->value() eq "(") {
             my $operation = $self->parseOperationRest($extendedAttributeList);
-            $operation->signature->type($returnType);
+            if (typeHasNullableSuffix($returnType)) {
+                $operation->signature->isNullable(1);
+            } else {
+                $operation->signature->isNullable(0);
+            }
+            $operation->signature->type(typeRemoveNullableSuffix($returnType));
+
             return $operation;
         }
     }
@@ -1242,8 +1253,14 @@
         my $returnType = $self->parseReturnType();
         my $interface = $self->parseOperationRest($extendedAttributeList);
         if (defined ($interface)) {
-            $interface->signature->type($returnType);
-             $interface->signature->specials(\@specials);
+            if (typeHasNullableSuffix($returnType)) {
+                $interface->signature->isNullable(1);
+            } else {
+                $interface->signature->isNullable(0);
+            }
+            $interface->signature->type(typeRemoveNullableSuffix($returnType));
+
+            $interface->signature->specials(\@specials);
         }
         return $interface;
     }

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp	2016-02-25 02:39:19 UTC (rev 197060)
@@ -1252,6 +1252,24 @@
     return result;
 }
 
+gchar* webkit_dom_test_obj_nullable_string_method(WebKitDOMTestObj* self)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
+    WebCore::TestObj* item = WebKit::core(self);
+    gchar* result = convertToUTF8String(item->nullableStringMethod());
+    return result;
+}
+
+gchar* webkit_dom_test_obj_nullable_string_special_method(WebKitDOMTestObj* self, gulong index)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
+    WebCore::TestObj* item = WebKit::core(self);
+    gchar* result = convertToUTF8String(item->nullableStringSpecialMethod(index));
+    return result;
+}
+
 void webkit_dom_test_obj_method_with_enum_arg(WebKitDOMTestObj* self, WebKitDOMTestEnumType* enumArg)
 {
     WebCore::JSMainThreadNullState state;
@@ -1549,16 +1567,6 @@
     item->convert1(convertedValue);
 }
 
-void webkit_dom_test_obj_convert2(WebKitDOMTestObj* self, WebKitDOMTestNode* value)
-{
-    WebCore::JSMainThreadNullState state;
-    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
-    g_return_if_fail(WEBKIT_DOM_IS_TEST_NODE(value));
-    WebCore::TestObj* item = WebKit::core(self);
-    WebCore::TestNode* convertedValue = WebKit::core(value);
-    item->convert2(convertedValue);
-}
-
 void webkit_dom_test_obj_convert4(WebKitDOMTestObj* self, WebKitDOMTestNode* value)
 {
     WebCore::JSMainThreadNullState state;

Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h	2016-02-25 02:39:19 UTC (rev 197060)
@@ -247,6 +247,29 @@
 webkit_dom_test_obj_unforgeable_method(WebKitDOMTestObj* self);
 
 /**
+ * webkit_dom_test_obj_nullable_string_method:
+ * @self: A #WebKitDOMTestObj
+ *
+ * Returns: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gchar*
+webkit_dom_test_obj_nullable_string_method(WebKitDOMTestObj* self);
+
+/**
+ * webkit_dom_test_obj_nullable_string_special_method:
+ * @self: A #WebKitDOMTestObj
+ * @index: A #gulong
+ *
+ * Returns: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API gchar*
+webkit_dom_test_obj_nullable_string_special_method(WebKitDOMTestObj* self, gulong index);
+
+/**
  * webkit_dom_test_obj_method_with_enum_arg:
  * @self: A #WebKitDOMTestObj
  * @enumArg: A #WebKitDOMTestEnumType
@@ -526,16 +549,6 @@
 webkit_dom_test_obj_convert1(WebKitDOMTestObj* self, WebKitDOMTestNode* value);
 
 /**
- * webkit_dom_test_obj_convert2:
- * @self: A #WebKitDOMTestObj
- * @value: A #WebKitDOMTestNode
- *
- * Stability: Unstable
-**/
-WEBKIT_API void
-webkit_dom_test_obj_convert2(WebKitDOMTestObj* self, WebKitDOMTestNode* value);
-
-/**
  * webkit_dom_test_obj_convert4:
  * @self: A #WebKitDOMTestObj
  * @value: A #WebKitDOMTestNode

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp	2016-02-25 02:39:19 UTC (rev 197060)
@@ -63,6 +63,7 @@
 #include <runtime/FunctionPrototype.h>
 #include <runtime/JSArray.h>
 #include <runtime/JSString.h>
+#include <runtime/PropertyNameArray.h>
 #include <runtime/Symbol.h>
 #include <wtf/GetPtr.h>
 
@@ -99,6 +100,9 @@
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethod(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjInstanceFunctionUnforgeableMethod(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringMethod(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionNullableStringStaticMethod(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringSpecialMethod(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(JSC::ExecState*);
@@ -163,7 +167,6 @@
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(JSC::ExecState*);
 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(JSC::ExecState*);
@@ -443,6 +446,7 @@
     { "staticStringAttr", DontDelete, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticStringAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestObjConstructorStaticStringAttr) } },
     { "TestSubObj", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorTestSubObj), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
     { "staticReadOnlySymbolAttr", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlySymbolAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
+    { "nullableStringStaticMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionNullableStringStaticMethod), (intptr_t) (0) } },
     { "staticMethodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
     { "staticMethodWithCallbackArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackArg), (intptr_t) (1) } },
     { "classMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionClassMethod), (intptr_t) (0) } },
@@ -611,6 +615,8 @@
     { "longMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionLongMethodWithArgs), (intptr_t) (3) } },
     { "objMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t) (0) } },
     { "objMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t) (3) } },
+    { "nullableStringMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionNullableStringMethod), (intptr_t) (0) } },
+    { "nullableStringSpecialMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionNullableStringSpecialMethod), (intptr_t) (1) } },
     { "methodWithSequenceArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) } },
     { "methodReturningSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodReturningSequence), (intptr_t) (1) } },
     { "methodWithEnumArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithEnumArg), (intptr_t) (1) } },
@@ -684,7 +690,6 @@
     { "methodWithAndWithoutNullableSequence2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2), (intptr_t) (2) } },
     { "getSVGDocument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetSVGDocument), (intptr_t) (0) } },
     { "convert1", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert1), (intptr_t) (1) } },
-    { "convert2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert2), (intptr_t) (1) } },
     { "convert4", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert4), (intptr_t) (1) } },
     { "convert5", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert5), (intptr_t) (1) } },
     { "mutablePointFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMutablePointFunction), (intptr_t) (0) } },
@@ -762,11 +767,30 @@
 {
     auto* thisObject = jsCast<JSTestObj*>(object);
     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+    Optional<uint32_t> optionalIndex = parseIndex(propertyName);
+    if (optionalIndex) {
+        unsigned index = optionalIndex.value();
+        unsigned attributes = DontDelete | ReadOnly;
+        slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index)));
+        return true;
+    }
     if (getStaticPropertySlot<JSTestObj, Base>(state, JSTestObjTable, thisObject, propertyName, slot))
         return true;
     return false;
 }
 
+bool JSTestObj::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)
+{
+    auto* thisObject = jsCast<JSTestObj*>(object);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+    if (index <= MAX_ARRAY_INDEX) {
+        unsigned attributes = DontDelete | ReadOnly;
+        slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index)));
+        return true;
+    }
+    return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
+}
+
 EncodedJSValue jsTestObjReadOnlyLongAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
 {
     UNUSED_PARAM(state);
@@ -3075,6 +3099,15 @@
 }
 
 
+void JSTestObj::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
+{
+    auto* thisObject = jsCast<JSTestObj*>(object);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+    for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)
+        propertyNames.add(Identifier::from(state, i));
+    Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
+}
+
 JSValue JSTestObj::getConstructor(VM& vm, const JSGlobalObject* globalObject)
 {
     return getDOMConstructor<JSTestObjConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
@@ -3267,6 +3300,41 @@
     return JSValue::encode(result);
 }
 
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringMethod(ExecState* state)
+{
+    JSValue thisValue = state->thisValue();
+    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, "TestObj", "nullableStringMethod");
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto& impl = castedThis->wrapped();
+    JSValue result = jsStringOrNull(state, impl.nullableStringMethod());
+    return JSValue::encode(result);
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionNullableStringStaticMethod(ExecState* state)
+{
+    JSValue result = jsStringOrNull(state, TestObj::nullableStringStaticMethod());
+    return JSValue::encode(result);
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringSpecialMethod(ExecState* state)
+{
+    JSValue thisValue = state->thisValue();
+    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, "TestObj", "nullableStringSpecialMethod");
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto& impl = castedThis->wrapped();
+    if (UNLIKELY(state->argumentCount() < 1))
+        return throwVMError(state, createNotEnoughArgumentsError(state));
+    unsigned index = toUInt32(state, state->argument(0), NormalConversion);
+    if (UNLIKELY(state->hadException()))
+        return JSValue::encode(jsUndefined());
+    JSValue result = jsStringOrNull(state, impl.nullableStringSpecialMethod(index));
+    return JSValue::encode(result);
+}
+
 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(ExecState* state)
 {
     JSValue thisValue = state->thisValue();
@@ -4558,23 +4626,6 @@
     return JSValue::encode(jsUndefined());
 }
 
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* state)
-{
-    JSValue thisValue = state->thisValue();
-    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
-    if (UNLIKELY(!castedThis))
-        return throwThisTypeError(*state, "TestObj", "convert2");
-    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
-    auto& impl = castedThis->wrapped();
-    if (UNLIKELY(state->argumentCount() < 1))
-        return throwVMError(state, createNotEnoughArgumentsError(state));
-    TestNode* value = JSTestNode::toWrapped(state->argument(0));
-    if (UNLIKELY(state->hadException()))
-        return JSValue::encode(jsUndefined());
-    impl.convert2(value);
-    return JSValue::encode(jsUndefined());
-}
-
 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* state)
 {
     JSValue thisValue = state->thisValue();

Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h	2016-02-25 02:39:19 UTC (rev 197060)
@@ -43,6 +43,7 @@
     static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
     static TestObj* toWrapped(JSC::JSValue);
     static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
+    static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
     static void destroy(JSC::JSCell*);
 
     DECLARE_INFO;
@@ -52,6 +53,7 @@
         return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
     }
 
+    static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode());
     static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
     mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute1;
     mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute2;
@@ -67,7 +69,7 @@
     JSC::JSValue customMethodWithArgs(JSC::ExecState&);
     static JSC::JSValue classMethod2(JSC::ExecState&);
 public:
-    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
+    static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | Base::StructureFlags;
 protected:
     JSTestObj(JSC::Structure*, JSDOMGlobalObject&, Ref<TestObj>&&);
 

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h	2016-02-25 02:39:19 UTC (rev 197060)
@@ -143,6 +143,9 @@
 - (DOMTestObj *)objMethod;
 - (DOMTestObj *)objMethodWithArgs:(int)longArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
 - (int)unforgeableMethod;
+- (NSString *)nullableStringMethod;
+- (NSString *)nullableStringStaticMethod;
+- (NSString *)nullableStringSpecialMethod:(unsigned)index;
 - (void)methodWithEnumArg:(DOMTestEnumType *)enumArg;
 - (void)methodWithOptionalEnumArgAndDefaultValue:(DOMTestEnumType *)enumArg;
 - (DOMTestObj *)methodThatRequiresAllArgsAndThrows:(NSString *)strArg objArg:(DOMTestObj *)objArg;
@@ -176,7 +179,6 @@
 - (void)classMethod2:(int)arg;
 - (DOMSVGDocument *)getSVGDocument;
 - (void)convert1:(DOMTestNode *)value;
-- (void)convert2:(DOMTestNode *)value;
 - (void)convert4:(DOMTestNode *)value;
 - (void)convert5:(DOMTestNode *)value;
 - (DOMSVGPoint *)mutablePointFunction;

Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm	2016-02-25 02:39:19 UTC (rev 197060)
@@ -981,6 +981,24 @@
     return IMPL->unforgeableMethod();
 }
 
+- (NSString *)nullableStringMethod
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->nullableStringMethod();
+}
+
+- (NSString *)nullableStringStaticMethod
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->nullableStringStaticMethod();
+}
+
+- (NSString *)nullableStringSpecialMethod:(unsigned)index
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->nullableStringSpecialMethod(index);
+}
+
 - (void)methodWithEnumArg:(DOMTestEnumType *)enumArg
 {
     WebCore::JSMainThreadNullState state;
@@ -1267,12 +1285,6 @@
     IMPL->convert1(core(value));
 }
 
-- (void)convert2:(DOMTestNode *)value
-{
-    WebCore::JSMainThreadNullState state;
-    IMPL->convert2(core(value));
-}
-
 - (void)convert4:(DOMTestNode *)value
 {
     WebCore::JSMainThreadNullState state;

Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (197059 => 197060)


--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -97,6 +97,11 @@
     TestObj objMethodWithArgs(long longArg, DOMString strArg, TestObj objArg);
     [Unforgeable] long unforgeableMethod();
 
+    // Nullable String return values.
+    DOMString? nullableStringMethod();
+    static DOMString? nullableStringStaticMethod();
+    getter DOMString? nullableStringSpecialMethod(unsigned long index);
+
     void methodWithSequenceArg(sequence<ScriptProfile> sequenceArg);
     sequence<ScriptProfile> methodReturningSequence(long longArg);
 
@@ -256,8 +261,7 @@
     [CheckSecurityForNode] readonly attribute Document contentDocument;
     [CheckSecurityForNode, RaisesException] SVGDocument getSVGDocument();
 
-    void convert1([TreatReturnedNullStringAs=Null] TestNode value);
-    void convert2([TreatReturnedNullStringAs=Undefined] TestNode value);
+    void convert1(TestNode value);
     void convert4([TreatNullAs=NullString] TestNode value);
     void convert5([TreatNullAs=NullString, TreatUndefinedAs=NullString] TestNode value);
 

Modified: trunk/Source/WebCore/css/CSSCharsetRule.idl (197059 => 197060)


--- trunk/Source/WebCore/css/CSSCharsetRule.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/CSSCharsetRule.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -21,9 +21,9 @@
 // Introduced in DOM Level 2:
 interface CSSCharsetRule : CSSRule {
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString encoding;
+    readonly attribute DOMString? encoding;
 #else
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString encoding;
+    [SetterRaisesException] attribute DOMString? encoding;
 #endif
 };
 

Modified: trunk/Source/WebCore/css/CSSImportRule.idl (197059 => 197060)


--- trunk/Source/WebCore/css/CSSImportRule.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/CSSImportRule.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -20,7 +20,7 @@
 
 // Introduced in DOM Level 2:
 interface CSSImportRule : CSSRule {
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString href;
+    readonly attribute DOMString? href;
     readonly attribute MediaList media;
     readonly attribute CSSStyleSheet styleSheet;
 };

Modified: trunk/Source/WebCore/css/CSSKeyframesRule.idl (197059 => 197060)


--- trunk/Source/WebCore/css/CSSKeyframesRule.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/CSSKeyframesRule.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -27,8 +27,7 @@
  */
 
 interface CSSKeyframesRule : CSSRule {
-
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString name;
+    attribute DOMString? name;
     readonly attribute CSSRuleList cssRules;
     
     void insertRule([Default=Undefined] optional DOMString rule);

Modified: trunk/Source/WebCore/css/CSSPageRule.idl (197059 => 197060)


--- trunk/Source/WebCore/css/CSSPageRule.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/CSSPageRule.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -20,10 +20,8 @@
 
 // Introduced in DOM Level 2:
 interface CSSPageRule : CSSRule {
+    attribute DOMString? selectorText;
 
-             [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString selectorText;
-
     readonly attribute CSSStyleDeclaration style;
-
 };
 

Modified: trunk/Source/WebCore/css/CSSRule.idl (197059 => 197060)


--- trunk/Source/WebCore/css/CSSRule.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/CSSRule.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -50,7 +50,7 @@
 
     readonly attribute unsigned short   type;
 
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString cssText;
+    [SetterRaisesException] attribute DOMString? cssText;
 
     readonly attribute CSSStyleSheet    parentStyleSheet;
     readonly attribute CSSRule          parentRule;

Modified: trunk/Source/WebCore/css/CSSStyleDeclaration.idl (197059 => 197060)


--- trunk/Source/WebCore/css/CSSStyleDeclaration.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/CSSStyleDeclaration.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -28,12 +28,12 @@
     CustomEnumerateProperty,
     SkipVTableValidation,
 ] interface CSSStyleDeclaration {
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString cssText;
+    [SetterRaisesException] attribute DOMString? cssText;
 
     DOMString getPropertyValue([Default=Undefined] DOMString propertyName);
     [Custom] CSSValue           getPropertyCSSValue([Default=Undefined] optional DOMString propertyName);
-    [TreatReturnedNullStringAs=Null, RaisesException] DOMString          removeProperty([Default=Undefined] optional DOMString propertyName);
-    [TreatReturnedNullStringAs=Null] DOMString          getPropertyPriority([Default=Undefined] optional DOMString propertyName);
+    [RaisesException] DOMString          removeProperty([Default=Undefined] optional DOMString propertyName);
+    DOMString?          getPropertyPriority([Default=Undefined] optional DOMString propertyName);
     [ObjCLegacyUnnamedParameters, RaisesException] void setProperty([Default=Undefined] optional DOMString propertyName, 
                                     [TreatNullAs=NullString, Default=Undefined] optional DOMString value, 
                                     [Default=Undefined] optional DOMString priority);
@@ -43,7 +43,7 @@
     readonly attribute CSSRule          parentRule;
 
     // Extensions
-    [TreatReturnedNullStringAs=Null] DOMString          getPropertyShorthand([Default=Undefined] optional DOMString propertyName);
+    DOMString?          getPropertyShorthand([Default=Undefined] optional DOMString propertyName);
     boolean            isPropertyImplicit([Default=Undefined] optional DOMString propertyName);
 };
 

Modified: trunk/Source/WebCore/css/CSSStyleRule.idl (197059 => 197060)


--- trunk/Source/WebCore/css/CSSStyleRule.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/CSSStyleRule.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -20,10 +20,8 @@
 
 // Introduced in DOM Level 2:
 interface CSSStyleRule : CSSRule {
+    attribute DOMString? selectorText;
 
-             [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString selectorText;
-
     readonly attribute CSSStyleDeclaration style;
-
 };
 

Modified: trunk/Source/WebCore/css/CSSValue.idl (197059 => 197060)


--- trunk/Source/WebCore/css/CSSValue.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/CSSValue.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -25,16 +25,14 @@
     ObjCPolymorphic,
     ImplementationLacksVTable
 ] interface CSSValue {
-
     // UnitTypes
     const unsigned short CSS_INHERIT         = 0;
     const unsigned short CSS_PRIMITIVE_VALUE = 1;
     const unsigned short CSS_VALUE_LIST      = 2;
     const unsigned short CSS_CUSTOM          = 3;
 
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString cssText;
+    [SetterRaisesException] attribute DOMString? cssText;
 
     readonly attribute unsigned short cssValueType;
-
 };
 

Modified: trunk/Source/WebCore/css/MediaList.idl (197059 => 197060)


--- trunk/Source/WebCore/css/MediaList.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/MediaList.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -30,10 +30,10 @@
     ImplementationLacksVTable,
 ] interface MediaList {
 
-    [TreatNullAs=NullString, TreatReturnedNullStringAs=Null, SetterRaisesException] attribute DOMString mediaText;
+    [SetterRaisesException] attribute DOMString? mediaText;
     readonly attribute unsigned long length;
 
-    [TreatReturnedNullStringAs=Null] getter DOMString item([Default=Undefined] optional unsigned long index);
+    getter DOMString? item([Default=Undefined] optional unsigned long index);
     [RaisesException] void deleteMedium([Default=Undefined] optional DOMString oldMedium);
     [RaisesException] void appendMedium([Default=Undefined] optional DOMString newMedium);
 

Modified: trunk/Source/WebCore/css/StyleSheet.idl (197059 => 197060)


--- trunk/Source/WebCore/css/StyleSheet.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/css/StyleSheet.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -26,12 +26,12 @@
     CustomToJSObject,
     ObjCPolymorphic,
 ] interface StyleSheet {
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString        type;
+    readonly attribute DOMString?       type;
              attribute boolean          disabled;
     readonly attribute Node             ownerNode;
     readonly attribute StyleSheet       parentStyleSheet;
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString        href;
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString        title;
+    readonly attribute DOMString?       href;
+    readonly attribute DOMString?       title;
     readonly attribute MediaList        media;
 };
 

Modified: trunk/Source/WebCore/dom/Attr.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/Attr.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/Attr.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -26,11 +26,11 @@
 
     // DOM Level 1
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString name;
+    readonly attribute DOMString? name;
 
     readonly attribute boolean specified;
 
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString value;
+    [SetterRaisesException] attribute DOMString? value;
 
     // DOM Level 2
 

Modified: trunk/Source/WebCore/dom/CharacterData.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/CharacterData.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/CharacterData.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -23,7 +23,7 @@
 
     readonly attribute unsigned long length;
     
-    [TreatReturnedNullStringAs=Null, ObjCLegacyUnnamedParameters, RaisesException] DOMString substringData(unsigned long offset, unsigned long length);
+    [ObjCLegacyUnnamedParameters, RaisesException] DOMString? substringData(unsigned long offset, unsigned long length);
 
     void appendData(DOMString data);
 

Modified: trunk/Source/WebCore/dom/DOMStringList.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/DOMStringList.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/DOMStringList.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -28,7 +28,7 @@
     ImplementationLacksVTable,
 ] interface DOMStringList {
     readonly attribute unsigned long length;
-    [TreatReturnedNullStringAs=Null] getter DOMString item([Default=Undefined] optional unsigned long index);
+    getter DOMString? item([Default=Undefined] optional unsigned long index);
     boolean contains([Default=Undefined] optional DOMString string);
 };
 

Modified: trunk/Source/WebCore/dom/Document.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/Document.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/Document.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -69,8 +69,8 @@
 
     [ImplementedAs=characterSetWithUTF8Fallback] readonly attribute DOMString inputEncoding;
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString xmlEncoding;
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString xmlVersion;
+    readonly attribute DOMString? xmlEncoding;
+    [SetterRaisesException] attribute DOMString? xmlVersion;
     [SetterRaisesException] attribute boolean xmlStandalone;
 
     [RaisesException] Node               adoptNode([Default=Undefined] optional Node source);
@@ -80,7 +80,7 @@
     // (see http://www.w3.org/TR/2011/WD-dom-20110915/#document). We need to keep
     // the writable version around for Objective C clients, but are moving to
     // read-only for other clients.
-             [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString documentURI;
+    attribute DOMString? documentURI;
 #else
     [ImplementedAs=urlForBindings] readonly attribute DOMString documentURI;
 #endif
@@ -208,8 +208,8 @@
 
     // WebKit extensions
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString preferredStylesheetSet;
-             [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString selectedStylesheetSet;
+    readonly attribute DOMString? preferredStylesheetSet;
+    attribute DOMString? selectedStylesheetSet;
 
 #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
     CSSStyleDeclaration createCSSStyleDeclaration();

Modified: trunk/Source/WebCore/dom/DocumentType.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/DocumentType.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/DocumentType.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -35,7 +35,7 @@
 
     readonly attribute DOMString publicId;
     readonly attribute DOMString systemId;
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString internalSubset;
+    readonly attribute DOMString? internalSubset;
 };
 
 DocumentType implements ChildNode;

Modified: trunk/Source/WebCore/dom/Element.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/Element.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/Element.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -25,9 +25,9 @@
 
     // DOM Level 1 Core
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString tagName;
+    readonly attribute DOMString? tagName;
 
-    [TreatReturnedNullStringAs=Null] DOMString getAttribute([Default=Undefined] optional DOMString name);
+    DOMString? getAttribute([Default=Undefined] optional DOMString name);
     [ObjCLegacyUnnamedParameters, RaisesException] void setAttribute([Default=Undefined] optional DOMString name,
                                      [Default=Undefined] optional DOMString value);
     void removeAttribute([Default=Undefined] optional DOMString name);
@@ -49,7 +49,7 @@
 
     // DOM Level 2 Core
 
-    [ObjCLegacyUnnamedParameters, TreatReturnedNullStringAs=Null] DOMString getAttributeNS([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
+    [ObjCLegacyUnnamedParameters] DOMString? getAttributeNS([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
                                             [Default=Undefined] optional DOMString localName);
     [ObjCLegacyUnnamedParameters, RaisesException] void setAttributeNS([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
                                        [Default=Undefined] optional DOMString qualifiedName, 

Modified: trunk/Source/WebCore/dom/Entity.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/Entity.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/Entity.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -23,9 +23,9 @@
     NoInterfaceObject,
     ImplementationLacksVTable
 ] interface Entity : Node {
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString publicId;
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString systemId;
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString notationName;
+    readonly attribute DOMString? publicId;
+    readonly attribute DOMString? systemId;
+    readonly attribute DOMString? notationName;
 };
 
 #endif

Modified: trunk/Source/WebCore/dom/MutationRecord.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/MutationRecord.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/MutationRecord.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -39,8 +39,8 @@
     readonly attribute Node previousSibling;
     readonly attribute Node nextSibling;
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString attributeName;
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString attributeNamespace;
+    readonly attribute DOMString? attributeName;
+    readonly attribute DOMString? attributeNamespace;
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString oldValue;
+    readonly attribute DOMString? oldValue;
 };

Modified: trunk/Source/WebCore/dom/Node.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/Node.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/Node.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -46,10 +46,10 @@
     const unsigned short      DOCUMENT_FRAGMENT_NODE         = 11;
     const unsigned short      NOTATION_NODE                  = 12;
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString        nodeName;
+    readonly attribute DOMString?        nodeName;
 
     // FIXME: the spec says this can also raise on retrieval.
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString nodeValue;
+    [SetterRaisesException] attribute DOMString? nodeValue;
 
     readonly attribute unsigned short   nodeType;
     readonly attribute Node             parentNode;
@@ -80,9 +80,9 @@
                                        [TreatNullAs=NullString,Default=Undefined] optional DOMString version);
 #endif
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString        namespaceURI;
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString prefix;
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString        localName;
+    readonly attribute DOMString?        namespaceURI;
+    [SetterRaisesException] attribute DOMString? prefix;
+    readonly attribute DOMString?        localName;
 
 #if defined(LANGUAGE_OBJECTIVE_C)
     readonly attribute NamedNodeMap     attributes;
@@ -92,16 +92,16 @@
 
     // Introduced in DOM Level 3:
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString       baseURI;
+    readonly attribute DOMString?       baseURI;
 
     // FIXME: the spec says this can also raise on retrieval.
-    [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, TreatUndefinedAs=NullString, SetterRaisesException] attribute DOMString textContent;
+    [SetterRaisesException] attribute DOMString? textContent;
 
     boolean            isSameNode([Default=Undefined] optional Node other);
     boolean            isEqualNode([Default=Undefined] optional Node other);
-    [TreatReturnedNullStringAs=Null] DOMString          lookupPrefix([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
+    DOMString?         lookupPrefix([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
     boolean            isDefaultNamespace([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
-    [TreatReturnedNullStringAs=Null] DOMString          lookupNamespaceURI([TreatNullAs=NullString,Default=Undefined] optional DOMString prefix);
+    DOMString?         lookupNamespaceURI([TreatNullAs=NullString,Default=Undefined] optional DOMString prefix);
 
     // DocumentPosition
     const unsigned short      DOCUMENT_POSITION_DISCONNECTED = 0x01;

Modified: trunk/Source/WebCore/dom/ProcessingInstruction.idl (197059 => 197060)


--- trunk/Source/WebCore/dom/ProcessingInstruction.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/dom/ProcessingInstruction.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -25,7 +25,7 @@
 
     // DOM Level 1
 
-    [TreatReturnedNullStringAs=Null] readonly attribute DOMString target;
+    readonly attribute DOMString? target;
 
     // interface LinkStyle from DOM Level 2 Style Sheets
     readonly attribute StyleSheet sheet;

Modified: trunk/Source/WebCore/html/DOMSettableTokenList.idl (197059 => 197060)


--- trunk/Source/WebCore/html/DOMSettableTokenList.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/html/DOMSettableTokenList.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -31,7 +31,7 @@
 ] interface DOMSettableTokenList : DOMTokenList {
     attribute DOMString value;
 
-    [TreatReturnedNullStringAs=Null] getter DOMString (unsigned long index);
+    getter DOMString? (unsigned long index);
 };
 
 #endif

Modified: trunk/Source/WebCore/html/DOMTokenList.idl (197059 => 197060)


--- trunk/Source/WebCore/html/DOMTokenList.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/html/DOMTokenList.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -28,7 +28,7 @@
     SkipVTableValidation,
 ] interface DOMTokenList {
     readonly attribute unsigned long length;
-    [TreatReturnedNullStringAs=Null] getter DOMString item(unsigned long index);
+    getter DOMString? item(unsigned long index);
     [RaisesException] boolean contains(DOMString token);
     [RaisesException] void add(DOMString... tokens);
     [RaisesException] void remove(DOMString... tokens);

Modified: trunk/Source/WebCore/html/DOMURL.idl (197059 => 197060)


--- trunk/Source/WebCore/html/DOMURL.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/html/DOMURL.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -35,7 +35,7 @@
     InterfaceName=URL,
     ImplementationLacksVTable,
 ] interface DOMURL {
-    [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(Blob? blob);
+    [CallWith=ScriptExecutionContext] static DOMString? createObjectURL(Blob? blob);
     [CallWith=ScriptExecutionContext] static void revokeObjectURL(DOMString url);
 };
 

Modified: trunk/Source/WebCore/html/canvas/WebGLDebugShaders.idl (197059 => 197060)


--- trunk/Source/WebCore/html/canvas/WebGLDebugShaders.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/html/canvas/WebGLDebugShaders.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -28,5 +28,5 @@
     Conditional=WEBGL,
     GenerateIsReachable=ImplWebGLRenderingContext,
 ] interface WebGLDebugShaders {
-    [StrictTypeChecking, TreatReturnedNullStringAs=Null, RaisesException] DOMString getTranslatedShaderSource(WebGLShader shader);
+    [StrictTypeChecking, RaisesException] DOMString? getTranslatedShaderSource(WebGLShader shader);
 };

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl (197059 => 197060)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -554,15 +554,15 @@
     [StrictTypeChecking, Custom, RaisesException] any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, GLenum pname);
     [StrictTypeChecking, Custom, RaisesException] any getParameter(GLenum pname);
     [StrictTypeChecking, Custom, RaisesException] any getProgramParameter(WebGLProgram program, GLenum pname);
-    [StrictTypeChecking, TreatReturnedNullStringAs=Null, RaisesException] DOMString getProgramInfoLog(WebGLProgram program);
+    [StrictTypeChecking, RaisesException] DOMString? getProgramInfoLog(WebGLProgram program);
     [StrictTypeChecking, Custom, RaisesException] any getRenderbufferParameter(GLenum target, GLenum pname);
     [StrictTypeChecking, Custom, RaisesException] any getShaderParameter(WebGLShader shader, GLenum pname);
 
-    [StrictTypeChecking, TreatReturnedNullStringAs=Null, RaisesException] DOMString    getShaderInfoLog(WebGLShader shader);
+    [StrictTypeChecking, RaisesException] DOMString?    getShaderInfoLog(WebGLShader shader);
 
     [StrictTypeChecking, RaisesException] WebGLShaderPrecisionFormat getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
 
-    [StrictTypeChecking, TreatReturnedNullStringAs=Null, RaisesException] DOMString    getShaderSource(WebGLShader shader);
+    [StrictTypeChecking, RaisesException] DOMString?    getShaderSource(WebGLShader shader);
 
     [StrictTypeChecking, Custom] sequence<DOMString> getSupportedExtensions();
 

Modified: trunk/Source/WebCore/page/DOMWindow.idl (197059 => 197060)


--- trunk/Source/WebCore/page/DOMWindow.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -74,7 +74,7 @@
 
     void alert([Default=Undefined] optional DOMString message);
     boolean confirm([Default=Undefined] optional DOMString message);
-    [TreatReturnedNullStringAs=Null] DOMString prompt([Default=Undefined] optional DOMString message,
+    DOMString? prompt([Default=Undefined] optional DOMString message,
                                                 [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString defaultValue);
 
     boolean find([Default=Undefined] optional DOMString string,

Modified: trunk/Source/WebCore/storage/Storage.idl (197059 => 197060)


--- trunk/Source/WebCore/storage/Storage.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/storage/Storage.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -31,8 +31,8 @@
     SkipVTableValidation,
 ] interface Storage {
     [GetterRaisesException] readonly attribute unsigned long length;
-    [TreatReturnedNullStringAs=Null, RaisesException] DOMString key(unsigned long index);
-    [TreatReturnedNullStringAs=Null, RaisesException] getter DOMString getItem(DOMString key);
+    [RaisesException] DOMString? key(unsigned long index);
+    [RaisesException] getter DOMString? getItem(DOMString key);
     [RaisesException] void setItem(DOMString key, DOMString data);
     [RaisesException] void removeItem(DOMString key);
     [RaisesException] void clear();

Modified: trunk/Source/WebCore/storage/StorageEvent.idl (197059 => 197060)


--- trunk/Source/WebCore/storage/StorageEvent.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/storage/StorageEvent.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -27,8 +27,8 @@
     ConstructorTemplate=Event,
 ] interface StorageEvent : Event {
     [InitializedByEventConstructor] readonly attribute DOMString key;
-    [InitializedByEventConstructor, TreatReturnedNullStringAs=Null] readonly attribute DOMString oldValue;
-    [InitializedByEventConstructor, TreatReturnedNullStringAs=Null] readonly attribute DOMString newValue;
+    [InitializedByEventConstructor] readonly attribute DOMString? oldValue;
+    [InitializedByEventConstructor] readonly attribute DOMString? newValue;
     [InitializedByEventConstructor] readonly attribute DOMString url;
     [InitializedByEventConstructor] readonly attribute Storage storageArea;
 

Modified: trunk/Source/WebCore/xml/XMLHttpRequest.idl (197059 => 197060)


--- trunk/Source/WebCore/xml/XMLHttpRequest.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -70,8 +70,8 @@
 
     // response
     [TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders();
-    [TreatReturnedNullStringAs=Null] DOMString getResponseHeader(DOMString header);
-    [GetterRaisesException, CustomGetter] readonly attribute DOMString responseText; // The custom getter implements TreatReturnedNullStringAs=Null
+    DOMString? getResponseHeader(DOMString header);
+    [GetterRaisesException, CustomGetter] readonly attribute DOMString? responseText;
     [GetterRaisesException] readonly attribute Document responseXML;
 
     [SetterRaisesException] attribute XMLHttpRequestResponseType responseType;

Modified: trunk/Source/WebCore/xml/XPathNSResolver.idl (197059 => 197060)


--- trunk/Source/WebCore/xml/XPathNSResolver.idl	2016-02-25 01:28:51 UTC (rev 197059)
+++ trunk/Source/WebCore/xml/XPathNSResolver.idl	2016-02-25 02:39:19 UTC (rev 197060)
@@ -23,6 +23,6 @@
     ObjCProtocol,
     SkipVTableValidation,
 ] interface XPathNSResolver {
-    [TreatReturnedNullStringAs=Null] DOMString lookupNamespaceURI([Default=Undefined] optional DOMString prefix);
+    DOMString? lookupNamespaceURI([Default=Undefined] optional DOMString prefix);
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to