Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: Source/core/html/HTMLSelectElement.idl

Issue 312683005: IDL: Support optional argument default value syntax (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com> 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 20 matching lines...) Expand all
31 attribute long size; 31 attribute long size;
32 32
33 readonly attribute DOMString type; 33 readonly attribute DOMString type;
34 34
35 readonly attribute HTMLOptionsCollection options; 35 readonly attribute HTMLOptionsCollection options;
36 [RaisesException=Setter] attribute unsigned long length; 36 [RaisesException=Setter] attribute unsigned long length;
37 37
38 getter Element item(unsigned long index); 38 getter Element item(unsigned long index);
39 Element namedItem([Default=Undefined] optional DOMString name); 39 Element namedItem([Default=Undefined] optional DOMString name);
40 // FIXME: should be union type http://crbug.com/240176 40 // FIXME: should be union type http://crbug.com/240176
41 [RaisesException, TypeChecking=Interface] void add(HTMLElement element, [Def ault=Null] optional HTMLElement? before); 41 [RaisesException, TypeChecking=Interface] void add(HTMLElement element, opti onal HTMLElement? before = null);
haraken 2014/06/13 13:46:53 Help me understand: How is this different from:
Jens Widell 2014/06/13 14:14:52 An optional argument without a default value cause
haraken 2014/06/13 14:32:53 Ah, got it, thanks! Is there any reason we support
Jens Widell 2014/06/13 14:49:46 I don't think there's a strong reason, and I think
haraken 2014/06/13 14:59:03 Understood. I think we need a better rule for thi
Nils Barth (inactive) 2014/06/16 09:18:17 Agreed; here're my thoughts: * We should match IDL
haraken 2014/06/16 09:35:40 Sounds reasonable to me.
42 [ImplementedAs=addBeforeOptionAtIndex, RaisesException, TypeChecking=Interfa ce] void add(HTMLElement element, long before); 42 [ImplementedAs=addBeforeOptionAtIndex, RaisesException, TypeChecking=Interfa ce] void add(HTMLElement element, long before);
43 [RaisesException] void remove(); // ChildNode overload 43 [RaisesException] void remove(); // ChildNode overload
44 void remove(long index); 44 void remove(long index);
45 [RaisesException, TypeChecking=Interface|Nullable] setter HTMLOptionElement (unsigned long index, HTMLOptionElement? value); 45 [RaisesException, TypeChecking=Interface|Nullable] setter HTMLOptionElement (unsigned long index, HTMLOptionElement? value);
46 46
47 readonly attribute HTMLCollection selectedOptions; 47 readonly attribute HTMLCollection selectedOptions;
48 attribute long selectedIndex; 48 attribute long selectedIndex;
49 attribute DOMString value; 49 attribute DOMString value;
50 50
51 readonly attribute boolean willValidate; 51 readonly attribute boolean willValidate;
52 readonly attribute ValidityState validity; 52 readonly attribute ValidityState validity;
53 readonly attribute DOMString validationMessage; 53 readonly attribute DOMString validationMessage;
54 boolean checkValidity(); 54 boolean checkValidity();
55 void setCustomValidity([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString error); 55 void setCustomValidity([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString error);
56 56
57 readonly attribute NodeList labels; 57 readonly attribute NodeList labels;
58 }; 58 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698