Commit 19ede9b6 authored by Yuki Shiino's avatar Yuki Shiino Committed by Commit Bot

bindings: Fix default values of NamedConstructor's arguments

HTMLOptionElement's NamedConstructor's arguments should have
default values of "" (empty string) instead of IDL null.
(It's not allowed to initialize non-nullable DOMString with
IDL null.)

Bug: 839389
Change-Id: Ifab7058697b98be497c7e794ee173165dcaf10cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134027Reviewed-by: default avatarHitoshi Yoshida <peria@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755869}
parent 082b7fec
...@@ -24,6 +24,7 @@ def _all_function_likes(ir_map): ...@@ -24,6 +24,7 @@ def _all_function_likes(ir_map):
IRMap.IR.Kind.INTERFACE, IRMap.IR.Kind.NAMESPACE) IRMap.IR.Kind.INTERFACE, IRMap.IR.Kind.NAMESPACE)
for ir in irs: for ir in irs:
accumulated.extend(ir.constructors) accumulated.extend(ir.constructors)
accumulated.extend(ir.named_constructors)
accumulated.extend(ir.operations) accumulated.extend(ir.operations)
accumulated.extend(ir_map.irs_of_kinds(IRMap.IR.Kind.CALLBACK_FUNCTION)) accumulated.extend(ir_map.irs_of_kinds(IRMap.IR.Kind.CALLBACK_FUNCTION))
return accumulated return accumulated
......
...@@ -38,6 +38,13 @@ class CORE_EXPORT HTMLOptionElement final : public HTMLElement { ...@@ -38,6 +38,13 @@ class CORE_EXPORT HTMLOptionElement final : public HTMLElement {
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
public: public:
static HTMLOptionElement* CreateForJSConstructor(
Document& document,
const String& data,
ExceptionState& exception_state) {
return CreateForJSConstructor(document, data, AtomicString(), false, false,
exception_state);
}
static HTMLOptionElement* CreateForJSConstructor(Document&, static HTMLOptionElement* CreateForJSConstructor(Document&,
const String& data, const String& data,
const AtomicString& value, const AtomicString& value,
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
ConstructorCallWith=Document, ConstructorCallWith=Document,
Exposed=Window, Exposed=Window,
HTMLConstructor, HTMLConstructor,
NamedConstructor=Option(optional DOMString data = null, NamedConstructor=Option(optional DOMString data = "",
optional DOMString value = null, optional DOMString value,
optional boolean defaultSelected = false, optional boolean defaultSelected = false,
optional boolean selected = false), optional boolean selected = false),
NamedConstructor_CallWith=Document, NamedConstructor_CallWith=Document,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment