Changeset 206974 in webkit


Ignore:
Timestamp:
Oct 9, 2016 6:16:05 PM (8 years ago)
Author:
Chris Dumez
Message:

Update generated bindings code so that dictionary structures no longer need explicit constructors
https://bugs.webkit.org/show_bug.cgi?id=163188

Reviewed by Darin Adler.

Update generated bindings code so that dictionary structures no longer
need explicit constructors. We now call the default constructor and
then initialize the members one by one.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateDictionaryImplementationContent):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::convertDictionary<TestObj::Dictionary>):
(WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
(WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
(WebCore::convertDictionary<AlternateDictionaryName>):
(WebCore::convertDictionary<TestObj::ParentDictionary>):
(WebCore::convertDictionary<TestObj::ChildDictionary>):

  • bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:

(WebCore::convertDictionary<TestStandaloneDictionary>):

  • dom/ClipboardEvent.h:
  • dom/CustomEvent.h:
  • dom/EventInit.h:

(WebCore::EventInit::EventInit): Deleted.

  • dom/EventModifierInit.h:

(WebCore::EventModifierInit::EventModifierInit): Deleted.

  • dom/KeyboardEvent.cpp:

(WebCore::KeyboardEvent::KeyboardEvent):

  • dom/KeyboardEvent.h:
  • dom/KeyboardEvent.idl:
  • dom/UIEventInit.h:

(WebCore::UIEventInit::UIEventInit): Deleted.

  • editing/Editor.cpp:

(WebCore::Editor::dispatchCPPEvent):

Location:
trunk/Source/WebCore
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r206972 r206974  
     12016-10-09  Chris Dumez  <cdumez@apple.com>
     2
     3        Update generated bindings code so that dictionary structures no longer need explicit constructors
     4        https://bugs.webkit.org/show_bug.cgi?id=163188
     5
     6        Reviewed by Darin Adler.
     7
     8        Update generated bindings code so that dictionary structures no longer
     9        need explicit constructors. We now call the default constructor and
     10        then initialize the members one by one.
     11
     12        * bindings/scripts/CodeGeneratorJS.pm:
     13        (GenerateDictionaryImplementationContent):
     14        * bindings/scripts/test/JS/JSTestObj.cpp:
     15        (WebCore::convertDictionary<TestObj::Dictionary>):
     16        (WebCore::convertDictionary<TestObj::DictionaryThatShouldNotTolerateNull>):
     17        (WebCore::convertDictionary<TestObj::DictionaryThatShouldTolerateNull>):
     18        (WebCore::convertDictionary<AlternateDictionaryName>):
     19        (WebCore::convertDictionary<TestObj::ParentDictionary>):
     20        (WebCore::convertDictionary<TestObj::ChildDictionary>):
     21        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
     22        (WebCore::convertDictionary<TestStandaloneDictionary>):
     23        * dom/ClipboardEvent.h:
     24        * dom/CustomEvent.h:
     25        * dom/EventInit.h:
     26        (WebCore::EventInit::EventInit): Deleted.
     27        * dom/EventModifierInit.h:
     28        (WebCore::EventModifierInit::EventModifierInit): Deleted.
     29        * dom/KeyboardEvent.cpp:
     30        (WebCore::KeyboardEvent::KeyboardEvent):
     31        * dom/KeyboardEvent.h:
     32        * dom/KeyboardEvent.idl:
     33        * dom/UIEventInit.h:
     34        (WebCore::UIEventInit::UIEventInit): Deleted.
     35        * editing/Editor.cpp:
     36        (WebCore::Editor::dispatchCPPEvent):
     37
    1382016-10-09  Fujii Hironori  <Hironori.Fujii@sony.com>
    239
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r206966 r206974  
    10871087    my $comma = "";
    10881088
     1089    $result .= "    $className result;\n";
     1090
    10891091    # 5. For each dictionary dictionary in dictionaries, in order:
    10901092    foreach my $dictionary (@dictionaries) {
     
    11031105
    11041106            my $nativeType = GetNativeTypeFromSignature($interface, $member);
    1105             if ($member->isOptional && !defined $member->default) {
    1106                 $result .= "    Converter<$nativeType>::OptionalValue $key;\n";
    1107             } else {
    1108                 $result .= "    $nativeType $key;\n";
    1109             }
    11101107
    11111108            # 5.3. If value is not undefined, then:
     
    11161113                die "Dictionary members of non-nullable wrapper types must be marked as required" if !$member->isNullable && $member->isOptional;
    11171114                my $nullableParameter = $member->isNullable ? "IsNullable::Yes" : "IsNullable::No";
    1118                 $result .= "        $key = convertWrapperType<$type, JS${type}>(state, ${key}Value, $nullableParameter);\n";
     1115                $result .= "        result.$key = convertWrapperType<$type, JS${type}>(state, ${key}Value, $nullableParameter);\n";
     1116                $result .= "        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n";
    11191117            } elsif ($codeGenerator->IsDictionaryType($type)) {
    11201118                my $nativeType = GetNativeType($interface, $type);
    1121                 $result .= "        $key = convertDictionary<${nativeType}>(state, ${key}Value);\n";
     1119                $result .= "        Optional<${nativeType}> $key = convertDictionary<${nativeType}>(state, ${key}Value).value();\n";
     1120                $result .= "        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n";
     1121                $result .= "        result.$key = $key.value();\n";
    11221122            } else {
    11231123                my $conversionRuleWithLeadingComma = GenerateConversionRuleWithLeadingComma($interface, $member);
    1124                 $result .= "        $key = convert<${nativeType}>(state, ${key}Value${conversionRuleWithLeadingComma});\n";
    1125             }
    1126             $result .= "        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n";
     1124                $result .= "        result.$key = convert<${nativeType}>(state, ${key}Value${conversionRuleWithLeadingComma});\n";
     1125                $result .= "        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n";
     1126            }
    11271127            # Value is undefined.
    11281128            # 5.4. Otherwise, if value is undefined but the dictionary member has a default value, then:
    11291129            if ($member->isOptional && defined $member->default) {
    11301130                $result .= "    } else\n";
    1131                 $result .= "        $key = " . GenerateDefaultValue($interface, $member) . ";\n";
     1131                $result .= "        result.$key = " . GenerateDefaultValue($interface, $member) . ";\n";
    11321132            } elsif (!$member->isOptional) {
    11331133                # 5.5. Otherwise, if value is undefined and the dictionary member is a required dictionary member, then throw a TypeError.
     
    11401140            }
    11411141        }
    1142 
    1143         # 6. Return dict.
    1144         foreach my $member (@{$dictionary->members}) {
    1145             my $value;
    1146             if ($codeGenerator->IsWrapperType($member->type) && !$member->isNullable) {
    1147                 $value = "*" . $member->name;
    1148             } elsif ($codeGenerator->IsDictionaryType($member->type)) {
    1149                 $value = $member->name . ".value()";
    1150             } else {
    1151                 $value = "WTFMove(" . $member->name . ")";
    1152             }
    1153             $arguments .= $comma . $value;
    1154             $comma = ", ";
    1155         }
    1156     }
    1157 
    1158     $result .= "    return $className { " . $arguments . " };\n";
     1142    }
     1143
     1144    $result .= "    return WTFMove(result);\n";
    11591145    $result .= "}\n\n";
    11601146    $result .= "#endif\n\n" if $conditionalString;
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp

    r206966 r206974  
    476476        return Nullopt;
    477477    }
     478    TestObj::Dictionary result;
    478479    JSValue anyTypedefValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyTypedefValue"));
    479     JSC::JSValue anyTypedefValue;
    480480    if (!anyTypedefValueValue.isUndefined()) {
    481         anyTypedefValue = convert<JSC::JSValue>(state, anyTypedefValueValue);
     481        result.anyTypedefValue = convert<JSC::JSValue>(state, anyTypedefValueValue);
    482482        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    483483    } else
    484         anyTypedefValue = jsUndefined();
     484        result.anyTypedefValue = jsUndefined();
    485485    JSValue anyValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyValue"));
    486     JSC::JSValue anyValue;
    487486    if (!anyValueValue.isUndefined()) {
    488         anyValue = convert<JSC::JSValue>(state, anyValueValue);
     487        result.anyValue = convert<JSC::JSValue>(state, anyValueValue);
    489488        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    490489    } else
    491         anyValue = jsUndefined();
     490        result.anyValue = jsUndefined();
    492491    JSValue anyValueWithNullDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "anyValueWithNullDefault"));
    493     JSC::JSValue anyValueWithNullDefault;
    494492    if (!anyValueWithNullDefaultValue.isUndefined()) {
    495         anyValueWithNullDefault = convert<JSC::JSValue>(state, anyValueWithNullDefaultValue);
     493        result.anyValueWithNullDefault = convert<JSC::JSValue>(state, anyValueWithNullDefaultValue);
    496494        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    497495    } else
    498         anyValueWithNullDefault = jsNull();
     496        result.anyValueWithNullDefault = jsNull();
    499497    JSValue booleanWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithDefault"));
    500     bool booleanWithDefault;
    501498    if (!booleanWithDefaultValue.isUndefined()) {
    502         booleanWithDefault = convert<bool>(state, booleanWithDefaultValue);
     499        result.booleanWithDefault = convert<bool>(state, booleanWithDefaultValue);
    503500        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    504501    } else
    505         booleanWithDefault = false;
     502        result.booleanWithDefault = false;
    506503    JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
    507     Converter<bool>::OptionalValue booleanWithoutDefault;
    508504    if (!booleanWithoutDefaultValue.isUndefined()) {
    509         booleanWithoutDefault = convert<bool>(state, booleanWithoutDefaultValue);
     505        result.booleanWithoutDefault = convert<bool>(state, booleanWithoutDefaultValue);
    510506        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    511507    }
    512508    JSValue dictionaryMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "dictionaryMember"));
    513     Converter<TestObj::DictionaryThatShouldTolerateNull>::OptionalValue dictionaryMember;
    514509    if (!dictionaryMemberValue.isUndefined()) {
    515         dictionaryMember = convertDictionary<TestObj::DictionaryThatShouldTolerateNull>(state, dictionaryMemberValue);
     510        Optional<TestObj::DictionaryThatShouldTolerateNull> dictionaryMember = convertDictionary<TestObj::DictionaryThatShouldTolerateNull>(state, dictionaryMemberValue).value();
    516511        RETURN_IF_EXCEPTION(throwScope, Nullopt);
     512        result.dictionaryMember = dictionaryMember.value();
    517513    }
    518514    JSValue enumerationValueWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithDefault"));
    519     TestObj::EnumType enumerationValueWithDefault;
    520515    if (!enumerationValueWithDefaultValue.isUndefined()) {
    521         enumerationValueWithDefault = convert<TestObj::EnumType>(state, enumerationValueWithDefaultValue);
     516        result.enumerationValueWithDefault = convert<TestObj::EnumType>(state, enumerationValueWithDefaultValue);
    522517        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    523518    } else
    524         enumerationValueWithDefault = TestObj::EnumType::EnumValue1;
     519        result.enumerationValueWithDefault = TestObj::EnumType::EnumValue1;
    525520    JSValue enumerationValueWithEmptyStringDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithEmptyStringDefault"));
    526     TestObj::EnumType enumerationValueWithEmptyStringDefault;
    527521    if (!enumerationValueWithEmptyStringDefaultValue.isUndefined()) {
    528         enumerationValueWithEmptyStringDefault = convert<TestObj::EnumType>(state, enumerationValueWithEmptyStringDefaultValue);
     522        result.enumerationValueWithEmptyStringDefault = convert<TestObj::EnumType>(state, enumerationValueWithEmptyStringDefaultValue);
    529523        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    530524    } else
    531         enumerationValueWithEmptyStringDefault = TestObj::EnumType::EmptyString;
     525        result.enumerationValueWithEmptyStringDefault = TestObj::EnumType::EmptyString;
    532526    JSValue enumerationValueWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValueWithoutDefault"));
    533     Converter<TestObj::EnumType>::OptionalValue enumerationValueWithoutDefault;
    534527    if (!enumerationValueWithoutDefaultValue.isUndefined()) {
    535         enumerationValueWithoutDefault = convert<TestObj::EnumType>(state, enumerationValueWithoutDefaultValue);
     528        result.enumerationValueWithoutDefault = convert<TestObj::EnumType>(state, enumerationValueWithoutDefaultValue);
    536529        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    537530    }
    538531    JSValue integerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "integer"));
    539     Converter<int32_t>::OptionalValue integer;
    540532    if (!integerValue.isUndefined()) {
    541         integer = convert<int32_t>(state, integerValue, NormalConversion);
     533        result.integer = convert<int32_t>(state, integerValue, NormalConversion);
    542534        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    543535    }
    544536    JSValue integerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "integerWithDefault"));
    545     int32_t integerWithDefault;
    546537    if (!integerWithDefaultValue.isUndefined()) {
    547         integerWithDefault = convert<int32_t>(state, integerWithDefaultValue, NormalConversion);
     538        result.integerWithDefault = convert<int32_t>(state, integerWithDefaultValue, NormalConversion);
    548539        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    549540    } else
    550         integerWithDefault = 0;
     541        result.integerWithDefault = 0;
    551542    JSValue largeIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "largeInteger"));
    552     Converter<int64_t>::OptionalValue largeInteger;
    553543    if (!largeIntegerValue.isUndefined()) {
    554         largeInteger = convert<int64_t>(state, largeIntegerValue, NormalConversion);
     544        result.largeInteger = convert<int64_t>(state, largeIntegerValue, NormalConversion);
    555545        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    556546    }
    557547    JSValue largeIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "largeIntegerWithDefault"));
    558     int64_t largeIntegerWithDefault;
    559548    if (!largeIntegerWithDefaultValue.isUndefined()) {
    560         largeIntegerWithDefault = convert<int64_t>(state, largeIntegerWithDefaultValue, NormalConversion);
     549        result.largeIntegerWithDefault = convert<int64_t>(state, largeIntegerWithDefaultValue, NormalConversion);
    561550        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    562551    } else
    563         largeIntegerWithDefault = 0;
     552        result.largeIntegerWithDefault = 0;
    564553    JSValue nullableNodeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nullableNode"));
    565     Node* nullableNode;
    566554    if (!nullableNodeValue.isUndefined()) {
    567         nullableNode = convertWrapperType<Node, JSNode>(state, nullableNodeValue, IsNullable::Yes);
     555        result.nullableNode = convertWrapperType<Node, JSNode>(state, nullableNodeValue, IsNullable::Yes);
    568556        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    569557    } else
    570         nullableNode = nullptr;
     558        result.nullableNode = nullptr;
    571559    JSValue restrictedDoubleValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedDouble"));
    572     Converter<double>::OptionalValue restrictedDouble;
    573560    if (!restrictedDoubleValue.isUndefined()) {
    574         restrictedDouble = convert<double>(state, restrictedDoubleValue, ShouldAllowNonFinite::No);
     561        result.restrictedDouble = convert<double>(state, restrictedDoubleValue, ShouldAllowNonFinite::No);
    575562        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    576563    }
    577564    JSValue restrictedDoubleWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedDoubleWithDefault"));
    578     double restrictedDoubleWithDefault;
    579565    if (!restrictedDoubleWithDefaultValue.isUndefined()) {
    580         restrictedDoubleWithDefault = convert<double>(state, restrictedDoubleWithDefaultValue, ShouldAllowNonFinite::No);
     566        result.restrictedDoubleWithDefault = convert<double>(state, restrictedDoubleWithDefaultValue, ShouldAllowNonFinite::No);
    581567        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    582568    } else
    583         restrictedDoubleWithDefault = 0;
     569        result.restrictedDoubleWithDefault = 0;
    584570    JSValue restrictedFloatValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedFloat"));
    585     Converter<float>::OptionalValue restrictedFloat;
    586571    if (!restrictedFloatValue.isUndefined()) {
    587         restrictedFloat = convert<float>(state, restrictedFloatValue, ShouldAllowNonFinite::No);
     572        result.restrictedFloat = convert<float>(state, restrictedFloatValue, ShouldAllowNonFinite::No);
    588573        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    589574    }
    590575    JSValue restrictedFloatWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "restrictedFloatWithDefault"));
    591     float restrictedFloatWithDefault;
    592576    if (!restrictedFloatWithDefaultValue.isUndefined()) {
    593         restrictedFloatWithDefault = convert<float>(state, restrictedFloatWithDefaultValue, ShouldAllowNonFinite::No);
     577        result.restrictedFloatWithDefault = convert<float>(state, restrictedFloatWithDefaultValue, ShouldAllowNonFinite::No);
    594578        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    595579    } else
    596         restrictedFloatWithDefault = 0;
     580        result.restrictedFloatWithDefault = 0;
    597581    JSValue sequenceOfStringsValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "sequenceOfStrings"));
    598     Converter<Vector<String>>::OptionalValue sequenceOfStrings;
    599582    if (!sequenceOfStringsValue.isUndefined()) {
    600         sequenceOfStrings = convert<Vector<String>>(state, sequenceOfStringsValue);
     583        result.sequenceOfStrings = convert<Vector<String>>(state, sequenceOfStringsValue);
    601584        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    602585    }
    603586    JSValue smallIntegerClampedValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallIntegerClamped"));
    604     Converter<int8_t>::OptionalValue smallIntegerClamped;
    605587    if (!smallIntegerClampedValue.isUndefined()) {
    606         smallIntegerClamped = convert<int8_t>(state, smallIntegerClampedValue, Clamp);
     588        result.smallIntegerClamped = convert<int8_t>(state, smallIntegerClampedValue, Clamp);
    607589        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    608590    }
    609591    JSValue smallIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallIntegerWithDefault"));
    610     Converter<int8_t>::OptionalValue smallIntegerWithDefault;
    611592    if (!smallIntegerWithDefaultValue.isUndefined()) {
    612         smallIntegerWithDefault = convert<int8_t>(state, smallIntegerWithDefaultValue, NormalConversion);
     593        result.smallIntegerWithDefault = convert<int8_t>(state, smallIntegerWithDefaultValue, NormalConversion);
    613594        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    614595    }
    615596    JSValue smallUnsignedIntegerEnforcedRangeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerEnforcedRange"));
    616     Converter<uint8_t>::OptionalValue smallUnsignedIntegerEnforcedRange;
    617597    if (!smallUnsignedIntegerEnforcedRangeValue.isUndefined()) {
    618         smallUnsignedIntegerEnforcedRange = convert<uint8_t>(state, smallUnsignedIntegerEnforcedRangeValue, EnforceRange);
     598        result.smallUnsignedIntegerEnforcedRange = convert<uint8_t>(state, smallUnsignedIntegerEnforcedRangeValue, EnforceRange);
    619599        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    620600    }
    621601    JSValue smallUnsignedIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "smallUnsignedIntegerWithDefault"));
    622     uint8_t smallUnsignedIntegerWithDefault;
    623602    if (!smallUnsignedIntegerWithDefaultValue.isUndefined()) {
    624         smallUnsignedIntegerWithDefault = convert<uint8_t>(state, smallUnsignedIntegerWithDefaultValue, NormalConversion);
     603        result.smallUnsignedIntegerWithDefault = convert<uint8_t>(state, smallUnsignedIntegerWithDefaultValue, NormalConversion);
    625604        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    626605    } else
    627         smallUnsignedIntegerWithDefault = 0;
     606        result.smallUnsignedIntegerWithDefault = 0;
    628607    JSValue stringWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithDefault"));
    629     String stringWithDefault;
    630608    if (!stringWithDefaultValue.isUndefined()) {
    631         stringWithDefault = convert<String>(state, stringWithDefaultValue);
     609        result.stringWithDefault = convert<String>(state, stringWithDefaultValue);
    632610        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    633611    } else
    634         stringWithDefault = "defaultString";
     612        result.stringWithDefault = "defaultString";
    635613    JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringWithoutDefault"));
    636     Converter<String>::OptionalValue stringWithoutDefault;
    637614    if (!stringWithoutDefaultValue.isUndefined()) {
    638         stringWithoutDefault = convert<String>(state, stringWithoutDefaultValue);
     615        result.stringWithoutDefault = convert<String>(state, stringWithoutDefaultValue);
    639616        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    640617    }
    641618    JSValue unrestrictedDoubleValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedDouble"));
    642     Converter<double>::OptionalValue unrestrictedDouble;
    643619    if (!unrestrictedDoubleValue.isUndefined()) {
    644         unrestrictedDouble = convert<double>(state, unrestrictedDoubleValue, ShouldAllowNonFinite::Yes);
     620        result.unrestrictedDouble = convert<double>(state, unrestrictedDoubleValue, ShouldAllowNonFinite::Yes);
    645621        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    646622    }
    647623    JSValue unrestrictedDoubleWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedDoubleWithDefault"));
    648     double unrestrictedDoubleWithDefault;
    649624    if (!unrestrictedDoubleWithDefaultValue.isUndefined()) {
    650         unrestrictedDoubleWithDefault = convert<double>(state, unrestrictedDoubleWithDefaultValue, ShouldAllowNonFinite::Yes);
     625        result.unrestrictedDoubleWithDefault = convert<double>(state, unrestrictedDoubleWithDefaultValue, ShouldAllowNonFinite::Yes);
    651626        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    652627    } else
    653         unrestrictedDoubleWithDefault = 0;
     628        result.unrestrictedDoubleWithDefault = 0;
    654629    JSValue unrestrictedFloatValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedFloat"));
    655     Converter<float>::OptionalValue unrestrictedFloat;
    656630    if (!unrestrictedFloatValue.isUndefined()) {
    657         unrestrictedFloat = convert<float>(state, unrestrictedFloatValue, ShouldAllowNonFinite::Yes);
     631        result.unrestrictedFloat = convert<float>(state, unrestrictedFloatValue, ShouldAllowNonFinite::Yes);
    658632        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    659633    }
    660634    JSValue unrestrictedFloatWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unrestrictedFloatWithDefault"));
    661     float unrestrictedFloatWithDefault;
    662635    if (!unrestrictedFloatWithDefaultValue.isUndefined()) {
    663         unrestrictedFloatWithDefault = convert<float>(state, unrestrictedFloatWithDefaultValue, ShouldAllowNonFinite::Yes);
     636        result.unrestrictedFloatWithDefault = convert<float>(state, unrestrictedFloatWithDefaultValue, ShouldAllowNonFinite::Yes);
    664637        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    665638    } else
    666         unrestrictedFloatWithDefault = 0;
     639        result.unrestrictedFloatWithDefault = 0;
    667640    JSValue unsignedIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedInteger"));
    668     Converter<uint32_t>::OptionalValue unsignedInteger;
    669641    if (!unsignedIntegerValue.isUndefined()) {
    670         unsignedInteger = convert<uint32_t>(state, unsignedIntegerValue, NormalConversion);
     642        result.unsignedInteger = convert<uint32_t>(state, unsignedIntegerValue, NormalConversion);
    671643        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    672644    }
    673645    JSValue unsignedIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedIntegerWithDefault"));
    674     uint32_t unsignedIntegerWithDefault;
    675646    if (!unsignedIntegerWithDefaultValue.isUndefined()) {
    676         unsignedIntegerWithDefault = convert<uint32_t>(state, unsignedIntegerWithDefaultValue, NormalConversion);
     647        result.unsignedIntegerWithDefault = convert<uint32_t>(state, unsignedIntegerWithDefaultValue, NormalConversion);
    677648        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    678649    } else
    679         unsignedIntegerWithDefault = 0;
     650        result.unsignedIntegerWithDefault = 0;
    680651    JSValue unsignedLargeIntegerValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedLargeInteger"));
    681     Converter<uint64_t>::OptionalValue unsignedLargeInteger;
    682652    if (!unsignedLargeIntegerValue.isUndefined()) {
    683         unsignedLargeInteger = convert<uint64_t>(state, unsignedLargeIntegerValue, NormalConversion);
     653        result.unsignedLargeInteger = convert<uint64_t>(state, unsignedLargeIntegerValue, NormalConversion);
    684654        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    685655    }
    686656    JSValue unsignedLargeIntegerWithDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "unsignedLargeIntegerWithDefault"));
    687     uint64_t unsignedLargeIntegerWithDefault;
    688657    if (!unsignedLargeIntegerWithDefaultValue.isUndefined()) {
    689         unsignedLargeIntegerWithDefault = convert<uint64_t>(state, unsignedLargeIntegerWithDefaultValue, NormalConversion);
     658        result.unsignedLargeIntegerWithDefault = convert<uint64_t>(state, unsignedLargeIntegerWithDefaultValue, NormalConversion);
    690659        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    691660    } else
    692         unsignedLargeIntegerWithDefault = 0;
    693     return TestObj::Dictionary { WTFMove(enumerationValueWithoutDefault), WTFMove(enumerationValueWithDefault), WTFMove(enumerationValueWithEmptyStringDefault), WTFMove(stringWithDefault), WTFMove(stringWithoutDefault), WTFMove(booleanWithDefault), WTFMove(booleanWithoutDefault), WTFMove(sequenceOfStrings), WTFMove(restrictedDouble), WTFMove(unrestrictedDouble), WTFMove(restrictedDoubleWithDefault), WTFMove(unrestrictedDoubleWithDefault), WTFMove(restrictedFloat), WTFMove(unrestrictedFloat), WTFMove(restrictedFloatWithDefault), WTFMove(unrestrictedFloatWithDefault), WTFMove(smallIntegerClamped), WTFMove(smallIntegerWithDefault), WTFMove(smallUnsignedIntegerEnforcedRange), WTFMove(smallUnsignedIntegerWithDefault), WTFMove(integer), WTFMove(integerWithDefault), WTFMove(unsignedInteger), WTFMove(unsignedIntegerWithDefault), WTFMove(largeInteger), WTFMove(largeIntegerWithDefault), WTFMove(unsignedLargeInteger), WTFMove(unsignedLargeIntegerWithDefault), WTFMove(nullableNode), WTFMove(anyValue), WTFMove(anyValueWithNullDefault), WTFMove(anyTypedefValue), dictionaryMember.value() };
     661        result.unsignedLargeIntegerWithDefault = 0;
     662    return WTFMove(result);
    694663}
    695664
     
    708677        return Nullopt;
    709678    }
     679    TestObj::DictionaryThatShouldNotTolerateNull result;
    710680    JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
    711     Converter<bool>::OptionalValue booleanWithoutDefault;
    712681    if (!booleanWithoutDefaultValue.isUndefined()) {
    713         booleanWithoutDefault = convert<bool>(state, booleanWithoutDefaultValue);
     682        result.booleanWithoutDefault = convert<bool>(state, booleanWithoutDefaultValue);
    714683        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    715684    }
    716685    JSValue nonNullableNodeValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "nonNullableNode"));
    717     Node* nonNullableNode;
    718686    if (!nonNullableNodeValue.isUndefined()) {
    719         nonNullableNode = convertWrapperType<Node, JSNode>(state, nonNullableNodeValue, IsNullable::No);
     687        result.nonNullableNode = convertWrapperType<Node, JSNode>(state, nonNullableNodeValue, IsNullable::No);
    720688        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    721689    } else {
     
    724692    }
    725693    JSValue requiredDictionaryMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredDictionaryMember"));
    726     TestObj::Dictionary requiredDictionaryMember;
    727694    if (!requiredDictionaryMemberValue.isUndefined()) {
    728         requiredDictionaryMember = convertDictionary<TestObj::Dictionary>(state, requiredDictionaryMemberValue);
     695        Optional<TestObj::Dictionary> requiredDictionaryMember = convertDictionary<TestObj::Dictionary>(state, requiredDictionaryMemberValue).value();
     696        RETURN_IF_EXCEPTION(throwScope, Nullopt);
     697        result.requiredDictionaryMember = requiredDictionaryMember.value();
     698    } else {
     699        throwTypeError(&state, throwScope);
     700        return Nullopt;
     701    }
     702    JSValue requiredEnumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredEnumerationValue"));
     703    if (!requiredEnumerationValueValue.isUndefined()) {
     704        result.requiredEnumerationValue = convert<TestObj::EnumType>(state, requiredEnumerationValueValue);
    729705        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    730706    } else {
     
    732708        return Nullopt;
    733709    }
    734     JSValue requiredEnumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "requiredEnumerationValue"));
    735     TestObj::EnumType requiredEnumerationValue;
    736     if (!requiredEnumerationValueValue.isUndefined()) {
    737         requiredEnumerationValue = convert<TestObj::EnumType>(state, requiredEnumerationValueValue);
    738         RETURN_IF_EXCEPTION(throwScope, Nullopt);
    739     } else {
    740         throwTypeError(&state, throwScope);
    741         return Nullopt;
    742     }
    743     return TestObj::DictionaryThatShouldNotTolerateNull { WTFMove(requiredEnumerationValue), WTFMove(booleanWithoutDefault), *nonNullableNode, requiredDictionaryMember.value() };
     710    return WTFMove(result);
    744711}
    745712
     
    758725        return Nullopt;
    759726    }
     727    TestObj::DictionaryThatShouldTolerateNull result;
    760728    JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
    761     Converter<bool>::OptionalValue booleanWithoutDefault;
    762729    if (!booleanWithoutDefaultValue.isUndefined()) {
    763         booleanWithoutDefault = convert<bool>(state, booleanWithoutDefaultValue);
     730        result.booleanWithoutDefault = convert<bool>(state, booleanWithoutDefaultValue);
    764731        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    765732    }
    766733    JSValue enumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValue"));
    767     Converter<TestObj::EnumType>::OptionalValue enumerationValue;
    768734    if (!enumerationValueValue.isUndefined()) {
    769         enumerationValue = convert<TestObj::EnumType>(state, enumerationValueValue);
     735        result.enumerationValue = convert<TestObj::EnumType>(state, enumerationValueValue);
    770736        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    771737    }
    772     return TestObj::DictionaryThatShouldTolerateNull { WTFMove(enumerationValue), WTFMove(booleanWithoutDefault) };
     738    return WTFMove(result);
    773739}
    774740
     
    787753        return Nullopt;
    788754    }
     755    AlternateDictionaryName result;
    789756    JSValue booleanWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "booleanWithoutDefault"));
    790     Converter<bool>::OptionalValue booleanWithoutDefault;
    791757    if (!booleanWithoutDefaultValue.isUndefined()) {
    792         booleanWithoutDefault = convert<bool>(state, booleanWithoutDefaultValue);
     758        result.booleanWithoutDefault = convert<bool>(state, booleanWithoutDefaultValue);
    793759        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    794760    }
    795761    JSValue enumerationValueValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "enumerationValue"));
    796     Converter<TestObj::EnumType>::OptionalValue enumerationValue;
    797762    if (!enumerationValueValue.isUndefined()) {
    798         enumerationValue = convert<TestObj::EnumType>(state, enumerationValueValue);
     763        result.enumerationValue = convert<TestObj::EnumType>(state, enumerationValueValue);
    799764        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    800765    }
    801     return AlternateDictionaryName { WTFMove(enumerationValue), WTFMove(booleanWithoutDefault) };
     766    return WTFMove(result);
    802767}
    803768
     
    816781        return Nullopt;
    817782    }
     783    TestObj::ParentDictionary result;
    818784    JSValue parentMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember1"));
    819     Converter<bool>::OptionalValue parentMember1;
    820785    if (!parentMember1Value.isUndefined()) {
    821         parentMember1 = convert<bool>(state, parentMember1Value);
     786        result.parentMember1 = convert<bool>(state, parentMember1Value);
    822787        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    823788    }
    824789    JSValue parentMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember2"));
    825     Converter<bool>::OptionalValue parentMember2;
    826790    if (!parentMember2Value.isUndefined()) {
    827         parentMember2 = convert<bool>(state, parentMember2Value);
     791        result.parentMember2 = convert<bool>(state, parentMember2Value);
    828792        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    829793    }
    830     return TestObj::ParentDictionary { WTFMove(parentMember2), WTFMove(parentMember1) };
     794    return WTFMove(result);
    831795}
    832796
     
    845809        return Nullopt;
    846810    }
     811    TestObj::ChildDictionary result;
    847812    JSValue parentMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember1"));
    848     Converter<bool>::OptionalValue parentMember1;
    849813    if (!parentMember1Value.isUndefined()) {
    850         parentMember1 = convert<bool>(state, parentMember1Value);
     814        result.parentMember1 = convert<bool>(state, parentMember1Value);
    851815        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    852816    }
    853817    JSValue parentMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "parentMember2"));
    854     Converter<bool>::OptionalValue parentMember2;
    855818    if (!parentMember2Value.isUndefined()) {
    856         parentMember2 = convert<bool>(state, parentMember2Value);
     819        result.parentMember2 = convert<bool>(state, parentMember2Value);
    857820        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    858821    }
    859822    JSValue childMember1Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "childMember1"));
    860     Converter<bool>::OptionalValue childMember1;
    861823    if (!childMember1Value.isUndefined()) {
    862         childMember1 = convert<bool>(state, childMember1Value);
     824        result.childMember1 = convert<bool>(state, childMember1Value);
    863825        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    864826    }
    865827    JSValue childMember2Value = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "childMember2"));
    866     Converter<bool>::OptionalValue childMember2;
    867828    if (!childMember2Value.isUndefined()) {
    868         childMember2 = convert<bool>(state, childMember2Value);
     829        result.childMember2 = convert<bool>(state, childMember2Value);
    869830        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    870831    }
    871     return TestObj::ChildDictionary { WTFMove(parentMember2), WTFMove(parentMember1), WTFMove(childMember2), WTFMove(childMember1) };
     832    return WTFMove(result);
    872833}
    873834
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp

    r206877 r206974  
    4141        return Nullopt;
    4242    }
     43    TestStandaloneDictionary result;
    4344    JSValue boolMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "boolMember"));
    44     Converter<bool>::OptionalValue boolMember;
    4545    if (!boolMemberValue.isUndefined()) {
    46         boolMember = convert<bool>(state, boolMemberValue);
     46        result.boolMember = convert<bool>(state, boolMemberValue);
    4747        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    4848    }
    4949    JSValue stringMemberValue = isNullOrUndefined ? jsUndefined() : object->get(&state, Identifier::fromString(&state, "stringMember"));
    50     Converter<String>::OptionalValue stringMember;
    5150    if (!stringMemberValue.isUndefined()) {
    52         stringMember = convert<String>(state, stringMemberValue);
     51        result.stringMember = convert<String>(state, stringMemberValue);
    5352        RETURN_IF_EXCEPTION(throwScope, Nullopt);
    5453    }
    55     return TestStandaloneDictionary { WTFMove(boolMember), WTFMove(stringMember) };
     54    return WTFMove(result);
    5655}
    5756
  • trunk/Source/WebCore/dom/ClipboardEvent.h

    r206963 r206974  
    3535    virtual ~ClipboardEvent();
    3636
    37     struct Init : public EventInit {
    38         Init(bool bubbles, bool cancelable, bool composed, RefPtr<DataTransfer>&& clipboardData)
    39             : EventInit(bubbles, cancelable, composed)
    40             , clipboardData(WTFMove(clipboardData))
    41         {
    42         }
    43 
     37    struct Init : EventInit {
    4438        RefPtr<DataTransfer> clipboardData;
    4539    };
  • trunk/Source/WebCore/dom/CustomEvent.h

    r206964 r206974  
    4242    }
    4343
    44     struct Init : public EventInit {
    45         Init(bool bubbles, bool cancelable, bool composed, JSC::JSValue detail)
    46             : EventInit(bubbles, cancelable, composed)
    47             , detail(detail)
    48         { }
    49 
     44    struct Init : EventInit {
    5045        JSC::JSValue detail;
    5146    };
  • trunk/Source/WebCore/dom/EventInit.h

    r206963 r206974  
    2929
    3030struct EventInit {
    31     EventInit() = default;
    32     EventInit(bool bubbles, bool cancelable, bool composed)
    33         : bubbles(bubbles)
    34         , cancelable(cancelable)
    35         , composed(composed)
    36     { }
    37 
    3831    bool bubbles { false };
    3932    bool cancelable { false };
  • trunk/Source/WebCore/dom/EventModifierInit.h

    r206971 r206974  
    3030namespace WebCore {
    3131
    32 struct EventModifierInit : public UIEventInit {
    33     EventModifierInit() = default;
    34 
    35     EventModifierInit(bool bubbles, bool cancelable, bool composed, RefPtr<DOMWindow>&& view, int detail,
    36         bool ctrlKey, bool shiftKey, bool altKey, bool metaKey, bool modifierAltGraph, bool modifierCapsLock)
    37             : UIEventInit(bubbles, cancelable, composed, WTFMove(view), detail)
    38             , ctrlKey(ctrlKey)
    39             , shiftKey(shiftKey)
    40             , altKey(altKey)
    41             , metaKey(metaKey)
    42             , modifierAltGraph(modifierAltGraph)
    43             , modifierCapsLock(modifierCapsLock)
    44         { }
    45 
     32struct EventModifierInit : UIEventInit {
    4633    bool ctrlKey { false };
    4734    bool shiftKey { false };
  • trunk/Source/WebCore/dom/KeyboardEvent.cpp

    r206971 r206974  
    136136#endif
    137137    , m_keyIdentifier(initializer.keyIdentifier)
    138     , m_location(initializer.location)
     138    , m_location(initializer.keyLocation ? *initializer.keyLocation : initializer.location)
    139139    , m_repeat(initializer.repeat)
    140140    , m_isComposing(initializer.isComposing)
  • trunk/Source/WebCore/dom/KeyboardEvent.h

    r206971 r206974  
    5555
    5656    struct Init : public EventModifierInit {
    57         Init(bool bubbles, bool cancelable, bool composed, RefPtr<DOMWindow>&& view, int detail,
    58             bool ctrlKey, bool shiftKey, bool altKey, bool metaKey, bool modifierAltGraph, bool modifierCapsLock,
    59             String key, String code, Optional<unsigned> location, bool repeat, bool isComposing, String keyIdentifier,
    60             Optional<unsigned> keyLocation)
    61                 : EventModifierInit(bubbles, cancelable, composed, WTFMove(view), detail, ctrlKey, shiftKey, altKey, metaKey, modifierAltGraph, modifierCapsLock)
    62                 , key(key)
    63                 , code(code)
    64                 , location(location ? *location : keyLocation.valueOr(DOM_KEY_LOCATION_STANDARD))
    65                 , repeat(repeat)
    66                 , isComposing(isComposing)
    67                 , keyIdentifier(keyIdentifier)
    68             { }
    69 
    7057        String key;
    7158        String code;
     
    7663        // Legacy.
    7764        String keyIdentifier;
     65        Optional<unsigned> keyLocation;
    7866    };
    7967
  • trunk/Source/WebCore/dom/KeyboardEvent.idl

    r206971 r206974  
    5757    DOMString key = "";
    5858    DOMString code = "";
    59     unsigned long location;
     59    unsigned long location = 0;
    6060    boolean repeat = false;
    6161    boolean isComposing = false;
  • trunk/Source/WebCore/dom/UIEventInit.h

    r206971 r206974  
    3333
    3434struct UIEventInit : public EventInit {
    35     UIEventInit() = default;
    36     UIEventInit(bool bubbles, bool cancelable, bool composed, RefPtr<DOMWindow>&& view, int detail)
    37         : EventInit(bubbles, cancelable, composed)
    38         , view(WTFMove(view))
    39         , detail(detail)
    40     { }
    41 
    4235    RefPtr<DOMWindow> view;
    4336    int detail { 0 };
  • trunk/Source/WebCore/editing/Editor.cpp

    r206963 r206974  
    882882        return true;
    883883
    884     RefPtr<DataTransfer> dataTransfer = DataTransfer::createForCopyAndPaste(policy);
    885 
    886     auto event = ClipboardEvent::create(eventType, { true, true, false, dataTransfer.get() }, Event::IsTrusted::Yes);
     884    auto dataTransfer = DataTransfer::createForCopyAndPaste(policy);
     885
     886    ClipboardEvent::Init init;
     887    init.bubbles = true;
     888    init.cancelable = true;
     889    init.clipboardData = dataTransfer.ptr();
     890    auto event = ClipboardEvent::create(eventType, init, Event::IsTrusted::Yes);
    887891    target->dispatchEvent(event);
    888892    bool noDefaultProcessing = event->defaultPrevented();
Note: See TracChangeset for help on using the changeset viewer.