⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 197060 in webkit


Ignore:
Timestamp:
Feb 24, 2016, 6:39:19 PM (11 years ago)
Author:
Chris Dumez
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:
Location:
trunk/Source/WebCore
Files:
46 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r197058 r197060  
     12016-02-24  Chris Dumez  <cdumez@apple.com>
     2
     3        Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute
     4        https://bugs.webkit.org/show_bug.cgi?id=154659
     5
     6        Reviewed by Sam Weinig.
     7
     8        Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute and
     9        use nullable DOMString types instead:
     10        http://heycam.github.io/webidl/#idl-nullable-type
     11
     12        This is the standard way of doing things. We already had support
     13        in the bindings generator for nullable DOMString attributes so
     14        we now just leverage this support. However, our IDL parser did
     15        not correctly parse nullable DOMString return values for operations.
     16        This patch fixes this.
     17
     18        This patch also drops [TreatNullAs=NullString] and
     19        [TreatUndefinedAs=NullString] for writable DOMString attributes that
     20        are now marked as nullable because they are implied.
     21
     22        * Modules/fetch/FetchHeaders.idl:
     23        * Modules/indexeddb/IDBObjectStore.idl:
     24        * Modules/mediasource/DOMURLMediaSource.idl:
     25        * Modules/mediastream/DOMURLMediaStream.idl:
     26        * Modules/websockets/WebSocket.idl:
     27        * bindings/scripts/CodeGeneratorJS.pm:
     28        (NativeToJSValue): Deleted.
     29        * bindings/scripts/IDLAttributes.txt:
     30        * bindings/scripts/IDLParser.pm:
     31        (parseAttributeOrOperationRest):
     32        (parseOperationOrIterator):
     33        (parseSpecialOperation):
     34        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
     35        (webkit_dom_test_obj_nullable_string_method):
     36        (webkit_dom_test_obj_nullable_string_special_method):
     37        (webkit_dom_test_obj_conditional_method3): Deleted.
     38        (webkit_dom_test_obj_convert1): Deleted.
     39        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
     40        * bindings/scripts/test/JS/JSTestObj.cpp:
     41        (WebCore::JSTestObj::getOwnPropertySlot):
     42        (WebCore::JSTestObj::getOwnPropertySlotByIndex):
     43        (WebCore::JSTestObj::getOwnPropertyNames):
     44        (WebCore::jsTestObjPrototypeFunctionNullableStringMethod):
     45        (WebCore::jsTestObjConstructorFunctionNullableStringStaticMethod):
     46        (WebCore::jsTestObjPrototypeFunctionNullableStringSpecialMethod):
     47        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence): Deleted.
     48        (WebCore::jsTestObjPrototypeFunctionMethodWithAndWithoutNullableSequence2): Deleted.
     49        * bindings/scripts/test/JS/JSTestObj.h:
     50        * bindings/scripts/test/ObjC/DOMTestObj.h:
     51        * bindings/scripts/test/ObjC/DOMTestObj.mm:
     52        (-[DOMTestObj nullableStringMethod]):
     53        (-[DOMTestObj nullableStringStaticMethod]):
     54        (-[DOMTestObj nullableStringSpecialMethod:]):
     55        (-[DOMTestObj overloadedMethod1:]): Deleted.
     56        (-[DOMTestObj getSVGDocument]): Deleted.
     57        * bindings/scripts/test/TestObj.idl:
     58        * css/CSSCharsetRule.idl:
     59        * css/CSSImportRule.idl:
     60        * css/CSSKeyframesRule.idl:
     61        * css/CSSPageRule.idl:
     62        * css/CSSRule.idl:
     63        * css/CSSStyleDeclaration.idl:
     64        * css/CSSStyleRule.idl:
     65        * css/CSSValue.idl:
     66        * css/MediaList.idl:
     67        * css/StyleSheet.idl:
     68        * dom/Attr.idl:
     69        * dom/CharacterData.idl:
     70        * dom/DOMStringList.idl:
     71        * dom/Document.idl:
     72        * dom/DocumentType.idl:
     73        * dom/Element.idl:
     74        * dom/Entity.idl:
     75        * dom/MutationRecord.idl:
     76        * dom/Node.idl:
     77        * dom/ProcessingInstruction.idl:
     78        * html/DOMSettableTokenList.idl:
     79        * html/DOMTokenList.idl:
     80        * html/DOMURL.idl:
     81        * html/canvas/WebGLDebugShaders.idl:
     82        * html/canvas/WebGLRenderingContextBase.idl:
     83        * page/DOMWindow.idl:
     84        * storage/Storage.idl:
     85        * storage/StorageEvent.idl:
     86        * xml/XMLHttpRequest.idl:
     87        * xml/XPathNSResolver.idl:
     88
    1892016-02-24  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
    290
  • trunk/Source/WebCore/Modules/fetch/FetchHeaders.idl

    r197026 r197060  
    3737    [RaisesException] void append(DOMString name, DOMString value);
    3838    [RaisesException, ImplementedAs=remove] void delete(DOMString name);
    39     [RaisesException, TreatReturnedNullStringAs=Null] DOMString get(DOMString name);
     39    [RaisesException] DOMString? get(DOMString name);
    4040    [RaisesException] boolean has(DOMString name);
    4141    [RaisesException] void set(DOMString name, DOMString value);
  • trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl

    r196482 r197060  
    3131    GenerateIsReachable=Impl,
    3232] interface IDBObjectStore {
    33     [TreatReturnedNullStringAs=Null] readonly attribute DOMString name;
     33    readonly attribute DOMString? name;
    3434    [ImplementedAs=keyPathAny] readonly attribute IDBAny keyPath;
    3535    readonly attribute DOMStringList indexNames;
  • trunk/Source/WebCore/Modules/mediasource/DOMURLMediaSource.idl

    r158288 r197060  
    3232]
    3333partial interface DOMURL {
    34     [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaSource? source);
     34    [CallWith=ScriptExecutionContext] static DOMString? createObjectURL(MediaSource? source);
    3535};
  • trunk/Source/WebCore/Modules/mediastream/DOMURLMediaStream.idl

    r157054 r197060  
    3232]
    3333partial interface DOMURL {
    34     [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(MediaStream? stream);
     34    [CallWith=ScriptExecutionContext] static DOMString? createObjectURL(MediaStream? stream);
    3535};
  • trunk/Source/WebCore/Modules/websockets/WebSocket.idl

    r196568 r197060  
    5858    attribute EventHandler onclose;
    5959
    60     [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString protocol;
    61     [TreatReturnedNullStringAs=Undefined] readonly attribute DOMString extensions;
     60    readonly attribute DOMString? protocol;
     61    readonly attribute DOMString? extensions;
    6262
    6363    attribute DOMString binaryType;
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r197028 r197060  
    42634263        my $conv = $signature->extendedAttributes->{"TreatReturnedNullStringAs"};
    42644264        if (defined $conv) {
    4265             return "jsStringOrNull(state, $value)" if $conv eq "Null";
    42664265            return "jsStringOrUndefined(state, $value)" if $conv eq "Undefined";
    42674266
  • trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt

    r196568 r197060  
    122122TreatNullAs=NullString
    123123TreatReturnedNaNDateAs=Null|NaN
    124 TreatReturnedNullStringAs=Null|Undefined
     124TreatReturnedNullStringAs=Undefined
    125125TreatUndefinedAs=NullString
    126126TypedArray=*
  • trunk/Source/WebCore/bindings/scripts/IDLParser.pm

    r196900 r197060  
    11261126        my $interface = $self->parseOperationRest($extendedAttributeList);
    11271127        if (defined ($interface)) {
    1128             $interface->signature->type($returnType);
     1128            if (typeHasNullableSuffix($returnType)) {
     1129                $interface->signature->isNullable(1);
     1130            } else {
     1131                $interface->signature->isNullable(0);
     1132            }
     1133            $interface->signature->type(typeRemoveNullableSuffix($returnType));
    11291134        }
    11301135        return $interface;
    … …  
    12241229        if ($next->type() == IdentifierToken || $next->value() eq "(") {
    12251230            my $operation = $self->parseOperationRest($extendedAttributeList);
    1226             $operation->signature->type($returnType);
     1231            if (typeHasNullableSuffix($returnType)) {
     1232                $operation->signature->isNullable(1);
     1233            } else {
     1234                $operation->signature->isNullable(0);
     1235            }
     1236            $operation->signature->type(typeRemoveNullableSuffix($returnType));
     1237
    12271238            return $operation;
    12281239        }
    … …  
    12431254        my $interface = $self->parseOperationRest($extendedAttributeList);
    12441255        if (defined ($interface)) {
    1245             $interface->signature->type($returnType);
    1246              $interface->signature->specials(\@specials);
     1256            if (typeHasNullableSuffix($returnType)) {
     1257                $interface->signature->isNullable(1);
     1258            } else {
     1259                $interface->signature->isNullable(0);
     1260            }
     1261            $interface->signature->type(typeRemoveNullableSuffix($returnType));
     1262
     1263            $interface->signature->specials(\@specials);
    12471264        }
    12481265        return $interface;
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp

    r196894 r197060  
    12531253}
    12541254
     1255gchar* webkit_dom_test_obj_nullable_string_method(WebKitDOMTestObj* self)
     1256{
     1257    WebCore::JSMainThreadNullState state;
     1258    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
     1259    WebCore::TestObj* item = WebKit::core(self);
     1260    gchar* result = convertToUTF8String(item->nullableStringMethod());
     1261    return result;
     1262}
     1263
     1264gchar* webkit_dom_test_obj_nullable_string_special_method(WebKitDOMTestObj* self, gulong index)
     1265{
     1266    WebCore::JSMainThreadNullState state;
     1267    g_return_val_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self), 0);
     1268    WebCore::TestObj* item = WebKit::core(self);
     1269    gchar* result = convertToUTF8String(item->nullableStringSpecialMethod(index));
     1270    return result;
     1271}
     1272
    12551273void webkit_dom_test_obj_method_with_enum_arg(WebKitDOMTestObj* self, WebKitDOMTestEnumType* enumArg)
    12561274{
    … …  
    15481566    WebCore::TestNode* convertedValue = WebKit::core(value);
    15491567    item->convert1(convertedValue);
    1550 }
    1551 
    1552 void webkit_dom_test_obj_convert2(WebKitDOMTestObj* self, WebKitDOMTestNode* value)
    1553 {
    1554     WebCore::JSMainThreadNullState state;
    1555     g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
    1556     g_return_if_fail(WEBKIT_DOM_IS_TEST_NODE(value));
    1557     WebCore::TestObj* item = WebKit::core(self);
    1558     WebCore::TestNode* convertedValue = WebKit::core(value);
    1559     item->convert2(convertedValue);
    15601568}
    15611569
  • trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h

    r196894 r197060  
    248248
    249249/**
     250 * webkit_dom_test_obj_nullable_string_method:
     251 * @self: A #WebKitDOMTestObj
     252 *
     253 * Returns: A #gchar
     254 *
     255 * Stability: Unstable
     256**/
     257WEBKIT_API gchar*
     258webkit_dom_test_obj_nullable_string_method(WebKitDOMTestObj* self);
     259
     260/**
     261 * webkit_dom_test_obj_nullable_string_special_method:
     262 * @self: A #WebKitDOMTestObj
     263 * @index: A #gulong
     264 *
     265 * Returns: A #gchar
     266 *
     267 * Stability: Unstable
     268**/
     269WEBKIT_API gchar*
     270webkit_dom_test_obj_nullable_string_special_method(WebKitDOMTestObj* self, gulong index);
     271
     272/**
    250273 * webkit_dom_test_obj_method_with_enum_arg:
    251274 * @self: A #WebKitDOMTestObj
    … …  
    525548WEBKIT_API void
    526549webkit_dom_test_obj_convert1(WebKitDOMTestObj* self, WebKitDOMTestNode* value);
    527 
    528 /**
    529  * webkit_dom_test_obj_convert2:
    530  * @self: A #WebKitDOMTestObj
    531  * @value: A #WebKitDOMTestNode
    532  *
    533  * Stability: Unstable
    534 **/
    535 WEBKIT_API void
    536 webkit_dom_test_obj_convert2(WebKitDOMTestObj* self, WebKitDOMTestNode* value);
    537550
    538551/**
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r196900 r197060  
    6464#include <runtime/JSArray.h>
    6565#include <runtime/JSString.h>
     66#include <runtime/PropertyNameArray.h>
    6667#include <runtime/Symbol.h>
    6768#include <wtf/GetPtr.h>
    … …  
    100101JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(JSC::ExecState*);
    101102JSC::EncodedJSValue JSC_HOST_CALL jsTestObjInstanceFunctionUnforgeableMethod(JSC::ExecState*);
     103JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringMethod(JSC::ExecState*);
     104JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionNullableStringStaticMethod(JSC::ExecState*);
     105JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringSpecialMethod(JSC::ExecState*);
    102106JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
    103107JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(JSC::ExecState*);
    … …  
    164168JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(JSC::ExecState*);
    165169JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(JSC::ExecState*);
    166 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(JSC::ExecState*);
    167170JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(JSC::ExecState*);
    168171JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(JSC::ExecState*);
    … …  
    444447    { "TestSubObj", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorTestSubObj), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
    445448    { "staticReadOnlySymbolAttr", DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjConstructorStaticReadOnlySymbolAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
     449    { "nullableStringStaticMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionNullableStringStaticMethod), (intptr_t) (0) } },
    446450    { "staticMethodWithCallbackAndOptionalArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
    447451    { "staticMethodWithCallbackArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjConstructorFunctionStaticMethodWithCallbackArg), (intptr_t) (1) } },
    … …  
    612616    { "objMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethod), (intptr_t) (0) } },
    613617    { "objMethodWithArgs", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionObjMethodWithArgs), (intptr_t) (3) } },
     618    { "nullableStringMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionNullableStringMethod), (intptr_t) (0) } },
     619    { "nullableStringSpecialMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionNullableStringSpecialMethod), (intptr_t) (1) } },
    614620    { "methodWithSequenceArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) } },
    615621    { "methodReturningSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodReturningSequence), (intptr_t) (1) } },
    … …  
    685691    { "getSVGDocument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetSVGDocument), (intptr_t) (0) } },
    686692    { "convert1", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert1), (intptr_t) (1) } },
    687     { "convert2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert2), (intptr_t) (1) } },
    688693    { "convert4", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert4), (intptr_t) (1) } },
    689694    { "convert5", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert5), (intptr_t) (1) } },
    … …  
    763768    auto* thisObject = jsCast<JSTestObj*>(object);
    764769    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     770    Optional<uint32_t> optionalIndex = parseIndex(propertyName);
     771    if (optionalIndex) {
     772        unsigned index = optionalIndex.value();
     773        unsigned attributes = DontDelete | ReadOnly;
     774        slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index)));
     775        return true;
     776    }
    765777    if (getStaticPropertySlot<JSTestObj, Base>(state, JSTestObjTable, thisObject, propertyName, slot))
    766778        return true;
    767779    return false;
     780}
     781
     782bool JSTestObj::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)
     783{
     784    auto* thisObject = jsCast<JSTestObj*>(object);
     785    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     786    if (index <= MAX_ARRAY_INDEX) {
     787        unsigned attributes = DontDelete | ReadOnly;
     788        slot.setValue(thisObject, attributes, jsStringOrUndefined(state, thisObject->wrapped().item(index)));
     789        return true;
     790    }
     791    return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
    768792}
    769793
    … …  
    30763100
    30773101
     3102void JSTestObj::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
     3103{
     3104    auto* thisObject = jsCast<JSTestObj*>(object);
     3105    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     3106    for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)
     3107        propertyNames.add(Identifier::from(state, i));
     3108    Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
     3109}
     3110
    30783111JSValue JSTestObj::getConstructor(VM& vm, const JSGlobalObject* globalObject)
    30793112{
    … …  
    32653298    auto& impl = castedThis->wrapped();
    32663299    JSValue result = jsNumber(impl.unforgeableMethod());
     3300    return JSValue::encode(result);
     3301}
     3302
     3303EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringMethod(ExecState* state)
     3304{
     3305    JSValue thisValue = state->thisValue();
     3306    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3307    if (UNLIKELY(!castedThis))
     3308        return throwThisTypeError(*state, "TestObj", "nullableStringMethod");
     3309    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
     3310    auto& impl = castedThis->wrapped();
     3311    JSValue result = jsStringOrNull(state, impl.nullableStringMethod());
     3312    return JSValue::encode(result);
     3313}
     3314
     3315EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionNullableStringStaticMethod(ExecState* state)
     3316{
     3317    JSValue result = jsStringOrNull(state, TestObj::nullableStringStaticMethod());
     3318    return JSValue::encode(result);
     3319}
     3320
     3321EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringSpecialMethod(ExecState* state)
     3322{
     3323    JSValue thisValue = state->thisValue();
     3324    auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
     3325    if (UNLIKELY(!castedThis))
     3326        return throwThisTypeError(*state, "TestObj", "nullableStringSpecialMethod");
     3327    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
     3328    auto& impl = castedThis->wrapped();
     3329    if (UNLIKELY(state->argumentCount() < 1))
     3330        return throwVMError(state, createNotEnoughArgumentsError(state));
     3331    unsigned index = toUInt32(state, state->argument(0), NormalConversion);
     3332    if (UNLIKELY(state->hadException()))
     3333        return JSValue::encode(jsUndefined());
     3334    JSValue result = jsStringOrNull(state, impl.nullableStringSpecialMethod(index));
    32673335    return JSValue::encode(result);
    32683336}
    … …  
    45594627}
    45604628
    4561 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* state)
    4562 {
    4563     JSValue thisValue = state->thisValue();
    4564     auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
    4565     if (UNLIKELY(!castedThis))
    4566         return throwThisTypeError(*state, "TestObj", "convert2");
    4567     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
    4568     auto& impl = castedThis->wrapped();
    4569     if (UNLIKELY(state->argumentCount() < 1))
    4570         return throwVMError(state, createNotEnoughArgumentsError(state));
    4571     TestNode* value = JSTestNode::toWrapped(state->argument(0));
    4572     if (UNLIKELY(state->hadException()))
    4573         return JSValue::encode(jsUndefined());
    4574     impl.convert2(value);
    4575     return JSValue::encode(jsUndefined());
    4576 }
    4577 
    45784629EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* state)
    45794630{
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h

    r197028 r197060  
    4444    static TestObj* toWrapped(JSC::JSValue);
    4545    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
     46    static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
    4647    static void destroy(JSC::JSCell*);
    4748
    … …  
    5354    }
    5455
     56    static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode());
    5557    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
    5658    mutable JSC::WriteBarrier<JSC::Unknown> m_cachedAttribute1;
    … …  
    6870    static JSC::JSValue classMethod2(JSC::ExecState&);
    6971public:
    70     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
     72    static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | Base::StructureFlags;
    7173protected:
    7274    JSTestObj(JSC::Structure*, JSDOMGlobalObject&, Ref<TestObj>&&);
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h

    r196894 r197060  
    144144- (DOMTestObj *)objMethodWithArgs:(int)longArg strArg:(NSString *)strArg objArg:(DOMTestObj *)objArg;
    145145- (int)unforgeableMethod;
     146- (NSString *)nullableStringMethod;
     147- (NSString *)nullableStringStaticMethod;
     148- (NSString *)nullableStringSpecialMethod:(unsigned)index;
    146149- (void)methodWithEnumArg:(DOMTestEnumType *)enumArg;
    147150- (void)methodWithOptionalEnumArgAndDefaultValue:(DOMTestEnumType *)enumArg;
    … …  
    177180- (DOMSVGDocument *)getSVGDocument;
    178181- (void)convert1:(DOMTestNode *)value;
    179 - (void)convert2:(DOMTestNode *)value;
    180182- (void)convert4:(DOMTestNode *)value;
    181183- (void)convert5:(DOMTestNode *)value;
  • trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm

    r196894 r197060  
    982982}
    983983
     984- (NSString *)nullableStringMethod
     985{
     986    WebCore::JSMainThreadNullState state;
     987    return IMPL->nullableStringMethod();
     988}
     989
     990- (NSString *)nullableStringStaticMethod
     991{
     992    WebCore::JSMainThreadNullState state;
     993    return IMPL->nullableStringStaticMethod();
     994}
     995
     996- (NSString *)nullableStringSpecialMethod:(unsigned)index
     997{
     998    WebCore::JSMainThreadNullState state;
     999    return IMPL->nullableStringSpecialMethod(index);
     1000}
     1001
    9841002- (void)methodWithEnumArg:(DOMTestEnumType *)enumArg
    9851003{
    … …  
    12661284    WebCore::JSMainThreadNullState state;
    12671285    IMPL->convert1(core(value));
    1268 }
    1269 
    1270 - (void)convert2:(DOMTestNode *)value
    1271 {
    1272     WebCore::JSMainThreadNullState state;
    1273     IMPL->convert2(core(value));
    12741286}
    12751287
  • trunk/Source/WebCore/bindings/scripts/test/TestObj.idl

    r196900 r197060  
    9898    [Unforgeable] long unforgeableMethod();
    9999
     100    // Nullable String return values.
     101    DOMString? nullableStringMethod();
     102    static DOMString? nullableStringStaticMethod();
     103    getter DOMString? nullableStringSpecialMethod(unsigned long index);
     104
    100105    void methodWithSequenceArg(sequence<ScriptProfile> sequenceArg);
    101106    sequence<ScriptProfile> methodReturningSequence(long longArg);
    … …  
    257262    [CheckSecurityForNode, RaisesException] SVGDocument getSVGDocument();
    258263
    259     void convert1([TreatReturnedNullStringAs=Null] TestNode value);
    260     void convert2([TreatReturnedNullStringAs=Undefined] TestNode value);
     264    void convert1(TestNode value);
    261265    void convert4([TreatNullAs=NullString] TestNode value);
    262266    void convert5([TreatNullAs=NullString, TreatUndefinedAs=NullString] TestNode value);
  • trunk/Source/WebCore/css/CSSCharsetRule.idl

    r151321 r197060  
    2222interface CSSCharsetRule : CSSRule {
    2323#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
    24     [TreatReturnedNullStringAs=Null] readonly attribute DOMString encoding;
     24    readonly attribute DOMString? encoding;
    2525#else
    26     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString encoding;
     26    [SetterRaisesException] attribute DOMString? encoding;
    2727#endif
    2828};
  • trunk/Source/WebCore/css/CSSImportRule.idl

    r131172 r197060  
    2121// Introduced in DOM Level 2:
    2222interface CSSImportRule : CSSRule {
    23     [TreatReturnedNullStringAs=Null] readonly attribute DOMString href;
     23    readonly attribute DOMString? href;
    2424    readonly attribute MediaList media;
    2525    readonly attribute CSSStyleSheet styleSheet;
  • trunk/Source/WebCore/css/CSSKeyframesRule.idl

    r176157 r197060  
    2828
    2929interface CSSKeyframesRule : CSSRule {
    30 
    31     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString name;
     30    attribute DOMString? name;
    3231    readonly attribute CSSRuleList cssRules;
    3332   
  • trunk/Source/WebCore/css/CSSPageRule.idl

    r131172 r197060  
    2121// Introduced in DOM Level 2:
    2222interface CSSPageRule : CSSRule {
    23 
    24              [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString selectorText;
     23    attribute DOMString? selectorText;
    2524
    2625    readonly attribute CSSStyleDeclaration style;
    27 
    2826};
    2927
  • trunk/Source/WebCore/css/CSSRule.idl

    r176157 r197060  
    5151    readonly attribute unsigned short   type;
    5252
    53     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString cssText;
     53    [SetterRaisesException] attribute DOMString? cssText;
    5454
    5555    readonly attribute CSSStyleSheet    parentStyleSheet;
  • trunk/Source/WebCore/css/CSSStyleDeclaration.idl

    r187813 r197060  
    2929    SkipVTableValidation,
    3030] interface CSSStyleDeclaration {
    31     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString cssText;
     31    [SetterRaisesException] attribute DOMString? cssText;
    3232
    3333    DOMString getPropertyValue([Default=Undefined] DOMString propertyName);
    3434    [Custom] CSSValue           getPropertyCSSValue([Default=Undefined] optional DOMString propertyName);
    35     [TreatReturnedNullStringAs=Null, RaisesException] DOMString          removeProperty([Default=Undefined] optional DOMString propertyName);
    36     [TreatReturnedNullStringAs=Null] DOMString          getPropertyPriority([Default=Undefined] optional DOMString propertyName);
     35    [RaisesException] DOMString          removeProperty([Default=Undefined] optional DOMString propertyName);
     36    DOMString?          getPropertyPriority([Default=Undefined] optional DOMString propertyName);
    3737    [ObjCLegacyUnnamedParameters, RaisesException] void setProperty([Default=Undefined] optional DOMString propertyName,
    3838                                    [TreatNullAs=NullString, Default=Undefined] optional DOMString value,
    … …  
    4444
    4545    // Extensions
    46     [TreatReturnedNullStringAs=Null] DOMString          getPropertyShorthand([Default=Undefined] optional DOMString propertyName);
     46    DOMString?          getPropertyShorthand([Default=Undefined] optional DOMString propertyName);
    4747    boolean            isPropertyImplicit([Default=Undefined] optional DOMString propertyName);
    4848};
  • trunk/Source/WebCore/css/CSSStyleRule.idl

    r131172 r197060  
    2121// Introduced in DOM Level 2:
    2222interface CSSStyleRule : CSSRule {
    23 
    24              [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString selectorText;
     23    attribute DOMString? selectorText;
    2524
    2625    readonly attribute CSSStyleDeclaration style;
    27 
    2826};
    2927
  • trunk/Source/WebCore/css/CSSValue.idl

    r151321 r197060  
    2626    ImplementationLacksVTable
    2727] interface CSSValue {
    28 
    2928    // UnitTypes
    3029    const unsigned short CSS_INHERIT         = 0;
    … …  
    3332    const unsigned short CSS_CUSTOM          = 3;
    3433
    35     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString cssText;
     34    [SetterRaisesException] attribute DOMString? cssText;
    3635
    3736    readonly attribute unsigned short cssValueType;
    38 
    3937};
    4038
  • trunk/Source/WebCore/css/MediaList.idl

    r165676 r197060  
    3131] interface MediaList {
    3232
    33     [TreatNullAs=NullString, TreatReturnedNullStringAs=Null, SetterRaisesException] attribute DOMString mediaText;
     33    [SetterRaisesException] attribute DOMString? mediaText;
    3434    readonly attribute unsigned long length;
    3535
    36     [TreatReturnedNullStringAs=Null] getter DOMString item([Default=Undefined] optional unsigned long index);
     36    getter DOMString? item([Default=Undefined] optional unsigned long index);
    3737    [RaisesException] void deleteMedium([Default=Undefined] optional DOMString oldMedium);
    3838    [RaisesException] void appendMedium([Default=Undefined] optional DOMString newMedium);
  • trunk/Source/WebCore/css/StyleSheet.idl

    r163389 r197060  
    2727    ObjCPolymorphic,
    2828] interface StyleSheet {
    29     [TreatReturnedNullStringAs=Null] readonly attribute DOMString        type;
     29    readonly attribute DOMString?       type;
    3030             attribute boolean          disabled;
    3131    readonly attribute Node             ownerNode;
    3232    readonly attribute StyleSheet       parentStyleSheet;
    33     [TreatReturnedNullStringAs=Null] readonly attribute DOMString        href;
    34     [TreatReturnedNullStringAs=Null] readonly attribute DOMString        title;
     33    readonly attribute DOMString?       href;
     34    readonly attribute DOMString?       title;
    3535    readonly attribute MediaList        media;
    3636};
  • trunk/Source/WebCore/dom/Attr.idl

    r189881 r197060  
    2727    // DOM Level 1
    2828
    29     [TreatReturnedNullStringAs=Null] readonly attribute DOMString name;
     29    readonly attribute DOMString? name;
    3030
    3131    readonly attribute boolean specified;
    3232
    33     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString value;
     33    [SetterRaisesException] attribute DOMString? value;
    3434
    3535    // DOM Level 2
  • trunk/Source/WebCore/dom/CharacterData.idl

    r195264 r197060  
    2424    readonly attribute unsigned long length;
    2525   
    26     [TreatReturnedNullStringAs=Null, ObjCLegacyUnnamedParameters, RaisesException] DOMString substringData(unsigned long offset, unsigned long length);
     26    [ObjCLegacyUnnamedParameters, RaisesException] DOMString? substringData(unsigned long offset, unsigned long length);
    2727
    2828    void appendData(DOMString data);
  • trunk/Source/WebCore/dom/DOMStringList.idl

    r171824 r197060  
    2929] interface DOMStringList {
    3030    readonly attribute unsigned long length;
    31     [TreatReturnedNullStringAs=Null] getter DOMString item([Default=Undefined] optional unsigned long index);
     31    getter DOMString? item([Default=Undefined] optional unsigned long index);
    3232    boolean contains([Default=Undefined] optional DOMString string);
    3333};
  • trunk/Source/WebCore/dom/Document.idl

    r196954 r197060  
    7070    [ImplementedAs=characterSetWithUTF8Fallback] readonly attribute DOMString inputEncoding;
    7171
    72     [TreatReturnedNullStringAs=Null] readonly attribute DOMString xmlEncoding;
    73     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString xmlVersion;
     72    readonly attribute DOMString? xmlEncoding;
     73    [SetterRaisesException] attribute DOMString? xmlVersion;
    7474    [SetterRaisesException] attribute boolean xmlStandalone;
    7575
    … …  
    8181    // the writable version around for Objective C clients, but are moving to
    8282    // read-only for other clients.
    83              [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString documentURI;
     83    attribute DOMString? documentURI;
    8484#else
    8585    [ImplementedAs=urlForBindings] readonly attribute DOMString documentURI;
    … …  
    209209    // WebKit extensions
    210210
    211     [TreatReturnedNullStringAs=Null] readonly attribute DOMString preferredStylesheetSet;
    212              [TreatReturnedNullStringAs=Null, TreatNullAs=NullString] attribute DOMString selectedStylesheetSet;
     211    readonly attribute DOMString? preferredStylesheetSet;
     212    attribute DOMString? selectedStylesheetSet;
    213213
    214214#if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT
  • trunk/Source/WebCore/dom/DocumentType.idl

    r195336 r197060  
    3636    readonly attribute DOMString publicId;
    3737    readonly attribute DOMString systemId;
    38     [TreatReturnedNullStringAs=Null] readonly attribute DOMString internalSubset;
     38    readonly attribute DOMString? internalSubset;
    3939};
    4040
  • trunk/Source/WebCore/dom/Element.idl

    r196430 r197060  
    2626    // DOM Level 1 Core
    2727
    28     [TreatReturnedNullStringAs=Null] readonly attribute DOMString tagName;
    29 
    30     [TreatReturnedNullStringAs=Null] DOMString getAttribute([Default=Undefined] optional DOMString name);
     28    readonly attribute DOMString? tagName;
     29
     30    DOMString? getAttribute([Default=Undefined] optional DOMString name);
    3131    [ObjCLegacyUnnamedParameters, RaisesException] void setAttribute([Default=Undefined] optional DOMString name,
    3232                                     [Default=Undefined] optional DOMString value);
    … …  
    5050    // DOM Level 2 Core
    5151
    52     [ObjCLegacyUnnamedParameters, TreatReturnedNullStringAs=Null] DOMString getAttributeNS([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
     52    [ObjCLegacyUnnamedParameters] DOMString? getAttributeNS([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
    5353                                            [Default=Undefined] optional DOMString localName);
    5454    [ObjCLegacyUnnamedParameters, RaisesException] void setAttributeNS([TreatNullAs=NullString, TreatUndefinedAs=NullString, Default=Undefined] optional DOMString namespaceURI,
  • trunk/Source/WebCore/dom/Entity.idl

    r189971 r197060  
    2424    ImplementationLacksVTable
    2525] interface Entity : Node {
    26     [TreatReturnedNullStringAs=Null] readonly attribute DOMString publicId;
    27     [TreatReturnedNullStringAs=Null] readonly attribute DOMString systemId;
    28     [TreatReturnedNullStringAs=Null] readonly attribute DOMString notationName;
     26    readonly attribute DOMString? publicId;
     27    readonly attribute DOMString? systemId;
     28    readonly attribute DOMString? notationName;
    2929};
    3030
  • trunk/Source/WebCore/dom/MutationRecord.idl

    r148257 r197060  
    4040    readonly attribute Node nextSibling;
    4141
    42     [TreatReturnedNullStringAs=Null] readonly attribute DOMString attributeName;
    43     [TreatReturnedNullStringAs=Null] readonly attribute DOMString attributeNamespace;
     42    readonly attribute DOMString? attributeName;
     43    readonly attribute DOMString? attributeNamespace;
    4444
    45     [TreatReturnedNullStringAs=Null] readonly attribute DOMString oldValue;
     45    readonly attribute DOMString? oldValue;
    4646};
  • trunk/Source/WebCore/dom/Node.idl

    r196998 r197060  
    4747    const unsigned short      NOTATION_NODE                  = 12;
    4848
    49     [TreatReturnedNullStringAs=Null] readonly attribute DOMString        nodeName;
     49    readonly attribute DOMString?        nodeName;
    5050
    5151    // FIXME: the spec says this can also raise on retrieval.
    52     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString nodeValue;
     52    [SetterRaisesException] attribute DOMString? nodeValue;
    5353
    5454    readonly attribute unsigned short   nodeType;
    … …  
    8181#endif
    8282
    83     [TreatReturnedNullStringAs=Null] readonly attribute DOMString        namespaceURI;
    84     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, SetterRaisesException] attribute DOMString prefix;
    85     [TreatReturnedNullStringAs=Null] readonly attribute DOMString        localName;
     83    readonly attribute DOMString?        namespaceURI;
     84    [SetterRaisesException] attribute DOMString? prefix;
     85    readonly attribute DOMString?        localName;
    8686
    8787#if defined(LANGUAGE_OBJECTIVE_C)
    … …  
    9393    // Introduced in DOM Level 3:
    9494
    95     [TreatReturnedNullStringAs=Null] readonly attribute DOMString       baseURI;
     95    readonly attribute DOMString?       baseURI;
    9696
    9797    // FIXME: the spec says this can also raise on retrieval.
    98     [TreatReturnedNullStringAs=Null, TreatNullAs=NullString, TreatUndefinedAs=NullString, SetterRaisesException] attribute DOMString textContent;
     98    [SetterRaisesException] attribute DOMString? textContent;
    9999
    100100    boolean            isSameNode([Default=Undefined] optional Node other);
    101101    boolean            isEqualNode([Default=Undefined] optional Node other);
    102     [TreatReturnedNullStringAs=Null] DOMString          lookupPrefix([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
     102    DOMString?         lookupPrefix([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
    103103    boolean            isDefaultNamespace([TreatNullAs=NullString,Default=Undefined] optional DOMString namespaceURI);
    104     [TreatReturnedNullStringAs=Null] DOMString          lookupNamespaceURI([TreatNullAs=NullString,Default=Undefined] optional DOMString prefix);
     104    DOMString?         lookupNamespaceURI([TreatNullAs=NullString,Default=Undefined] optional DOMString prefix);
    105105
    106106    // DocumentPosition
  • trunk/Source/WebCore/dom/ProcessingInstruction.idl

    r189881 r197060  
    2626    // DOM Level 1
    2727
    28     [TreatReturnedNullStringAs=Null] readonly attribute DOMString target;
     28    readonly attribute DOMString? target;
    2929
    3030    // interface LinkStyle from DOM Level 2 Style Sheets
  • trunk/Source/WebCore/html/DOMSettableTokenList.idl

    r196136 r197060  
    3232    attribute DOMString value;
    3333
    34     [TreatReturnedNullStringAs=Null] getter DOMString (unsigned long index);
     34    getter DOMString? (unsigned long index);
    3535};
    3636
  • trunk/Source/WebCore/html/DOMTokenList.idl

    r196123 r197060  
    2929] interface DOMTokenList {
    3030    readonly attribute unsigned long length;
    31     [TreatReturnedNullStringAs=Null] getter DOMString item(unsigned long index);
     31    getter DOMString? item(unsigned long index);
    3232    [RaisesException] boolean contains(DOMString token);
    3333    [RaisesException] void add(DOMString... tokens);
  • trunk/Source/WebCore/html/DOMURL.idl

    r171824 r197060  
    3636    ImplementationLacksVTable,
    3737] interface DOMURL {
    38     [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(Blob? blob);
     38    [CallWith=ScriptExecutionContext] static DOMString? createObjectURL(Blob? blob);
    3939    [CallWith=ScriptExecutionContext] static void revokeObjectURL(DOMString url);
    4040};
  • trunk/Source/WebCore/html/canvas/WebGLDebugShaders.idl

    r159061 r197060  
    2929    GenerateIsReachable=ImplWebGLRenderingContext,
    3030] interface WebGLDebugShaders {
    31     [StrictTypeChecking, TreatReturnedNullStringAs=Null, RaisesException] DOMString getTranslatedShaderSource(WebGLShader shader);
     31    [StrictTypeChecking, RaisesException] DOMString? getTranslatedShaderSource(WebGLShader shader);
    3232};
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.idl

    r179482 r197060  
    555555    [StrictTypeChecking, Custom, RaisesException] any getParameter(GLenum pname);
    556556    [StrictTypeChecking, Custom, RaisesException] any getProgramParameter(WebGLProgram program, GLenum pname);
    557     [StrictTypeChecking, TreatReturnedNullStringAs=Null, RaisesException] DOMString getProgramInfoLog(WebGLProgram program);
     557    [StrictTypeChecking, RaisesException] DOMString? getProgramInfoLog(WebGLProgram program);
    558558    [StrictTypeChecking, Custom, RaisesException] any getRenderbufferParameter(GLenum target, GLenum pname);
    559559    [StrictTypeChecking, Custom, RaisesException] any getShaderParameter(WebGLShader shader, GLenum pname);
    560560
    561     [StrictTypeChecking, TreatReturnedNullStringAs=Null, RaisesException] DOMString    getShaderInfoLog(WebGLShader shader);
     561    [StrictTypeChecking, RaisesException] DOMString?    getShaderInfoLog(WebGLShader shader);
    562562
    563563    [StrictTypeChecking, RaisesException] WebGLShaderPrecisionFormat getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype);
    564564
    565     [StrictTypeChecking, TreatReturnedNullStringAs=Null, RaisesException] DOMString    getShaderSource(WebGLShader shader);
     565    [StrictTypeChecking, RaisesException] DOMString?    getShaderSource(WebGLShader shader);
    566566
    567567    [StrictTypeChecking, Custom] sequence<DOMString> getSupportedExtensions();
  • trunk/Source/WebCore/page/DOMWindow.idl

    r196797 r197060  
    7575    void alert([Default=Undefined] optional DOMString message);
    7676    boolean confirm([Default=Undefined] optional DOMString message);
    77     [TreatReturnedNullStringAs=Null] DOMString prompt([Default=Undefined] optional DOMString message,
     77    DOMString? prompt([Default=Undefined] optional DOMString message,
    7878                                                [TreatNullAs=NullString, TreatUndefinedAs=NullString,Default=Undefined] optional DOMString defaultValue);
    7979
  • trunk/Source/WebCore/storage/Storage.idl

    r195760 r197060  
    3232] interface Storage {
    3333    [GetterRaisesException] readonly attribute unsigned long length;
    34     [TreatReturnedNullStringAs=Null, RaisesException] DOMString key(unsigned long index);
    35     [TreatReturnedNullStringAs=Null, RaisesException] getter DOMString getItem(DOMString key);
     34    [RaisesException] DOMString? key(unsigned long index);
     35    [RaisesException] getter DOMString? getItem(DOMString key);
    3636    [RaisesException] void setItem(DOMString key, DOMString data);
    3737    [RaisesException] void removeItem(DOMString key);
  • trunk/Source/WebCore/storage/StorageEvent.idl

    r159061 r197060  
    2828] interface StorageEvent : Event {
    2929    [InitializedByEventConstructor] readonly attribute DOMString key;
    30     [InitializedByEventConstructor, TreatReturnedNullStringAs=Null] readonly attribute DOMString oldValue;
    31     [InitializedByEventConstructor, TreatReturnedNullStringAs=Null] readonly attribute DOMString newValue;
     30    [InitializedByEventConstructor] readonly attribute DOMString? oldValue;
     31    [InitializedByEventConstructor] readonly attribute DOMString? newValue;
    3232    [InitializedByEventConstructor] readonly attribute DOMString url;
    3333    [InitializedByEventConstructor] readonly attribute Storage storageArea;
  • trunk/Source/WebCore/xml/XMLHttpRequest.idl

    r196599 r197060  
    7171    // response
    7272    [TreatReturnedNullStringAs=Undefined] DOMString getAllResponseHeaders();
    73     [TreatReturnedNullStringAs=Null] DOMString getResponseHeader(DOMString header);
    74     [GetterRaisesException, CustomGetter] readonly attribute DOMString responseText; // The custom getter implements TreatReturnedNullStringAs=Null
     73    DOMString? getResponseHeader(DOMString header);
     74    [GetterRaisesException, CustomGetter] readonly attribute DOMString? responseText;
    7575    [GetterRaisesException] readonly attribute Document responseXML;
    7676
  • trunk/Source/WebCore/xml/XPathNSResolver.idl

    r165676 r197060  
    2424    SkipVTableValidation,
    2525] interface XPathNSResolver {
    26     [TreatReturnedNullStringAs=Null] DOMString lookupNamespaceURI([Default=Undefined] optional DOMString prefix);
     26    DOMString? lookupNamespaceURI([Default=Undefined] optional DOMString prefix);
    2727};
    2828
Note: See TracChangeset for help on using the changeset viewer.