Changeset 121714 in webkit


Ignore:
Timestamp:
Jul 2, 2012 6:08:24 PM (12 years ago)
Author:
jsbell@chromium.org
Message:

IDL overloads should not treat wrapper types as nullable by default
https://bugs.webkit.org/show_bug.cgi?id=90218

Reviewed by Kentaro Hara.

Wrapper types were being treated as Nullable by default during overloaded
method dispatching, which deviates from the WebIDL specification. This change
introduces the "?" type suffix into the parser, and treats wrapper types
only nullable if specified. (The behavior of array types and other non-wrapper
types are not changed, and only overloaded methods are checked.)

IDL files with affected overloads are modified to include the "?" suffix
so that no behavior changes are introduced by this patch - the JS and V8
generator results before/after the change show no diffs.

Test: bindings/scripts/test/TestObj.idl (a non-nullable overload)

  • Modules/indexeddb/IDBDatabase.idl: Added "?" where necessary.
  • Modules/indexeddb/IDBIndex.idl: Added "?" where necessary.
  • Modules/indexeddb/IDBObjectStore.idl: Added "?" where necessary.
  • Modules/webaudio/AudioContext.idl: Added "?" where necessary.
  • Modules/webaudio/AudioNode.idl: Added "?" where necessary.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateParametersCheckExpression): Add isNullable check.

  • bindings/scripts/CodeGeneratorV8.pm:

(GenerateParametersCheckExpression): Add isNullable check.

  • bindings/scripts/IDLParser.pm: Parse/set isNullable.

(parseParameters):

  • bindings/scripts/IDLStructure.pm: Add basic type suffix parsing.
  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
(WebCore):
(WebCore::jsTestObjPrototypeFunctionOverloadedMethod):

  • bindings/scripts/test/TestObj.idl: Mark previous overload params with ?, add new one without.
  • bindings/scripts/test/V8/V8TestObj.cpp:

(WebCore::TestObjV8Internal::overloadedMethod8Callback):
(TestObjV8Internal):
(WebCore::TestObjV8Internal::overloadedMethodCallback):

  • dom/DataTransferItemList.idl: Added "?" where necessary.
  • fileapi/WebKitBlobBuilder.idl: Added "?" where necessary.
  • html/DOMURL.idl: Added "?" where necessary.
  • html/canvas/CanvasRenderingContext2D.idl: Added "?" where necessary.
  • html/canvas/WebGLRenderingContext.idl: Added "?" where necessary.
Location:
trunk/Source/WebCore
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r121710 r121714  
     12012-07-02  Joshua Bell  <jsbell@chromium.org>
     2
     3        IDL overloads should not treat wrapper types as nullable by default
     4        https://bugs.webkit.org/show_bug.cgi?id=90218
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Wrapper types were being treated as Nullable by default during overloaded
     9        method dispatching, which deviates from the WebIDL specification. This change
     10        introduces the "?" type suffix into the parser, and treats wrapper types
     11        only nullable if specified. (The behavior of array types and other non-wrapper
     12        types are not changed, and only overloaded methods are checked.)
     13
     14        IDL files with affected overloads are modified to include the "?" suffix
     15        so that no behavior changes are introduced by this patch - the JS and V8
     16        generator results before/after the change show no diffs.
     17
     18        Test: bindings/scripts/test/TestObj.idl (a non-nullable overload)
     19
     20        * Modules/indexeddb/IDBDatabase.idl: Added "?" where necessary.
     21        * Modules/indexeddb/IDBIndex.idl: Added "?" where necessary.
     22        * Modules/indexeddb/IDBObjectStore.idl: Added "?" where necessary.
     23        * Modules/webaudio/AudioContext.idl: Added "?" where necessary.
     24        * Modules/webaudio/AudioNode.idl: Added "?" where necessary.
     25        * bindings/scripts/CodeGeneratorJS.pm:
     26        (GenerateParametersCheckExpression): Add isNullable check.
     27        * bindings/scripts/CodeGeneratorV8.pm:
     28        (GenerateParametersCheckExpression): Add isNullable check.
     29        * bindings/scripts/IDLParser.pm: Parse/set isNullable.
     30        (parseParameters):
     31        * bindings/scripts/IDLStructure.pm: Add basic type suffix parsing.
     32        * bindings/scripts/test/JS/JSTestObj.cpp:
     33        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
     34        (WebCore):
     35        (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
     36        * bindings/scripts/test/TestObj.idl: Mark previous overload params with ?, add new one without.
     37        * bindings/scripts/test/V8/V8TestObj.cpp:
     38        (WebCore::TestObjV8Internal::overloadedMethod8Callback):
     39        (TestObjV8Internal):
     40        (WebCore::TestObjV8Internal::overloadedMethodCallback):
     41        * dom/DataTransferItemList.idl: Added "?" where necessary.
     42        * fileapi/WebKitBlobBuilder.idl: Added "?" where necessary.
     43        * html/DOMURL.idl: Added "?" where necessary.
     44        * html/canvas/CanvasRenderingContext2D.idl: Added "?" where necessary.
     45        * html/canvas/WebGLRenderingContext.idl: Added "?" where necessary.
     46
    1472012-07-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
    248
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.idl

    r116337 r121714  
    4646        [CallWith=ScriptExecutionContext] IDBVersionChangeRequest setVersion(in DOMString version)
    4747            raises (IDBDatabaseException);
    48         [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList storeNames, in [Optional=DefaultIsNullString] DOMString mode)
     48        [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList? storeNames, in [Optional=DefaultIsNullString] DOMString mode)
    4949            raises (IDBDatabaseException);
    5050        [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMString[] storeNames, in [Optional=DefaultIsNullString] DOMString mode)
     
    5454
    5555        // FIXME: remove these when https://bugs.webkit.org/show_bug.cgi?id=85326 is fixed.
    56         [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList storeNames, in unsigned short mode)
     56        [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList? storeNames, in unsigned short mode)
    5757            raises (IDBDatabaseException);
    5858        [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMString[] storeNames, in unsigned short mode)
  • trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl

    r117817 r121714  
    3535        readonly attribute boolean multiEntry;
    3636
    37         [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange range, in [Optional] DOMString direction)
     37        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange? range, in [Optional] DOMString direction)
    3838            raises (IDBDatabaseException);
    3939        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in IDBKey key, in [Optional] DOMString direction)
    4040            raises (IDBDatabaseException);
    4141       
    42         [CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in [Optional] IDBKeyRange range, in [Optional] DOMString  direction)
     42        [CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in [Optional] IDBKeyRange? range, in [Optional] DOMString  direction)
    4343            raises (IDBDatabaseException);
    4444        [CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in IDBKey key, in [Optional] DOMString direction)
     
    4747        // FIXME: remove these when
    4848        // https://bugs.webkit.org/show_bug.cgi?id=85326 is fixed.
    49         [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange range, in [Optional] unsigned short direction)
     49        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange? range, in [Optional] unsigned short direction)
    5050            raises (IDBDatabaseException);
    5151        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in IDBKey key, in [Optional] unsigned short direction)
    5252            raises (IDBDatabaseException);
    53         [CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in [Optional] IDBKeyRange range, in [Optional] unsigned short direction)
     53        [CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in [Optional] IDBKeyRange? range, in [Optional] unsigned short direction)
    5454            raises (IDBDatabaseException);
    5555        [CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in IDBKey key, in [Optional] unsigned short direction)
    5656            raises (IDBDatabaseException);
    5757       
    58         [CallWith=ScriptExecutionContext] IDBRequest get(in IDBKeyRange key)
     58        [CallWith=ScriptExecutionContext] IDBRequest get(in IDBKeyRange? key)
    5959            raises (IDBDatabaseException);
    6060        [CallWith=ScriptExecutionContext] IDBRequest get(in IDBKey key)
    6161            raises (IDBDatabaseException);
    62         [CallWith=ScriptExecutionContext] IDBRequest getKey(in IDBKeyRange key)
     62        [CallWith=ScriptExecutionContext] IDBRequest getKey(in IDBKeyRange? key)
    6363            raises (IDBDatabaseException);
    6464        [CallWith=ScriptExecutionContext] IDBRequest getKey(in IDBKey key)
    6565            raises (IDBDatabaseException);
    66         [CallWith=ScriptExecutionContext] IDBRequest count(in [Optional] IDBKeyRange range)
     66        [CallWith=ScriptExecutionContext] IDBRequest count(in [Optional] IDBKeyRange? range)
    6767            raises (IDBDatabaseException);
    6868        [CallWith=ScriptExecutionContext] IDBRequest count(in IDBKey key)
  • trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl

    r118011 r121714  
    3939        [CallWith=ScriptExecutionContext] IDBRequest add(in SerializedScriptValue value, in [Optional] IDBKey key)
    4040            raises (IDBDatabaseException);
    41         [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction] IDBRequest delete(in IDBKeyRange keyRange)
     41        [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction] IDBRequest delete(in IDBKeyRange? keyRange)
    4242            raises (IDBDatabaseException);
    4343        [CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction] IDBRequest delete(in IDBKey key)
     
    4545        [CallWith=ScriptExecutionContext] IDBRequest clear()
    4646            raises (IDBDatabaseException);
    47         [CallWith=ScriptExecutionContext] IDBRequest get(in IDBKeyRange key)
     47        [CallWith=ScriptExecutionContext] IDBRequest get(in IDBKeyRange? key)
    4848            raises (IDBDatabaseException);
    4949        [CallWith=ScriptExecutionContext] IDBRequest get(in IDBKey key)
    5050            raises (IDBDatabaseException);
    51         [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange range, in [Optional] DOMString direction)
     51        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange? range, in [Optional] DOMString direction)
    5252            raises (IDBDatabaseException);
    5353        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in IDBKey key, in [Optional] DOMString direction)
     
    5555
    5656        // FIXME: remove these when https://bugs.webkit.org/show_bug.cgi?id=85326 is fixed.
    57         [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange range, in [Optional] unsigned short direction)
     57        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange? range, in [Optional] unsigned short direction)
    5858            raises (IDBDatabaseException);
    5959        [CallWith=ScriptExecutionContext] IDBRequest openCursor(in IDBKey key, in [Optional] unsigned short direction)
     
    6868        void deleteIndex(in DOMString name)
    6969            raises (IDBDatabaseException);
    70         [CallWith=ScriptExecutionContext] IDBRequest count(in [Optional] IDBKeyRange range)
     70        [CallWith=ScriptExecutionContext] IDBRequest count(in [Optional] IDBKeyRange? range)
    7171            raises (IDBDatabaseException);
    7272        [CallWith=ScriptExecutionContext] IDBRequest count(in IDBKey key)
  • trunk/Source/WebCore/Modules/webaudio/AudioContext.idl

    r114193 r121714  
    5050        AudioBuffer createBuffer(in unsigned long numberOfChannels, in unsigned long numberOfFrames, in float sampleRate)
    5151            raises(DOMException);
    52         AudioBuffer createBuffer(in ArrayBuffer buffer, in boolean mixToMono)
     52        AudioBuffer createBuffer(in ArrayBuffer? buffer, in boolean mixToMono)
    5353            raises(DOMException);
    5454
  • trunk/Source/WebCore/Modules/webaudio/AudioNode.idl

    r113769 r121714  
    3131        readonly attribute unsigned long numberOfOutputs;
    3232
    33         void connect(in AudioNode destination, in [Optional=DefaultIsUndefined] unsigned long output, in [Optional=DefaultIsUndefined] unsigned long input)
     33        void connect(in AudioNode? destination, in [Optional=DefaultIsUndefined] unsigned long output, in [Optional=DefaultIsUndefined] unsigned long input)
    3434            raises(DOMException);
    3535
    36         void connect(in AudioParam destination, in [Optional=DefaultIsUndefined] unsigned long output)
     36        void connect(in AudioParam? destination, in [Optional=DefaultIsUndefined] unsigned long output)
    3737            raises(DOMException);
    3838
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r121615 r121714  
    12641264            $usedArguments{$parameterIndex} = 1;
    12651265        } elsif (!IsNativeType($type)) {
    1266             push(@andExpression, "(${value}.isNull() || (${value}.isObject() && asObject(${value})->inherits(&JS${type}::s_info)))");
     1266            if ($parameter->isNullable) {
     1267                push(@andExpression, "(${value}.isNull() || (${value}.isObject() && asObject(${value})->inherits(&JS${type}::s_info)))");
     1268            } else {
     1269                push(@andExpression, "(${value}.isObject() && asObject(${value})->inherits(&JS${type}::s_info))");
     1270            }
    12671271            $usedArguments{$parameterIndex} = 1;
    12681272        }
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r121663 r121714  
    13601360            push(@andExpression, "(${value}->IsNull() || ${value}->IsArray())");
    13611361        } elsif (IsWrapperType($type)) {
    1362             push(@andExpression, "(${value}->IsNull() || V8${type}::HasInstance($value))");
     1362            if ($parameter->isNullable) {
     1363                push(@andExpression, "(${value}->IsNull() || V8${type}::HasInstance($value))");
     1364            } else {
     1365                push(@andExpression, "(V8${type}::HasInstance($value))");
     1366            }
    13631367        }
    13641368
  • trunk/Source/WebCore/bindings/scripts/IDLParser.pm

    r116172 r121714  
    245245        my $paramExtendedAttributes = (defined($2) ? $2 : " "); chop($paramExtendedAttributes);
    246246        my $paramType = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)"));
    247         my $paramName = (defined($4) ? $4 : die("Parsing error!\nSource:\n$line\n)"));
     247        my $paramTypeSuffix = defined($4) ? $4 : "";
     248        my $paramName = (defined($5) ? $5 : die("Parsing error!\nSource:\n$line\n)"));
     249
     250        my $isNullable = $paramTypeSuffix eq "?";
    248251
    249252        my $paramDataNode = new domSignature();
     
    252255        $paramDataNode->type($paramType);
    253256        $paramDataNode->extendedAttributes(parseExtendedAttributes($paramExtendedAttributes));
     257        $paramDataNode->isNullable($isNullable);
    254258
    255259        my $arrayRef = $newDataNode->parameters;
  • trunk/Source/WebCore/bindings/scripts/IDLStructure.pm

    r116172 r121714  
    6666    name => '$',      # Variable name
    6767    type => '$',      # Variable type
    68     extendedAttributes => '$' # Extended attributes
     68    extendedAttributes => '$', # Extended attributes
     69    isNullable => '$' # Is variable type Nullable (T?)
    6970});
    7071
     
    9192# Magic IDL parsing regular expressions
    9293my $supportedTypes = "((?:(?:unsigned )?(?:int|short|(?:long )?long)|(?:$idlIdNs*))(?:\\[\\]|<(?:$idlIdNsList*)>)?)";
     94my $supportedTypeSuffix = "(\\?)?";
    9395
    9496# Special IDL notations. This regular expression extracts the string between the first [ and its corresponding ].
     
    105107our $typeNamespaceSelector = '((?:' . $idlId . '*::)*)\s*(' . $idlDataType . '*)';
    106108
    107 our $interfaceSelector = '(interface|exception)\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]<>&\|]*)';
    108 our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)(static\s+)?' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]<>]*)';
    109 our $interfaceParameterSelector = '(in|out)\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
     109our $interfaceSelector = '(interface|exception)\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]<>&\|?]*)';
     110our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)(static\s+)?' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]<>?]*)';
     111our $interfaceParameterSelector = '(in|out)\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . $supportedTypeSuffix . '\s*(' . $idlIdNs . '*)';
    110112
    111113our $interfaceAttributeSelector = '\s*(readonly attribute|attribute)\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)';
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r120304 r121714  
    21442144}
    21452145
     2146static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod8(ExecState* exec)
     2147{
     2148    JSValue thisValue = exec->hostThisValue();
     2149    if (!thisValue.inherits(&JSTestObj::s_info))
     2150        return throwVMTypeError(exec);
     2151    JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
     2152    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
     2153    TestObj* impl = static_cast<TestObj*>(castedThis->impl());
     2154    if (exec->argumentCount() < 1)
     2155        return throwVMError(exec, createNotEnoughArgumentsError(exec));
     2156    TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
     2157    if (exec->hadException())
     2158        return JSValue::encode(jsUndefined());
     2159    impl->overloadedMethod(objArg);
     2160    return JSValue::encode(jsUndefined());
     2161}
     2162
    21462163EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod(ExecState* exec)
    21472164{
     
    21632180    if ((argsCount == 1 && (arg0.isNull() || (arg0.isObject() && asObject(arg0)->inherits(&JSArray::s_info)))))
    21642181        return jsTestObjPrototypeFunctionOverloadedMethod7(exec);
     2182    if ((argsCount == 1 && (arg0.isObject() && asObject(arg0)->inherits(&JSTestObj::s_info))))
     2183        return jsTestObjPrototypeFunctionOverloadedMethod8(exec);
    21652184    return throwVMTypeError(exec);
    21662185}
  • trunk/Source/WebCore/bindings/scripts/test/TestObj.idl

    r120304 r121714  
    164164#if defined(TESTING_V8) || defined(TESTING_JS)
    165165        // Overloads
    166         void    overloadedMethod(in TestObj objArg, in DOMString strArg);
    167         void    overloadedMethod(in TestObj objArg, in [Optional] long intArg);
     166        void    overloadedMethod(in TestObj? objArg, in DOMString strArg);
     167        void    overloadedMethod(in TestObj? objArg, in [Optional] long intArg);
    168168        void    overloadedMethod(in DOMString strArg);
    169169        void    overloadedMethod(in long intArg);
    170170        void    overloadedMethod(in [Callback] TestCallback callback);
    171         void    overloadedMethod(in DOMStringList listArg);
     171        void    overloadedMethod(in DOMStringList? listArg);
    172172        void    overloadedMethod(in DOMString[] arrayArg);
     173        void    overloadedMethod(in TestObj objArg);
    173174#endif
    174175
  • trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp

    r121663 r121714  
    15721572}
    15731573
     1574static v8::Handle<v8::Value> overloadedMethod8Callback(const v8::Arguments& args)
     1575{
     1576    INC_STATS("DOM.TestObj.overloadedMethod8");
     1577    if (args.Length() < 1)
     1578        return V8Proxy::throwNotEnoughArgumentsError(args.GetIsolate());
     1579    TestObj* imp = V8TestObj::toNative(args.Holder());
     1580    EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined))) : 0);
     1581    imp->overloadedMethod(objArg);
     1582    return v8::Handle<v8::Value>();
     1583}
     1584
    15741585static v8::Handle<v8::Value> overloadedMethodCallback(const v8::Arguments& args)
    15751586{
     
    15891600    if ((args.Length() == 1 && (args[0]->IsNull() || args[0]->IsArray())))
    15901601        return overloadedMethod7Callback(args);
     1602    if ((args.Length() == 1 && (V8TestObj::HasInstance(args[0]))))
     1603        return overloadedMethod8Callback(args);
    15911604    return V8Proxy::throwTypeError(0, args.GetIsolate());
    15921605}
  • trunk/Source/WebCore/dom/DataTransferItemList.idl

    r107304 r121714  
    4343
    4444        void clear();
    45         void add(in File file);
     45        void add(in File? file);
    4646        void add(in [Optional=DefaultIsUndefined] DOMString data,
    4747                 in [Optional=DefaultIsUndefined] DOMString type) raises(DOMException);
  • trunk/Source/WebCore/fileapi/WebKitBlobBuilder.idl

    r119956 r121714  
    4040        Blob getBlob(in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString contentType);
    4141#endif
    42         void append(in Blob blob);
     42        void append(in Blob? blob);
    4343#if defined(ENABLE_BLOB) && ENABLE_BLOB
    44         [CallWith=ScriptExecutionContext] void append(in ArrayBuffer arrayBuffer);
    45         void append(in ArrayBufferView arrayBufferView);
     44        [CallWith=ScriptExecutionContext] void append(in ArrayBuffer? arrayBuffer);
     45        void append(in ArrayBufferView? arrayBufferView);
    4646#endif
    4747        void append(in DOMString value, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString endings) raises (DOMException);
  • trunk/Source/WebCore/html/DOMURL.idl

    r117160 r121714  
    3535    ] DOMURL {
    3636#if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM
    37         [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(in MediaStream stream);
     37        [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(in MediaStream? stream);
    3838#endif
    39         [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(in Blob blob);
     39        [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Null] static DOMString createObjectURL(in Blob? blob);
    4040        [CallWith=ScriptExecutionContext] static void revokeObjectURL(in DOMString url);
    4141    };
  • trunk/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl

    r117635 r121714  
    169169                        in [Optional] float lineWidth);
    170170
    171         void drawImage(in HTMLImageElement image, in float x, in float y)
    172             raises (DOMException);
    173         void drawImage(in HTMLImageElement image, in float x, in float y, in float width, in float height)
    174             raises (DOMException);
    175         void drawImage(in HTMLImageElement image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh)
    176             raises (DOMException);
    177         void drawImage(in HTMLCanvasElement canvas, in float x, in float y)
    178             raises (DOMException);
    179         void drawImage(in HTMLCanvasElement canvas, in float x, in float y, in float width, in float height)
    180             raises (DOMException);
    181         void drawImage(in HTMLCanvasElement canvas, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh)
     171        void drawImage(in HTMLImageElement? image, in float x, in float y)
     172            raises (DOMException);
     173        void drawImage(in HTMLImageElement? image, in float x, in float y, in float width, in float height)
     174            raises (DOMException);
     175        void drawImage(in HTMLImageElement? image, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh)
     176            raises (DOMException);
     177        void drawImage(in HTMLCanvasElement? canvas, in float x, in float y)
     178            raises (DOMException);
     179        void drawImage(in HTMLCanvasElement? canvas, in float x, in float y, in float width, in float height)
     180            raises (DOMException);
     181        void drawImage(in HTMLCanvasElement? canvas, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh)
    182182            raises (DOMException);
    183183#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
    184         void drawImage(in HTMLVideoElement video, in float x, in float y)
    185             raises (DOMException);
    186         void drawImage(in HTMLVideoElement video, in float x, in float y, in float width, in float height)
    187             raises (DOMException);
    188         void drawImage(in HTMLVideoElement video, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh)
     184        void drawImage(in HTMLVideoElement? video, in float x, in float y)
     185            raises (DOMException);
     186        void drawImage(in HTMLVideoElement? video, in float x, in float y, in float width, in float height)
     187            raises (DOMException);
     188        void drawImage(in HTMLVideoElement? video, in float sx, in float sy, in float sw, in float sh, in float dx, in float dy, in float dw, in float dh)
    189189            raises (DOMException);
    190190#endif
     
    200200        void setShadow(in float width, in float height, in float blur, in float c, in float m, in float y, in float k, in float a);
    201201
    202         void putImageData(in ImageData imagedata, in float dx, in float dy)
    203             raises(DOMException);
    204         void putImageData(in ImageData imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight)
    205             raises(DOMException);
    206 
    207         void webkitPutImageDataHD(in ImageData imagedata, in float dx, in float dy)
    208             raises(DOMException);
    209         void webkitPutImageDataHD(in ImageData imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight)
    210             raises(DOMException);
    211 
    212         CanvasPattern createPattern(in HTMLCanvasElement canvas, in [TreatNullAs=NullString] DOMString repetitionType)
    213             raises (DOMException);
    214         CanvasPattern createPattern(in HTMLImageElement image, in [TreatNullAs=NullString] DOMString repetitionType)
    215             raises (DOMException);
    216         ImageData createImageData(in ImageData imagedata)
     202        void putImageData(in ImageData? imagedata, in float dx, in float dy)
     203            raises(DOMException);
     204        void putImageData(in ImageData? imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight)
     205            raises(DOMException);
     206
     207        void webkitPutImageDataHD(in ImageData? imagedata, in float dx, in float dy)
     208            raises(DOMException);
     209        void webkitPutImageDataHD(in ImageData? imagedata, in float dx, in float dy, in float dirtyX, in float dirtyY, in float dirtyWidth, in float dirtyHeight)
     210            raises(DOMException);
     211
     212        CanvasPattern createPattern(in HTMLCanvasElement? canvas, in [TreatNullAs=NullString] DOMString repetitionType)
     213            raises (DOMException);
     214        CanvasPattern createPattern(in HTMLImageElement? image, in [TreatNullAs=NullString] DOMString repetitionType)
     215            raises (DOMException);
     216        ImageData createImageData(in ImageData? imagedata)
    217217            raises (DOMException);
    218218        ImageData createImageData(in float sw, in float sh)
  • trunk/Source/WebCore/html/canvas/WebGLRenderingContext.idl

    r116374 r121714  
    462462        [StrictTypeChecking] void         blendFunc(in unsigned long sfactor, in unsigned long dfactor);
    463463        [StrictTypeChecking] void         blendFuncSeparate(in unsigned long srcRGB, in unsigned long dstRGB, in unsigned long srcAlpha, in unsigned long dstAlpha);
    464         [StrictTypeChecking] void         bufferData(in unsigned long target, in ArrayBuffer data, in unsigned long usage) raises (DOMException);
    465         [StrictTypeChecking] void         bufferData(in unsigned long target, in ArrayBufferView data, in unsigned long usage) raises (DOMException);
     464        [StrictTypeChecking] void         bufferData(in unsigned long target, in ArrayBuffer? data, in unsigned long usage) raises (DOMException);
     465        [StrictTypeChecking] void         bufferData(in unsigned long target, in ArrayBufferView? data, in unsigned long usage) raises (DOMException);
    466466        [StrictTypeChecking] void         bufferData(in unsigned long target, in long long size, in unsigned long usage) raises (DOMException);
    467         [StrictTypeChecking] void         bufferSubData(in unsigned long target, in long long offset, in ArrayBuffer data) raises (DOMException);
    468         [StrictTypeChecking] void         bufferSubData(in unsigned long target, in long long offset, in ArrayBufferView data) raises (DOMException);
     467        [StrictTypeChecking] void         bufferSubData(in unsigned long target, in long long offset, in ArrayBuffer? data) raises (DOMException);
     468        [StrictTypeChecking] void         bufferSubData(in unsigned long target, in long long offset, in ArrayBufferView? data) raises (DOMException);
    469469
    470470        [StrictTypeChecking] unsigned long checkFramebufferStatus(in unsigned long target);
     
    603603        // Supported forms:
    604604        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat, in long width, in long height,
    605                                                      in long border, in unsigned long format, in unsigned long type, in ArrayBufferView pixels) raises (DOMException);
     605                                                     in long border, in unsigned long format, in unsigned long type, in ArrayBufferView? pixels) raises (DOMException);
    606606        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
    607                                                      in unsigned long format, in unsigned long type, in ImageData pixels) raises (DOMException);
     607                                                     in unsigned long format, in unsigned long type, in ImageData? pixels) raises (DOMException);
    608608        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
    609                                                      in unsigned long format, in unsigned long type, in HTMLImageElement image) raises (DOMException);
     609                                                     in unsigned long format, in unsigned long type, in HTMLImageElement? image) raises (DOMException);
    610610        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
    611                                                      in unsigned long format, in unsigned long type, in HTMLCanvasElement canvas) raises (DOMException);
     611                                                     in unsigned long format, in unsigned long type, in HTMLCanvasElement? canvas) raises (DOMException);
    612612#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
    613613        [StrictTypeChecking] void         texImage2D(in unsigned long target, in long level, in unsigned long internalformat,
    614                                                      in unsigned long format, in unsigned long type, in HTMLVideoElement video) raises (DOMException);
     614                                                     in unsigned long format, in unsigned long type, in HTMLVideoElement? video) raises (DOMException);
    615615#endif
    616616
    617617        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
    618618                                                        in long width, in long height,
    619                                                         in unsigned long format, in unsigned long type, in ArrayBufferView pixels) raises (DOMException);
     619                                                        in unsigned long format, in unsigned long type, in ArrayBufferView? pixels) raises (DOMException);
    620620        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
    621                                                         in unsigned long format, in unsigned long type, in ImageData pixels) raises (DOMException);
     621                                                        in unsigned long format, in unsigned long type, in ImageData? pixels) raises (DOMException);
    622622        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
    623                                                         in unsigned long format, in unsigned long type, in HTMLImageElement image) raises (DOMException);
     623                                                        in unsigned long format, in unsigned long type, in HTMLImageElement? image) raises (DOMException);
    624624        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
    625                                                         in unsigned long format, in unsigned long type, in HTMLCanvasElement canvas) raises (DOMException);
     625                                                        in unsigned long format, in unsigned long type, in HTMLCanvasElement? canvas) raises (DOMException);
    626626#if defined(ENABLE_VIDEO) && ENABLE_VIDEO
    627627        [StrictTypeChecking] void         texSubImage2D(in unsigned long target, in long level, in long xoffset, in long yoffset,
    628                                                         in unsigned long format, in unsigned long type, in HTMLVideoElement video) raises (DOMException);
     628                                                        in unsigned long format, in unsigned long type, in HTMLVideoElement? video) raises (DOMException);
    629629#endif
    630630
Note: See TracChangeset for help on using the changeset viewer.