Drop [TreatReturnedNullStringAs=Null] WebKit-specific IDL attribute
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Feb 2016 02:39:19 +0000 (02:39 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 Feb 2016 02:39:19 +0000 (02:39 +0000)
commitac531a541e531a4401f03f13e3e14480bdf73f37
tree7c01fbc674b136717ae2d2d534bd3d380cb08374
parent09760b19758d76a4b25a0cc6193155f83515f2db
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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197060 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/fetch/FetchHeaders.idl
Source/WebCore/Modules/indexeddb/IDBObjectStore.idl
Source/WebCore/Modules/mediasource/DOMURLMediaSource.idl
Source/WebCore/Modules/mediastream/DOMURLMediaStream.idl
Source/WebCore/Modules/websockets/WebSocket.idl
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLAttributes.txt
Source/WebCore/bindings/scripts/IDLParser.pm
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/css/CSSCharsetRule.idl
Source/WebCore/css/CSSImportRule.idl
Source/WebCore/css/CSSKeyframesRule.idl
Source/WebCore/css/CSSPageRule.idl
Source/WebCore/css/CSSRule.idl
Source/WebCore/css/CSSStyleDeclaration.idl
Source/WebCore/css/CSSStyleRule.idl
Source/WebCore/css/CSSValue.idl
Source/WebCore/css/MediaList.idl
Source/WebCore/css/StyleSheet.idl
Source/WebCore/dom/Attr.idl
Source/WebCore/dom/CharacterData.idl
Source/WebCore/dom/DOMStringList.idl
Source/WebCore/dom/Document.idl
Source/WebCore/dom/DocumentType.idl
Source/WebCore/dom/Element.idl
Source/WebCore/dom/Entity.idl
Source/WebCore/dom/MutationRecord.idl
Source/WebCore/dom/Node.idl
Source/WebCore/dom/ProcessingInstruction.idl
Source/WebCore/html/DOMSettableTokenList.idl
Source/WebCore/html/DOMTokenList.idl
Source/WebCore/html/DOMURL.idl
Source/WebCore/html/canvas/WebGLDebugShaders.idl
Source/WebCore/html/canvas/WebGLRenderingContextBase.idl
Source/WebCore/page/DOMWindow.idl
Source/WebCore/storage/Storage.idl
Source/WebCore/storage/StorageEvent.idl
Source/WebCore/xml/XMLHttpRequest.idl
Source/WebCore/xml/XPathNSResolver.idl