Changeset 92327 in webkit


Ignore:
Timestamp:
Aug 3, 2011 4:20:58 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Remove LegacyDefaultOptionalArguments flag from HTML DOM IDL files
https://bugs.webkit.org/show_bug.cgi?id=65338

Patch by Mark Pilgrim <pilgrim@chromium.org> on 2011-08-03
Reviewed by Adam Barth.

Source/WebCore:

  • html/DOMFormData.idl:
  • html/DOMTokenList.idl:
  • html/DOMURL.idl:
  • html/HTMLAllCollection.idl:
  • html/HTMLAnchorElement.idl:
  • html/HTMLAudioElement.idl:
  • html/HTMLButtonElement.idl:
  • html/HTMLCanvasElement.idl:
  • html/HTMLCollection.idl:
  • html/HTMLDivElement.idl:
  • html/HTMLDocument.idl:
  • html/HTMLElement.idl:
  • html/HTMLFieldSetElement.idl:
  • html/HTMLInputElement.idl:
  • html/HTMLKeygenElement.idl:
  • html/HTMLMediaElement.idl:
  • html/HTMLObjectElement.idl:
  • html/HTMLOptionsCollection.idl:
  • html/HTMLOutputElement.idl:
  • html/HTMLSelectElement.idl:
  • html/HTMLTableElement.idl:
  • html/HTMLTableRowElement.idl:
  • html/HTMLTableSectionElement.idl:
  • html/HTMLTextAreaElement.idl:
  • html/HTMLVideoElement.idl:
  • html/TimeRanges.idl:

LayoutTests:

  • fast/files/create-blob-url-crash-expected.txt:
  • fast/files/create-blob-url-crash.html:
  • fast/files/revoke-blob-url-expected.txt:
  • fast/files/revoke-blob-url.html:
  • fast/forms/ValidityState-customError-expected.txt:
  • fast/forms/ValidityState-customError.html:
Location:
trunk
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r92315 r92327  
     12011-08-03  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        Remove LegacyDefaultOptionalArguments flag from HTML DOM IDL files
     4        https://bugs.webkit.org/show_bug.cgi?id=65338
     5
     6        Reviewed by Adam Barth.
     7
     8        * fast/files/create-blob-url-crash-expected.txt:
     9        * fast/files/create-blob-url-crash.html:
     10        * fast/files/revoke-blob-url-expected.txt:
     11        * fast/files/revoke-blob-url.html:
     12        * fast/forms/ValidityState-customError-expected.txt:
     13        * fast/forms/ValidityState-customError.html:
     14
    1152011-08-03  Mark Pilgrim  <pilgrim@chromium.org>
    216
  • trunk/LayoutTests/fast/files/create-blob-url-crash-expected.txt

    r70102 r92327  
    1 Test that createObjectURL with no argument should not cause crash.
    2 PASS
     1Test that createObjectURL with no argument should throw an exception.
     2PASS: Not enough arguments
    33DONE
    44
  • trunk/LayoutTests/fast/files/create-blob-url-crash.html

    r75739 r92327  
    1010function test()
    1111{
    12     log("Test that createObjectURL with no argument should not cause crash.");
    13     var url = webkitURL.createObjectURL();
    14     log(url == undefined ? "PASS" : "FAIL");
     12    log("Test that createObjectURL with no argument should throw an exception.");
     13    try {
     14        var url = webkitURL.createObjectURL();
     15        log("FAIL");
     16    } catch(err) {
     17        log("PASS: " + err.message);
     18    }
    1519
    1620    log("DONE");
  • trunk/LayoutTests/fast/files/revoke-blob-url-expected.txt

    r70102 r92327  
    11Test calling revokeObjectURL with no argument.
    2 PASS
     2PASS: Not enough arguments
    33Test calling revokeObjectURL with empty URL.
    44PASS
  • trunk/LayoutTests/fast/files/revoke-blob-url.html

    r75739 r92327  
    1111{
    1212    log("Test calling revokeObjectURL with no argument.");
    13     var url = webkitURL.revokeObjectURL();
    14     log(url == undefined ? "PASS" : "FAIL");
     13    try {
     14        var url = webkitURL.revokeObjectURL();
     15        log("FAIL");
     16    } catch(err) {
     17        log("PASS: " + err.message);
     18    }
    1519
    1620    log("Test calling revokeObjectURL with empty URL.");
  • trunk/LayoutTests/fast/forms/ValidityState-customError-expected.txt

    r73999 r92327  
    3636Many changes for customError:
    3737Set some value, and set with no arguments.
     38PASS setCustomValidity() threw Not enough arguments
     39PASS setCustomValidity() threw Not enough arguments
     40PASS setCustomValidity() threw Not enough arguments
     41PASS setCustomValidity() threw Not enough arguments
     42PASS setCustomValidity() threw Not enough arguments
     43PASS setCustomValidity() threw Not enough arguments
     44PASS setCustomValidity() threw Not enough arguments
     45PASS setCustomValidity() threw Not enough arguments
    3846PASS customErrorFor("fieldset-many-changes") is false
    3947PASS customErrorFor("button-many-changes") is false
  • trunk/LayoutTests/fast/forms/ValidityState-customError.html

    r73999 r92327  
    9898for (i = 0; i < v.length; i++) {
    9999    v[i].setCustomValidity("Custom string");
    100     v[i].setCustomValidity();
     100    try {
     101        v[i].setCustomValidity();
     102        testFailed("setCustomValidity() did not throw");
     103    } catch(err) {
     104        testPassed("setCustomValidity() threw " + err.message);
     105    }
     106    v[i].setCustomValidity(undefined);
    101107}
    102108shouldBeFalse('customErrorFor("fieldset-many-changes")');
  • trunk/Source/WebCore/ChangeLog

    r92325 r92327  
     12011-08-03  Mark Pilgrim  <pilgrim@chromium.org>
     2
     3        Remove LegacyDefaultOptionalArguments flag from HTML DOM IDL files
     4        https://bugs.webkit.org/show_bug.cgi?id=65338
     5
     6        Reviewed by Adam Barth.
     7
     8        * html/DOMFormData.idl:
     9        * html/DOMTokenList.idl:
     10        * html/DOMURL.idl:
     11        * html/HTMLAllCollection.idl:
     12        * html/HTMLAnchorElement.idl:
     13        * html/HTMLAudioElement.idl:
     14        * html/HTMLButtonElement.idl:
     15        * html/HTMLCanvasElement.idl:
     16        * html/HTMLCollection.idl:
     17        * html/HTMLDivElement.idl:
     18        * html/HTMLDocument.idl:
     19        * html/HTMLElement.idl:
     20        * html/HTMLFieldSetElement.idl:
     21        * html/HTMLInputElement.idl:
     22        * html/HTMLKeygenElement.idl:
     23        * html/HTMLMediaElement.idl:
     24        * html/HTMLObjectElement.idl:
     25        * html/HTMLOptionsCollection.idl:
     26        * html/HTMLOutputElement.idl:
     27        * html/HTMLSelectElement.idl:
     28        * html/HTMLTableElement.idl:
     29        * html/HTMLTableRowElement.idl:
     30        * html/HTMLTableSectionElement.idl:
     31        * html/HTMLTextAreaElement.idl:
     32        * html/HTMLVideoElement.idl:
     33        * html/TimeRanges.idl:
     34
    1352011-08-03  Jeffrey Pfau  <jpfau@apple.com>
    236
  • trunk/Source/WebCore/html/DOMFormData.idl

    r89148 r92327  
    3232
    3333    interface [
    34         LegacyDefaultOptionalArguments,
    3534        CanBeConstructed,
    3635        CustomConstructFunction,
     
    4039    ] DOMFormData {
    4140        // void append(DOMString name, Blob value);
    42         [Custom] void append(in DOMString name, in DOMString value);
     41        [Custom] void append(in [Optional=CallWithDefaultValue] DOMString name,
     42                             in [Optional=CallWithDefaultValue] DOMString value);
    4343    };
    4444
  • trunk/Source/WebCore/html/DOMTokenList.idl

    r89148 r92327  
    2626
    2727    interface [
    28         LegacyDefaultOptionalArguments,
    2928        GenerateIsReachable=ImplElementRoot,
    3029        GenerateConstructor,
  • trunk/Source/WebCore/html/DOMURL.idl

    r89148 r92327  
    2626module html {
    2727    interface [
    28         LegacyDefaultOptionalArguments,
    2928        Conditional=BLOB,
    3029        OmitConstructor,
  • trunk/Source/WebCore/html/HTMLAllCollection.idl

    r89148 r92327  
    2727
    2828    interface [
    29         LegacyDefaultOptionalArguments,
    3029        HasIndexGetter,
    3130        HasNameGetter,
     
    3433    ] HTMLAllCollection {
    3534        readonly attribute unsigned long length;
    36         [Custom] Node item(in unsigned long index);
     35        [Custom] Node item(in [Optional=CallWithDefaultValue] unsigned long index);
    3736        [Custom] Node namedItem(in DOMString name);
    3837
  • trunk/Source/WebCore/html/HTMLAnchorElement.idl

    r91797 r92327  
    2121module html {
    2222
    23     interface [
    24         LegacyDefaultOptionalArguments,
    25     ] HTMLAnchorElement : HTMLElement {
     23    interface HTMLAnchorElement : HTMLElement {
    2624        attribute [Reflect] DOMString accessKey;
    2725        attribute [Reflect] DOMString charset;
  • trunk/Source/WebCore/html/HTMLAudioElement.idl

    r89148 r92327  
    2626module html {
    2727    interface [
    28         LegacyDefaultOptionalArguments,
    2928        Conditional=VIDEO
    3029    ] HTMLAudioElement : HTMLMediaElement {
  • trunk/Source/WebCore/html/HTMLButtonElement.idl

    r89148 r92327  
    2121module html {
    2222
    23     interface [
    24         LegacyDefaultOptionalArguments,
    25     ] HTMLButtonElement : HTMLElement {
     23    interface HTMLButtonElement : HTMLElement {
    2624        readonly attribute HTMLFormElement form;
    2725
  • trunk/Source/WebCore/html/HTMLCanvasElement.idl

    r89148 r92327  
    2828
    2929    interface [
    30         LegacyDefaultOptionalArguments,
    3130        GenerateNativeConverter
    3231    ] HTMLCanvasElement : HTMLElement {
     
    3534        attribute long height;
    3635
    37         [Custom] DOMString toDataURL(in [ConvertUndefinedOrNullToNullString] DOMString type)
     36        [Custom] DOMString toDataURL(in [ConvertUndefinedOrNullToNullString,Optional=CallWithDefaultValue] DOMString type)
    3837            raises(DOMException);
    3938
     
    4140#if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C
    4241        // The custom binding is needed to handle context creation attributes.
    43         [Custom] DOMObject getContext(in DOMString contextId);
     42        [Custom] DOMObject getContext(in [Optional=CallWithDefaultValue] DOMString contextId);
    4443#endif
    4544#endif
  • trunk/Source/WebCore/html/HTMLCollection.idl

    r89148 r92327  
    2222
    2323    interface [
    24         LegacyDefaultOptionalArguments,
    2524        HasIndexGetter,
    2625        HasNameGetter,
     
    3130    ] HTMLCollection {
    3231        readonly attribute unsigned long length;
    33         [Custom] Node item(in unsigned long index);
    34         [Custom] Node namedItem(in DOMString name);
     32        [Custom] Node item(in [Optional=CallWithDefaultValue] unsigned long index);
     33        [Custom] Node namedItem(in [Optional=CallWithDefaultValue] DOMString name);
    3534
    3635#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
    37         NodeList tags(in DOMString name);
     36        NodeList tags(in [Optional=CallWithDefaultValue] DOMString name);
    3837#endif
    3938    };
  • trunk/Source/WebCore/html/HTMLDivElement.idl

    r89452 r92327  
    2020module html {
    2121
    22     interface [
    23         LegacyDefaultOptionalArguments,
    24     ] HTMLDivElement : HTMLElement {
     22    interface HTMLDivElement : HTMLElement {
    2523        attribute [Reflect] DOMString align;
    2624    };
  • trunk/Source/WebCore/html/HTMLDocument.idl

    r89148 r92327  
    2222
    2323    interface [
    24         LegacyDefaultOptionalArguments,
    2524        HasOverridingNameGetter
    2625    ] HTMLDocument : Document {
    2726        [Custom, NoCPPCustom] void open();
    2827        void close();
    29         [Custom] void write(in DOMString text);
    30         [Custom] void writeln(in DOMString text);
     28        [Custom] void write(in [Optional=CallWithDefaultValue] DOMString text);
     29        [Custom] void writeln(in [Optional=CallWithDefaultValue] DOMString text);
    3130
    3231        readonly attribute HTMLCollection embeds;
  • trunk/Source/WebCore/html/HTMLElement.idl

    r89148 r92327  
    2222
    2323    interface [
    24         LegacyDefaultOptionalArguments,
    2524        GenerateNativeConverter,
    2625        CustomPushEventHandlerScope
     
    5049                     setter raises(DOMException);
    5150
    52         Element insertAdjacentElement(in DOMString where,
    53                                       in Element element)
     51        Element insertAdjacentElement(in [Optional=CallWithDefaultValue] DOMString where,
     52                                      in [Optional=CallWithDefaultValue] Element element)
    5453            raises(DOMException);
    55         void insertAdjacentHTML(in DOMString where,
    56                                 in DOMString html)
     54        void insertAdjacentHTML(in [Optional=CallWithDefaultValue] DOMString where,
     55                                in [Optional=CallWithDefaultValue] DOMString html)
    5756            raises(DOMException);
    58         void insertAdjacentText(in DOMString where,
    59                                 in DOMString text)
     57        void insertAdjacentText(in [Optional=CallWithDefaultValue] DOMString where,
     58                                in [Optional=CallWithDefaultValue] DOMString text)
    6059            raises(DOMException);
    6160
  • trunk/Source/WebCore/html/HTMLFieldSetElement.idl

    r89148 r92327  
    2020module html {
    2121
    22     interface [
    23         LegacyDefaultOptionalArguments,
    24     ] HTMLFieldSetElement : HTMLElement {
     22    interface HTMLFieldSetElement : HTMLElement {
    2523        readonly attribute HTMLFormElement form;
    2624        readonly attribute ValidityState   validity;
  • trunk/Source/WebCore/html/HTMLInputElement.idl

    r92088 r92327  
    2121module html {
    2222
    23     interface [
    24         LegacyDefaultOptionalArguments,
    25     ] HTMLInputElement : HTMLElement {
     23    interface HTMLInputElement : HTMLElement {
    2624        attribute [ConvertNullToNullString] DOMString defaultValue;
    2725        attribute [Reflect=checked] boolean defaultChecked;
     
    9492        [Custom] void setSelectionRange(in long start, in long end);
    9593#else
    96         [Custom] void setSelectionRange(in long start, in long end, in [Optional] DOMString direction);
     94        [Custom] void setSelectionRange(in [Optional=CallWithDefaultValue] long start,
     95                                        in [Optional=CallWithDefaultValue] long end,
     96                                        in [Optional] DOMString direction);
    9797#endif
    9898
  • trunk/Source/WebCore/html/HTMLKeygenElement.idl

    r89148 r92327  
    3131module html {
    3232
    33     interface [
    34         LegacyDefaultOptionalArguments,
    35     ] HTMLKeygenElement : HTMLElement {
     33    interface HTMLKeygenElement : HTMLElement {
    3634        attribute [Reflect] boolean autofocus;
    3735        attribute [Reflect] DOMString challenge;
  • trunk/Source/WebCore/html/HTMLMediaElement.idl

    r91570 r92327  
    2727    interface [
    2828        Conditional=VIDEO,
    29         LegacyDefaultOptionalArguments,
    3029    ] HTMLMediaElement : HTMLElement {
    3130
  • trunk/Source/WebCore/html/HTMLObjectElement.idl

    r89148 r92327  
    2222
    2323    interface [
    24         LegacyDefaultOptionalArguments,
    2524        DelegatingPutFunction,
    2625        DelegatingGetOwnPropertySlot,
  • trunk/Source/WebCore/html/HTMLOptionsCollection.idl

    r89148 r92327  
    2323    // FIXME: The W3C spec says that HTMLOptionsCollection should not have a parent class.
    2424    interface [
    25         LegacyDefaultOptionalArguments,
    2625        GenerateNativeConverter,
    2726        HasCustomIndexSetter
     
    3130                        setter raises (DOMException);
    3231
    33         [Custom] void add(in HTMLOptionElement option, in [Optional] unsigned long index)
     32        [Custom] void add(in [Optional=CallWithDefaultValue] HTMLOptionElement option,
     33                          in [Optional] unsigned long index)
    3434             raises (DOMException);
    35         [Custom] void remove(in unsigned long index);
     35        [Custom] void remove(in [Optional=CallWithDefaultValue] unsigned long index);
    3636
    3737#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
  • trunk/Source/WebCore/html/HTMLOutputElement.idl

    r89148 r92327  
    2424
    2525module html {
    26     interface [
    27         LegacyDefaultOptionalArguments,
    28     ] HTMLOutputElement : HTMLElement {
     26    interface HTMLOutputElement : HTMLElement {
    2927        attribute [Custom] DOMSettableTokenList htmlFor;
    3028        readonly attribute HTMLFormElement form;
  • trunk/Source/WebCore/html/HTMLSelectElement.idl

    r89148 r92327  
    2222
    2323    interface [
    24         LegacyDefaultOptionalArguments,
    2524        HasIndexGetter,
    2625        HasCustomIndexSetter
     
    5453        attribute long size;
    5554       
    56         [OldStyleObjC] void add(in HTMLElement element, in HTMLElement before) raises(DOMException);
     55        [OldStyleObjC] void add(in [Optional=CallWithDefaultValue] HTMLElement element,
     56                                in [Optional=CallWithDefaultValue] HTMLElement before) raises(DOMException);
    5757
    5858#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
     
    6666        // These methods are not in DOM Level 2 IDL, but are mentioned in the standard:
    6767        // "The contained options can be directly accessed through the select element as a collection."
    68         Node item(in [IsIndex] unsigned long index);
    69         Node namedItem(in DOMString name);
     68        Node item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index);
     69        Node namedItem(in [Optional=CallWithDefaultValue] DOMString name);
    7070        readonly attribute NodeList labels;
    7171    };
  • trunk/Source/WebCore/html/HTMLTableElement.idl

    r89148 r92327  
    2121module html {
    2222
    23     interface [
    24         LegacyDefaultOptionalArguments,
    25     ] HTMLTableElement : HTMLElement {
     23    interface HTMLTableElement : HTMLElement {
    2624        attribute HTMLTableCaptionElement caption setter raises(DOMException);
    2725        attribute HTMLTableSectionElement tHead setter raises(DOMException);
     
    4947        void deleteCaption();
    5048
    51         HTMLElement insertRow(in long index) raises(DOMException);
    52         void deleteRow(in long index) raises(DOMException);
     49        HTMLElement insertRow(in [Optional=CallWithDefaultValue] long index) raises(DOMException);
     50        void deleteRow(in [Optional=CallWithDefaultValue] long index) raises(DOMException);
    5351    };
    5452
  • trunk/Source/WebCore/html/HTMLTableRowElement.idl

    r89148 r92327  
    2121module html {
    2222
    23     interface [
    24         LegacyDefaultOptionalArguments,
    25     ] HTMLTableRowElement : HTMLElement {
     23    interface HTMLTableRowElement : HTMLElement {
    2624        readonly attribute long rowIndex;
    2725        readonly attribute long sectionRowIndex;
     
    3230        attribute [Reflect=charoff] DOMString chOff;
    3331        attribute [Reflect] DOMString vAlign;
    34         HTMLElement insertCell(in long index) raises(DOMException);
    35         void deleteCell(in long index) raises(DOMException);
     32        HTMLElement insertCell(in [Optional=CallWithDefaultValue] long index) raises(DOMException);
     33        void deleteCell(in [Optional=CallWithDefaultValue] long index) raises(DOMException);
    3634    };
    3735
  • trunk/Source/WebCore/html/HTMLTableSectionElement.idl

    r89148 r92327  
    2222
    2323    interface [
    24         LegacyDefaultOptionalArguments,
    2524        GenerateNativeConverter
    2625    ] HTMLTableSectionElement : HTMLElement {
     
    3029        attribute [Reflect] DOMString vAlign;
    3130        readonly attribute HTMLCollection rows;
    32         HTMLElement insertRow(in long index) raises(DOMException);
    33         void deleteRow(in long index) raises(DOMException);
     31        HTMLElement insertRow(in [Optional=CallWithDefaultValue] long index) raises(DOMException);
     32        void deleteRow(in [Optional=CallWithDefaultValue] long index) raises(DOMException);
    3433    };
    3534
  • trunk/Source/WebCore/html/HTMLTextAreaElement.idl

    r92088 r92327  
    2121module html {
    2222
    23     interface [
    24         LegacyDefaultOptionalArguments,
    25     ] HTMLTextAreaElement : HTMLElement {
     23    interface HTMLTextAreaElement : HTMLElement {
    2624        attribute [ConvertNullToNullString] DOMString defaultValue;
    2725        readonly attribute HTMLFormElement form;
     
    5553        void setSelectionRange(in long start, in long end);
    5654#else
    57         void setSelectionRange(in long start, in long end, in [Optional] DOMString direction);
     55        void setSelectionRange(in [Optional=CallWithDefaultValue] long start,
     56                               in [Optional=CallWithDefaultValue] long end,
     57                               in [Optional] DOMString direction);
    5858#endif
    5959        readonly attribute NodeList labels;
  • trunk/Source/WebCore/html/HTMLVideoElement.idl

    r91570 r92327  
    2727    interface [
    2828        Conditional=VIDEO,
    29         LegacyDefaultOptionalArguments,
    3029        GenerateNativeConverter
    3130    ] HTMLVideoElement : HTMLMediaElement {
  • trunk/Source/WebCore/html/TimeRanges.idl

    r89148 r92327  
    2727
    2828    interface [
    29         LegacyDefaultOptionalArguments,
    3029        Conditional=VIDEO
    3130    ] TimeRanges {
Note: See TracChangeset for help on using the changeset viewer.