Changeset 219302 in webkit


Ignore:
Timestamp:
Jul 10, 2017 11:27:26 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[WebIDL] Move plugin object customization into the generator
https://bugs.webkit.org/show_bug.cgi?id=174238

Patch by Sam Weinig <sam@webkit.org> on 2017-07-10
Reviewed by Chris Dumez.

  • Added [Plugin] extended attribute to forward the necessary hooks for get/set/delete to the plugin code.
  • Removed [CustomNamedSetter] and replaced it's remaining uses [CustomPut] (formally called [CustomPutFunction]).
  • Renamed [CustomNamedGetterOnPrototype] to [CustomPutOnPrototype] because that is actually what it does.
  • Removed [CustomGetOwnPropertySlotByIndex] and made [CustomGetOwnPropertySlot] imply it, as the other custom hooks do.
  • Renamed [CustomEnumerateProperty] to [CustomGetOwnPropertyNames] to conform with other attribute names.
  • Renamed [CustomCall] to [CustomGetCallData] to conform with other attribute names.
  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSHTMLAppletElementCustom.cpp: Removed.
  • bindings/js/JSHTMLEmbedElementCustom.cpp: Removed.
  • bindings/js/JSHTMLObjectElementCustom.cpp: Removed.

Remove custom bindings.

  • bindings/js/JSCSSStyleDeclarationCustom.cpp:

(WebCore::putCommon):
(WebCore::JSCSSStyleDeclaration::put):
(WebCore::JSCSSStyleDeclaration::putByIndex):
(WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
Use [CustomPut] rather than [CustomNamedSetter] to allow us
to get rid of [CustomNamedSetter]. Reuse put delegate as
common code to share between put and putByIndex.

  • bindings/js/JSLocationCustom.cpp:

(WebCore::getOwnPropertySlotCommon):
(WebCore::JSLocation::getOwnPropertySlot):
(WebCore::JSLocation::getOwnPropertySlotByIndex):
Replace [CustomGetOwnPropertySlotAndDescriptor] with [CustomGetOwnPropertySlot]
which is more clear and reduces the number of variants of this hook override
we need.

(WebCore::putCommon):
(WebCore::JSLocation::put):
(WebCore::JSLocation::putByIndex):
Use [CustomPut] rather than [CustomNamedSetter] to allow us
to get rid of [CustomNamedSetter]. Reuse put delegate as
common code to share between put and putByIndex.

(WebCore::JSLocationPrototype::put):
[CustomPutOnPrototype] (which weirdly used incorrectly be called
[CustomNamedGetterOnPrototype]) now works like [CustomPut] meaning
you need to call Base.

  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginElementPropertyGetter):
(WebCore::pluginElementCustomGetOwnPropertySlot):
(WebCore::pluginElementCustomPut):

  • bindings/js/JSPluginElementFunctions.h:

(WebCore::pluginElementCustomGetOwnPropertySlot): Deleted.
Remove templatized pluginElementCustomGetOwnPropertySlot, which was
completely unnecessary and merge its functionality into the out of
line overload. Remove pluginElementPropertyGetter from the header,
since it is only used in implementation, and unify the naming and
argument position (JSHTMLElement* comes first) of the hooks.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateIndexedGetter):
(GenerateNamedGetter):
(GenerateGetOwnPropertySlot):
(GenerateGetOwnPropertySlotByIndex):
(GenerateGetOwnPropertyNames):
(GeneratePut):
(GeneratePutByIndex):
(GenerateDeleteProperty):
(GenerateDeletePropertyByIndex):
(GenerateNamedDeleterDefinition):
(InstanceOverridesGetOwnPropertySlot):
(InstanceOverridesGetOwnPropertyNames):
(InstanceOverridesPut):
(InstanceOverridesDeleteProperty):
(GenerateHeader):
(GenerateImplementation):
(GenerateGetCallData):
(GeneratePluginCall):
(GenerateLegacyCallerDefinitions):
(GenerateLegacyCallerDefinition):
(GeneratePrototypeDeclaration):
(InstanceOverridesGetCallData):
(HeaderNeedsPrototypeDeclaration):

  • Add support for [Plugin]
  • Remove support for [CustomNamedSetter]
  • Replace [CustomGetOwnPropertySlotByIndex] with [CustomGetOwnPropertySlot]
  • Replace [CustomEnumerateProperty] with [CustomGetOwnPropertyNames]
  • Replace [CustomPutFunction] with [CustomPut].
  • Make subroutine names more consistent (remove a few Definition suffixes)
  • bindings/scripts/IDLAttributes.json:

Update for new / removed attributes.

  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestInterface.h:
  • bindings/scripts/test/JS/JSTestPluginInterface.cpp: Added.
  • bindings/scripts/test/JS/JSTestPluginInterface.h: Added.
  • bindings/scripts/test/TestInterface.idl:
  • bindings/scripts/test/TestPluginInterface.idl: Added.

Update / add tests.

  • css/CSSStyleDeclaration.idl:
  • html/HTMLAppletElement.idl:
  • html/HTMLEmbedElement.idl:
  • html/HTMLObjectElement.idl:
  • page/DOMWindow.idl:
  • page/Location.idl:
  • storage/Storage.idl:

Update for new / renamed attributes.

Location:
trunk/Source/WebCore
Files:
2 added
3 deleted
20 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r219301 r219302  
    11901190    bindings/js/JSEventTargetCustom.cpp
    11911191    bindings/js/JSExceptionBase.cpp
    1192     bindings/js/JSHTMLAppletElementCustom.cpp
    11931192    bindings/js/JSHTMLCanvasElementCustom.cpp
    11941193    bindings/js/JSHTMLCollectionCustom.cpp
    11951194    bindings/js/JSHTMLDocumentCustom.cpp
    11961195    bindings/js/JSHTMLElementCustom.cpp
    1197     bindings/js/JSHTMLEmbedElementCustom.cpp
    1198     bindings/js/JSHTMLObjectElementCustom.cpp
    11991196    bindings/js/JSHTMLTemplateElementCustom.cpp
    12001197    bindings/js/JSHistoryCustom.cpp
  • trunk/Source/WebCore/ChangeLog

    r219301 r219302  
     12017-07-10  Sam Weinig  <sam@webkit.org>
     2
     3        [WebIDL] Move plugin object customization into the generator
     4        https://bugs.webkit.org/show_bug.cgi?id=174238
     5
     6        Reviewed by Chris Dumez.
     7
     8        - Added [Plugin] extended attribute to forward the necessary hooks
     9          for get/set/delete to the plugin code.
     10        - Removed [CustomNamedSetter] and replaced it's remaining uses
     11          [CustomPut] (formally called [CustomPutFunction]).
     12        - Renamed [CustomNamedGetterOnPrototype] to [CustomPutOnPrototype]
     13          because that is actually what it does.
     14        - Removed [CustomGetOwnPropertySlotByIndex] and made
     15          [CustomGetOwnPropertySlot] imply it, as the other custom hooks
     16          do.
     17        - Renamed [CustomEnumerateProperty] to [CustomGetOwnPropertyNames]
     18          to conform with other attribute names.
     19        - Renamed [CustomCall] to [CustomGetCallData] to conform with other
     20          attribute names.
     21
     22        * CMakeLists.txt:
     23        * WebCore.xcodeproj/project.pbxproj:
     24        * bindings/js/JSBindingsAllInOne.cpp:
     25        * bindings/js/JSHTMLAppletElementCustom.cpp: Removed.
     26        * bindings/js/JSHTMLEmbedElementCustom.cpp: Removed.
     27        * bindings/js/JSHTMLObjectElementCustom.cpp: Removed.
     28        Remove custom bindings.
     29
     30        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
     31        (WebCore::putCommon):
     32        (WebCore::JSCSSStyleDeclaration::put):
     33        (WebCore::JSCSSStyleDeclaration::putByIndex):
     34        (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
     35        Use [CustomPut] rather than [CustomNamedSetter] to allow us
     36        to get rid of [CustomNamedSetter]. Reuse put delegate as
     37        common code to share between put and putByIndex.
     38
     39        * bindings/js/JSLocationCustom.cpp:
     40        (WebCore::getOwnPropertySlotCommon):
     41        (WebCore::JSLocation::getOwnPropertySlot):
     42        (WebCore::JSLocation::getOwnPropertySlotByIndex):
     43        Replace [CustomGetOwnPropertySlotAndDescriptor] with [CustomGetOwnPropertySlot]
     44        which is more clear and reduces the number of variants of this hook override
     45        we need.
     46
     47        (WebCore::putCommon):
     48        (WebCore::JSLocation::put):
     49        (WebCore::JSLocation::putByIndex):
     50        Use [CustomPut] rather than [CustomNamedSetter] to allow us
     51        to get rid of [CustomNamedSetter]. Reuse put delegate as
     52        common code to share between put and putByIndex.
     53
     54        (WebCore::JSLocationPrototype::put):
     55        [CustomPutOnPrototype] (which weirdly used incorrectly be called
     56        [CustomNamedGetterOnPrototype]) now works like [CustomPut] meaning
     57        you need to call Base.
     58
     59        * bindings/js/JSPluginElementFunctions.cpp:
     60        (WebCore::pluginElementPropertyGetter):
     61        (WebCore::pluginElementCustomGetOwnPropertySlot):
     62        (WebCore::pluginElementCustomPut):
     63        * bindings/js/JSPluginElementFunctions.h:
     64        (WebCore::pluginElementCustomGetOwnPropertySlot): Deleted.
     65        Remove templatized pluginElementCustomGetOwnPropertySlot, which was
     66        completely unnecessary and merge its functionality into the out of
     67        line overload. Remove pluginElementPropertyGetter from the header,
     68        since it is only used in implementation, and unify the naming and
     69        argument position (JSHTMLElement* comes first) of the hooks.
     70
     71        * bindings/scripts/CodeGeneratorJS.pm:
     72        (GenerateIndexedGetter):
     73        (GenerateNamedGetter):
     74        (GenerateGetOwnPropertySlot):
     75        (GenerateGetOwnPropertySlotByIndex):
     76        (GenerateGetOwnPropertyNames):
     77        (GeneratePut):
     78        (GeneratePutByIndex):
     79        (GenerateDeleteProperty):
     80        (GenerateDeletePropertyByIndex):
     81        (GenerateNamedDeleterDefinition):
     82        (InstanceOverridesGetOwnPropertySlot):
     83        (InstanceOverridesGetOwnPropertyNames):
     84        (InstanceOverridesPut):
     85        (InstanceOverridesDeleteProperty):
     86        (GenerateHeader):
     87        (GenerateImplementation):
     88        (GenerateGetCallData):
     89        (GeneratePluginCall):
     90        (GenerateLegacyCallerDefinitions):
     91        (GenerateLegacyCallerDefinition):
     92        (GeneratePrototypeDeclaration):
     93        (InstanceOverridesGetCallData):
     94        (HeaderNeedsPrototypeDeclaration):
     95        - Add support for [Plugin]
     96        - Remove support for [CustomNamedSetter]
     97        - Replace [CustomGetOwnPropertySlotByIndex] with [CustomGetOwnPropertySlot]
     98        - Replace [CustomEnumerateProperty] with [CustomGetOwnPropertyNames]
     99        - Replace [CustomPutFunction] with [CustomPut].
     100        - Make subroutine names more consistent (remove a few Definition suffixes)
     101
     102        * bindings/scripts/IDLAttributes.json:
     103        Update for new / removed attributes.
     104
     105        * bindings/scripts/test/JS/JSTestInterface.cpp:
     106        * bindings/scripts/test/JS/JSTestInterface.h:
     107        * bindings/scripts/test/JS/JSTestPluginInterface.cpp: Added.
     108        * bindings/scripts/test/JS/JSTestPluginInterface.h: Added.
     109        * bindings/scripts/test/TestInterface.idl:
     110        * bindings/scripts/test/TestPluginInterface.idl: Added.
     111        Update / add tests.
     112
     113        * css/CSSStyleDeclaration.idl:
     114        * html/HTMLAppletElement.idl:
     115        * html/HTMLEmbedElement.idl:
     116        * html/HTMLObjectElement.idl:
     117        * page/DOMWindow.idl:
     118        * page/Location.idl:
     119        * storage/Storage.idl:
     120        Update for new / renamed attributes.
     121
    11222017-07-03  Brian Burg  <bburg@apple.com>
    2123
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r219301 r219302  
    56025602                BC305C790C076BB300CD20F0 /* JSHTMLObjectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC305C770C076BB300CD20F0 /* JSHTMLObjectElement.cpp */; };
    56035603                BC305C7A0C076BB300CD20F0 /* JSHTMLObjectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC305C780C076BB300CD20F0 /* JSHTMLObjectElement.h */; };
    5604                 BC305CA40C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC305CA30C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp */; };
    56055604                BC33FB1B0F30EE85002CDD7C /* RenderLineBoxList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC33FB1A0F30EE85002CDD7C /* RenderLineBoxList.cpp */; };
    56065605                BC348BBE0DB7F531004ABAB9 /* JSXMLHttpRequestCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC348BBD0DB7F531004ABAB9 /* JSXMLHttpRequestCustom.cpp */; };
     
    56415640                BC491B780C023EFD009D6316 /* JSHTMLMarqueeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC491B760C023EFD009D6316 /* JSHTMLMarqueeElement.cpp */; };
    56425641                BC491B790C023EFD009D6316 /* JSHTMLMarqueeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC491B770C023EFD009D6316 /* JSHTMLMarqueeElement.h */; };
    5643                 BC4EDEF40C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4EDEF30C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp */; };
    56445642                BC51156E12B1749C00C96754 /* ScrollAnimatorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC51156D12B1749C00C96754 /* ScrollAnimatorMac.mm */; };
    56455643                BC51580B0C03D404008BB0EE /* JSHTMLDocumentCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC51580A0C03D404008BB0EE /* JSHTMLDocumentCustom.cpp */; };
     
    57215719                BC6932730D7E293900AE44D1 /* JSDOMWindowBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6932710D7E293900AE44D1 /* JSDOMWindowBase.cpp */; };
    57225720                BC6932740D7E293900AE44D1 /* JSDOMWindowBase.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6932720D7E293900AE44D1 /* JSDOMWindowBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
    5723                 BC6D44BE0C07EFB60072D2C9 /* JSHTMLEmbedElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6D44BD0C07EFB60072D2C9 /* JSHTMLEmbedElementCustom.cpp */; };
    57245721                BC6D44EC0C07F2ED0072D2C9 /* JSHTMLEmbedElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC6D44EA0C07F2ED0072D2C9 /* JSHTMLEmbedElement.cpp */; };
    57255722                BC6D44ED0C07F2ED0072D2C9 /* JSHTMLEmbedElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BC6D44EB0C07F2ED0072D2C9 /* JSHTMLEmbedElement.h */; };
     
    1407114068                BC305C770C076BB300CD20F0 /* JSHTMLObjectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLObjectElement.cpp; sourceTree = "<group>"; };
    1407214069                BC305C780C076BB300CD20F0 /* JSHTMLObjectElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLObjectElement.h; sourceTree = "<group>"; };
    14073                 BC305CA30C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLObjectElementCustom.cpp; sourceTree = "<group>"; };
    1407414070                BC33FB1A0F30EE85002CDD7C /* RenderLineBoxList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLineBoxList.cpp; sourceTree = "<group>"; };
    1407514071                BC348BA70DB7F1B8004ABAB9 /* XMLHttpRequest.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = XMLHttpRequest.idl; sourceTree = "<group>"; };
     
    1411014106                BC491B760C023EFD009D6316 /* JSHTMLMarqueeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLMarqueeElement.cpp; sourceTree = "<group>"; };
    1411114107                BC491B770C023EFD009D6316 /* JSHTMLMarqueeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLMarqueeElement.h; sourceTree = "<group>"; };
    14112                 BC4EDEF30C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLAppletElementCustom.cpp; sourceTree = "<group>"; };
    1411314108                BC51156D12B1749C00C96754 /* ScrollAnimatorMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollAnimatorMac.mm; sourceTree = "<group>"; };
    1411414109                BC51580A0C03D404008BB0EE /* JSHTMLDocumentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLDocumentCustom.cpp; sourceTree = "<group>"; };
     
    1419614191                BC6932710D7E293900AE44D1 /* JSDOMWindowBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMWindowBase.cpp; sourceTree = "<group>"; };
    1419714192                BC6932720D7E293900AE44D1 /* JSDOMWindowBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMWindowBase.h; sourceTree = "<group>"; };
    14198                 BC6D44BD0C07EFB60072D2C9 /* JSHTMLEmbedElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLEmbedElementCustom.cpp; sourceTree = "<group>"; };
    1419914193                BC6D44EA0C07F2ED0072D2C9 /* JSHTMLEmbedElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLEmbedElement.cpp; sourceTree = "<group>"; };
    1420014194                BC6D44EB0C07F2ED0072D2C9 /* JSHTMLEmbedElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLEmbedElement.h; sourceTree = "<group>"; };
     
    2362023614                                652FBBBB0DE27CB60001D386 /* JSDOMWindowCustom.h */,
    2362123615                                BCE7B1920D4E86960075A539 /* JSHistoryCustom.cpp */,
    23622                                 BC4EDEF30C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp */,
    2362323616                                9392262C1032107B006E7D5D /* JSHTMLCanvasElementCustom.cpp */,
    2362423617                                BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */,
    23625                                 BC6D44BD0C07EFB60072D2C9 /* JSHTMLEmbedElementCustom.cpp */,
    23626                                 BC305CA30C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp */,
    2362723618                                D6F7960C166FFECE0076DD18 /* JSHTMLTemplateElementCustom.cpp */,
    2362823619                                7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */,
     
    3197431965                                1A4A2DEF0A1B852A00C807F8 /* JSHTMLAnchorElement.cpp in Sources */,
    3197531966                                1A4A2DF10A1B852A00C807F8 /* JSHTMLAppletElement.cpp in Sources */,
    31976                                 BC4EDEF40C08F3FB007EDD49 /* JSHTMLAppletElementCustom.cpp in Sources */,
    3197731967                                1AE2AA1E0A1CDAB400B42B25 /* JSHTMLAreaElement.cpp in Sources */,
    3197831968                                7C9DBFED1A9C49B1000D6B25 /* JSHTMLAttachmentElement.cpp in Sources */,
     
    3199831988                                938E65F709F0985D008A48EC /* JSHTMLElementWrapperFactory.cpp in Sources */,
    3199931989                                BC6D44EC0C07F2ED0072D2C9 /* JSHTMLEmbedElement.cpp in Sources */,
    32000                                 BC6D44BE0C07EFB60072D2C9 /* JSHTMLEmbedElementCustom.cpp in Sources */,
    3200131990                                1AE2AA260A1CDAB400B42B25 /* JSHTMLFieldSetElement.cpp in Sources */,
    3200231991                                1AE2AA280A1CDAB400B42B25 /* JSHTMLFontElement.cpp in Sources */,
     
    3202532014                                1AE2AB290A1CE63B00B42B25 /* JSHTMLModElement.cpp in Sources */,
    3202632015                                BC305C790C076BB300CD20F0 /* JSHTMLObjectElement.cpp in Sources */,
    32027                                 BC305CA40C0781BB00CD20F0 /* JSHTMLObjectElementCustom.cpp in Sources */,
    3202832016                                1A85B1EA0A1B240500D8C87C /* JSHTMLOListElement.cpp in Sources */,
    3202932017                                A80E7E9C0A1A83E3007FB8C5 /* JSHTMLOptGroupElement.cpp in Sources */,
  • trunk/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp

    r218960 r219302  
    6565#include "JSEventTargetCustom.cpp"
    6666#include "JSExceptionBase.cpp"
    67 #include "JSHTMLAppletElementCustom.cpp"
    6867#include "JSHTMLCanvasElementCustom.cpp"
    6968#include "JSHTMLCollectionCustom.cpp"
    7069#include "JSHTMLDocumentCustom.cpp"
    7170#include "JSHTMLElementCustom.cpp"
    72 #include "JSHTMLEmbedElementCustom.cpp"
    73 #include "JSHTMLObjectElementCustom.cpp"
    7471#include "JSHTMLTemplateElementCustom.cpp"
    7572#include "JSHistoryCustom.cpp"
  • trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp

    r218342 r219302  
    314314}
    315315
     316// FIXME: This should be converted to be a named getter.
    316317bool JSCSSStyleDeclaration::getOwnPropertySlotDelegate(ExecState* state, PropertyName propertyName, PropertySlot& slot)
    317318{
     
    323324}
    324325
    325 bool JSCSSStyleDeclaration::putDelegate(ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot&, bool& putResult)
     326// FIXME: This should be converted to be a named setter.
     327static bool putCommon(JSCSSStyleDeclaration& thisObject, ExecState& state, PropertyName propertyName, JSValue value, bool& putResult)
    326328{
    327329    CustomElementReactionStack customElementReactionStack;
     
    330332        return false;
    331333
    332     auto propertyValue = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(*state, value);
     334    auto propertyValue = convert<IDLTreatNullAsEmptyAdaptor<IDLDOMString>>(state, value);
    333335    if (propertyInfo.hadPixelOrPosPrefix)
    334336        propertyValue.append("px");
     
    343345    }
    344346
    345     auto setPropertyInternalResult = wrapped().setPropertyInternal(propertyInfo.propertyID, propertyValue, important);
     347    auto setPropertyInternalResult = thisObject.wrapped().setPropertyInternal(propertyInfo.propertyID, propertyValue, important);
    346348    if (setPropertyInternalResult.hasException()) {
    347         auto& vm = state->vm();
     349        auto& vm = state.vm();
    348350        auto scope = DECLARE_THROW_SCOPE(vm);
    349         propagateException(*state, scope, setPropertyInternalResult.releaseException());
     351        propagateException(state, scope, setPropertyInternalResult.releaseException());
    350352        return true;
    351353    }
    352354    putResult = setPropertyInternalResult.releaseReturnValue();
    353355    return true;
     356}
     357
     358bool JSCSSStyleDeclaration::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& putPropertySlot)
     359{
     360    auto* thisObject = jsCast<JSCSSStyleDeclaration*>(cell);
     361    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     362
     363    bool putResult = false;
     364    if (putCommon(*thisObject, *state, propertyName, value, putResult))
     365        return putResult;
     366
     367    return JSObject::put(thisObject, state, propertyName, value, putPropertySlot);
     368}
     369
     370bool JSCSSStyleDeclaration::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool shouldThrow)
     371{
     372    auto* thisObject = jsCast<JSCSSStyleDeclaration*>(cell);
     373    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     374
     375    bool putResult = false;
     376    if (putCommon(*thisObject, *state, Identifier::from(state, index), value, putResult))
     377        return putResult;
     378
     379    return JSObject::putByIndex(cell, state, index, value, shouldThrow);
    354380}
    355381
  • trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp

    r214135 r219302  
    3535namespace WebCore {
    3636
    37 bool JSLocation::getOwnPropertySlotDelegate(ExecState* state, PropertyName propertyName, PropertySlot& slot)
    38 {
    39     VM& vm = state->vm();
     37static bool getOwnPropertySlotCommon(JSLocation& thisObject, ExecState& state, PropertyName propertyName, PropertySlot& slot)
     38{
     39    VM& vm = state.vm();
    4040    auto scope = DECLARE_THROW_SCOPE(vm);
    4141
    42     Frame* frame = wrapped().frame();
     42    Frame* frame = thisObject.wrapped().frame();
    4343    if (!frame) {
    4444        slot.setUndefined();
     
    5252    // allowed, return false so the normal lookup will take place.
    5353    String message;
    54     if (BindingSecurity::shouldAllowAccessToFrame(*state, *frame, message))
     54    if (BindingSecurity::shouldAllowAccessToFrame(state, *frame, message))
    5555        return false;
    5656
    5757    // https://html.spec.whatwg.org/#crossorigingetownpropertyhelper-(-o,-p-)
    58     if (propertyName == state->propertyNames().toStringTagSymbol || propertyName == state->propertyNames().hasInstanceSymbol || propertyName == state->propertyNames().isConcatSpreadableSymbol) {
    59         slot.setValue(this, ReadOnly | DontEnum, jsUndefined());
     58    if (propertyName == state.propertyNames().toStringTagSymbol || propertyName == state.propertyNames().hasInstanceSymbol || propertyName == state.propertyNames().isConcatSpreadableSymbol) {
     59        slot.setValue(&thisObject, ReadOnly | DontEnum, jsUndefined());
    6060        return true;
    6161    }
    6262
    6363    // We only allow access to Location.replace() cross origin.
    64     if (propertyName == state->propertyNames().replace) {
    65         slot.setCustom(this, ReadOnly | DontEnum, nonCachingStaticFunctionGetter<jsLocationInstanceFunctionReplace, 1>);
     64    if (propertyName == state.propertyNames().replace) {
     65        slot.setCustom(&thisObject, ReadOnly | DontEnum, nonCachingStaticFunctionGetter<jsLocationInstanceFunctionReplace, 1>);
    6666        return true;
    6767    }
     
    6969    // Getting location.href cross origin needs to throw. However, getOwnPropertyDescriptor() needs to return
    7070    // a descriptor that has a setter but no getter.
    71     if (slot.internalMethodType() == PropertySlot::InternalMethodType::GetOwnProperty && propertyName == state->propertyNames().href) {
     71    if (slot.internalMethodType() == PropertySlot::InternalMethodType::GetOwnProperty && propertyName == state.propertyNames().href) {
    7272        auto* entry = JSLocation::info()->staticPropHashTable->entry(propertyName);
    7373        CustomGetterSetter* customGetterSetter = CustomGetterSetter::create(vm, nullptr, entry->propertyPutter());
    74         slot.setCustomGetterSetter(this, DontEnum | CustomAccessor, customGetterSetter);
    75         return true;
    76     }
    77 
    78     throwSecurityError(*state, scope, message);
     74        slot.setCustomGetterSetter(&thisObject, DontEnum | CustomAccessor, customGetterSetter);
     75        return true;
     76    }
     77
     78    throwSecurityError(state, scope, message);
    7979    slot.setUndefined();
    8080    return true;
    8181}
    8282
    83 bool JSLocation::putDelegate(ExecState* state, PropertyName propertyName, JSValue, PutPropertySlot&, bool& putResult)
    84 {
    85     putResult = false;
    86 
    87     Frame* frame = wrapped().frame();
     83bool JSLocation::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
     84{
     85    auto* thisObject = jsCast<JSLocation*>(object);
     86    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     87
     88    if (getOwnPropertySlotCommon(*thisObject, *state, propertyName, slot))
     89        return true;
     90    return JSObject::getOwnPropertySlot(object, state, propertyName, slot);
     91}
     92
     93bool JSLocation::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)
     94{
     95    auto* thisObject = jsCast<JSLocation*>(object);
     96    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     97
     98    if (getOwnPropertySlotCommon(*thisObject, *state, Identifier::from(state, index), slot))
     99        return true;
     100    return JSObject::getOwnPropertySlotByIndex(object, state, index, slot);
     101}
     102
     103static bool putCommon(JSLocation& thisObject, ExecState& state, PropertyName propertyName)
     104{
     105    Frame* frame = thisObject.wrapped().frame();
    88106    if (!frame)
    89107        return true;
    90108
    91109    // Silently block access to toString and valueOf.
    92     if (propertyName == state->propertyNames().toString || propertyName == state->propertyNames().valueOf)
     110    if (propertyName == state.propertyNames().toString || propertyName == state.propertyNames().valueOf)
    93111        return true;
    94112
     
    96114    // However, alllowing assigning of pieces might inadvertently disclose parts of the original location.
    97115    // So fall through to the access check for those.
    98     if (propertyName == state->propertyNames().href)
     116    if (propertyName == state.propertyNames().href)
    99117        return false;
    100118
    101119    // Block access and throw if there is a security error.
    102     if (!BindingSecurity::shouldAllowAccessToFrame(state, frame, ThrowSecurityError))
     120    if (!BindingSecurity::shouldAllowAccessToFrame(&state, frame, ThrowSecurityError))
    103121        return true;
    104122
    105123    return false;
     124}
     125
     126bool JSLocation::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& putPropertySlot)
     127{
     128    auto* thisObject = jsCast<JSLocation*>(cell);
     129    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     130
     131    if (putCommon(*thisObject, *state, propertyName))
     132        return false;
     133
     134    return JSObject::put(thisObject, state, propertyName, value, putPropertySlot);
     135}
     136
     137bool JSLocation::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool shouldThrow)
     138{
     139    auto* thisObject = jsCast<JSLocation*>(cell);
     140    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
     141
     142    if (putCommon(*thisObject, *state, Identifier::from(state, index)))
     143        return false;
     144
     145    return JSObject::putByIndex(cell, state, index, value, shouldThrow);
    106146}
    107147
     
    189229}
    190230
    191 bool JSLocationPrototype::putDelegate(ExecState* exec, PropertyName propertyName, JSValue, PutPropertySlot&, bool& putResult)
    192 {
    193     putResult = false;
    194     return (propertyName == exec->propertyNames().toString || propertyName == exec->propertyNames().valueOf);
     231bool JSLocationPrototype::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
     232{
     233    auto* thisObject = jsCast<JSLocationPrototype*>(cell);
     234    if (propertyName == state->propertyNames().toString || propertyName == state->propertyNames().valueOf)
     235        return false;
     236    return Base::put(thisObject, state, propertyName, value, slot);
    195237}
    196238
  • trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.cpp

    r211247 r219302  
    9595}
    9696   
    97 EncodedJSValue pluginElementPropertyGetter(ExecState* exec, EncodedJSValue thisValue, PropertyName propertyName)
     97static EncodedJSValue pluginElementPropertyGetter(ExecState* exec, EncodedJSValue thisValue, PropertyName propertyName)
    9898{
    9999    VM& vm = exec->vm();
     
    110110}
    111111
    112 bool pluginElementCustomGetOwnPropertySlot(ExecState* exec, PropertyName propertyName, PropertySlot& slot, JSHTMLElement* element)
     112bool pluginElementCustomGetOwnPropertySlot(JSHTMLElement* element, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
    113113{
     114    if (!element->globalObject()->world().isNormal()) {
     115        JSC::JSValue proto = element->getPrototypeDirect();
     116        if (proto.isObject() && JSC::jsCast<JSC::JSObject*>(asObject(proto))->hasProperty(exec, propertyName))
     117            return false;
     118    }
     119
    114120    JSObject* scriptObject = pluginScriptObject(exec, element);
    115121    if (!scriptObject)
     
    118124    if (!scriptObject->hasProperty(exec, propertyName))
    119125        return false;
     126
    120127    slot.setCustom(element, DontDelete | DontEnum, pluginElementPropertyGetter);
    121128    return true;
    122129}
    123130
    124 bool pluginElementCustomPut(ExecState* exec, PropertyName propertyName, JSValue value, JSHTMLElement* element, PutPropertySlot& slot, bool& putResult)
     131bool pluginElementCustomPut(JSHTMLElement* element, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot, bool& putResult)
    125132{
    126133    JSObject* scriptObject = pluginScriptObject(exec, element);
     
    155162}
    156163
    157 CallType pluginElementGetCallData(JSHTMLElement* element, CallData& callData)
     164CallType pluginElementCustomGetCallData(JSHTMLElement* element, CallData& callData)
    158165{
    159166    // First, ask the plug-in view base for its runtime object.
  • trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h

    r208179 r219302  
    3838    WEBCORE_EXPORT JSC::JSObject* pluginScriptObject(JSC::ExecState*, JSHTMLElement*);
    3939
    40     JSC::EncodedJSValue pluginElementPropertyGetter(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
    41     bool pluginElementCustomGetOwnPropertySlot(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&, JSHTMLElement*);
    42     bool pluginElementCustomPut(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSHTMLElement*, JSC::PutPropertySlot&, bool& putResult);
    43     JSC::CallType pluginElementGetCallData(JSHTMLElement*, JSC::CallData&);
    44 
    45     template <class Type, class Base> bool pluginElementCustomGetOwnPropertySlot(JSC::ExecState* exec, JSC::PropertyName propertyName, JSC::PropertySlot& slot, Type* element)
    46     {
    47         if (!element->globalObject()->world().isNormal()) {
    48             JSC::JSValue proto = element->getPrototypeDirect();
    49             if (proto.isObject() && JSC::jsCast<JSC::JSObject*>(asObject(proto))->hasProperty(exec, propertyName))
    50                 return false;
    51         }
    52 
    53         return pluginElementCustomGetOwnPropertySlot(exec, propertyName, slot, element);
    54     }
     40    bool pluginElementCustomGetOwnPropertySlot(JSHTMLElement*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
     41    bool pluginElementCustomPut(JSHTMLElement*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);
     42    JSC::CallType pluginElementCustomGetCallData(JSHTMLElement*, JSC::CallData&);
    5543
    5644} // namespace WebCore
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r219237 r219302  
    536536   
    537537    my @attributes = ();
    538     push(@attributes, "ReadOnly") if !GetIndexedSetterOperation($interface) && !$interface->extendedAttributes->{CustomNamedSetter};
     538    push(@attributes, "ReadOnly") if !GetIndexedSetterOperation($interface) && !$interface->extendedAttributes->{Plugin};
    539539   
    540540    my $attributeString = ((@attributes > 0) ? join(" | ", @attributes) : "0");
     
    573573   
    574574    my @attributes = ();
    575     push(@attributes, "ReadOnly") if !GetNamedSetterOperation($interface) && !$interface->extendedAttributes->{CustomNamedSetter};
     575    push(@attributes, "ReadOnly") if !GetNamedSetterOperation($interface) && !$interface->extendedAttributes->{Plugin};
    576576    push(@attributes, "DontEnum") if $interface->extendedAttributes->{LegacyUnenumerableNamedProperties};
    577577   
     
    668668        # NOTE: Setting ignoreNamedProps has the effect of skipping step 2, so we can early return here
    669669        #       rather than going through the paces of having an actual ignoreNamedProps update.
    670         if ($namedGetterOperation || $interface->extendedAttributes->{CustomGetOwnPropertySlotAndDescriptor}) {
     670        if ($namedGetterOperation || $interface->extendedAttributes->{CustomGetOwnPropertySlotAndDescriptor} || $interface->extendedAttributes->{Plugin}) {
    671671            push(@$outputArray, "        return JSObject::getOwnPropertySlot(object, state, propertyName, slot);\n");
    672672        }
     
    702702        push(@$outputArray, "    }\n");
    703703    }
    704    
     704
     705    # FIXME: There is only one remaining user of this, CSSStyleDeclaration.idl. Let's get them onto named / indexed getters.
    705706    if ($interface->extendedAttributes->{CustomGetOwnPropertySlotAndDescriptor}) {
    706707        push(@$outputArray, "    if (thisObject->getOwnPropertySlotDelegate(state, propertyName, slot))\n");
    707708        push(@$outputArray, "        return true;\n");
    708709    }
    709    
     710
     711    if ($interface->extendedAttributes->{Plugin}) {
     712        AddToImplIncludes("JSPluginElementFunctions.h");
     713        push(@$outputArray, "    if (pluginElementCustomGetOwnPropertySlot(thisObject, state, propertyName, slot))\n");
     714        push(@$outputArray, "        return true;\n");
     715    }
     716
    710717    # 3. Return OrdinaryGetOwnProperty(O, P).
    711718    push(@$outputArray, "    return JSObject::getOwnPropertySlot(object, state, propertyName, slot);\n");
     
    719726    my ($outputArray, $interface, $className) = @_;
    720727   
    721     return if $interface->extendedAttributes->{CustomGetOwnPropertySlotByIndex};
     728    return if $interface->extendedAttributes->{CustomGetOwnPropertySlot};
    722729
    723730    # Sink the int-to-string conversion that happens when we create a PropertyName
     
    773780        # NOTE: Setting ignoreNamedProps has the effect of skipping step 2, so we can early return here
    774781        #       rather than going through the paces of having an actual ignoreNamedProps update.
    775         if ($namedGetterOperation || $interface->extendedAttributes->{CustomGetOwnPropertySlotAndDescriptor}) {
     782        if ($namedGetterOperation || $interface->extendedAttributes->{CustomGetOwnPropertySlotAndDescriptor} || $interface->extendedAttributes->{Plugin}) {
    776783            push(@$outputArray, "        return JSObject::getOwnPropertySlotByIndex(object, state, index, slot);\n");
    777784        }
     
    810817    }
    811818   
     819    # FIXME: There is only one remaining user of this, CSSStyleDeclaration.idl. Let's get them onto named / indexed getters.
    812820    if ($interface->extendedAttributes->{CustomGetOwnPropertySlotAndDescriptor}) {
    813821        &$propertyNameGeneration();
     
    816824        push(@$outputArray, "        return true;\n");
    817825    }
    818    
     826
     827    if ($interface->extendedAttributes->{Plugin}) {
     828        &$propertyNameGeneration();
     829
     830        AddToImplIncludes("JSPluginElementFunctions.h");
     831        push(@$outputArray, "    if (pluginElementCustomGetOwnPropertySlot(thisObject, state, propertyName, slot))\n");
     832        push(@$outputArray, "        return true;\n");
     833    }
     834
    819835    # 3. Return OrdinaryGetOwnProperty(O, P).
    820836    push(@$outputArray, "    return JSObject::getOwnPropertySlotByIndex(object, state, index, slot);\n");
     
    828844    my ($outputArray, $interface, $className) = @_;
    829845   
    830     return if $interface->extendedAttributes->{CustomEnumerateProperty};
     846    return if $interface->extendedAttributes->{CustomGetOwnPropertyNames};
    831847   
    832848    my $namedGetterOperation = GetNamedGetterOperation($interface);
     
    914930    my ($outputArray, $interface, $className) = @_;
    915931   
    916     return if $interface->extendedAttributes->{CustomPutFunction};
     932    return if $interface->extendedAttributes->{CustomPut};
    917933   
    918934    my $namedSetterOperation = GetNamedSetterOperation($interface);
     
    962978    }
    963979   
    964     assert("Using both a named property setter and [CustomNamedSetter] together is not supported.") if $namedSetterOperation && $interface->extendedAttributes->{CustomNamedSetter};
    965     if ($interface->extendedAttributes->{CustomNamedSetter}) {
     980    assert("Using both a named property setter and [Plugin] together is not supported.") if $namedSetterOperation && $interface->extendedAttributes->{Plugin};
     981    if ($interface->extendedAttributes->{Plugin}) {
     982        AddToImplIncludes("JSPluginElementFunctions.h");
     983
    966984        push(@$outputArray, "    bool putResult = false;\n");
    967         push(@$outputArray, "    if (thisObject->putDelegate(state, propertyName, value, putPropertySlot, putResult))\n");
     985        push(@$outputArray, "    if (pluginElementCustomPut(thisObject, state, propertyName, value, putPropertySlot, putResult))\n");
    968986        push(@$outputArray, "        return putResult;\n\n");
    969987    }
    970    
     988
    971989    push(@$outputArray, "    return JSObject::put(thisObject, state, propertyName, value, putPropertySlot);\n");
    972990    push(@$outputArray, "}\n\n");
     
    977995    my ($outputArray, $interface, $className) = @_;
    978996   
    979     return if $interface->extendedAttributes->{CustomPutFunction};
    980    
     997    return if $interface->extendedAttributes->{CustomPut};
     998
    981999    my $namedSetterOperation = GetNamedSetterOperation($interface);
    9821000    my $indexedSetterOperation = GetIndexedSetterOperation($interface);
    9831001   
    9841002    my $overrideBuiltins = $codeGenerator->InheritsExtendedAttribute($interface, "OverrideBuiltins");
    985     my $ellidesCallsToBase = ($namedSetterOperation && $overrideBuiltins) && !$interface->extendedAttributes->{CustomNamedSetter};
     1003    my $ellidesCallsToBase = ($namedSetterOperation && $overrideBuiltins) && !$interface->extendedAttributes->{Plugin};
    9861004   
    9871005    push(@$outputArray, "bool ${className}::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool" . (!$ellidesCallsToBase ? " shouldThrow" : "") . ")\n");
     
    10221040        }
    10231041    }
    1024    
    1025     assert("Using both a named property setter and [CustomNamedSetter] together is not supported.") if $namedSetterOperation && $interface->extendedAttributes->{CustomNamedSetter};
    1026     if ($interface->extendedAttributes->{CustomNamedSetter}) {
     1042
     1043    assert("Using both a named property setter and [Plugin] together is not supported.") if $namedSetterOperation && $interface->extendedAttributes->{Plugin};
     1044    if ($interface->extendedAttributes->{Plugin}) {
     1045        AddToImplIncludes("JSPluginElementFunctions.h");
    10271046        push(@$outputArray, "    auto propertyName = Identifier::from(state, index);\n");
    1028         push(@$outputArray, "    PutPropertySlot slot(thisObject, shouldThrow);\n");
     1047        push(@$outputArray, "    PutPropertySlot putPropertySlot(thisObject, shouldThrow);\n");
    10291048        push(@$outputArray, "    bool putResult = false;\n");
    1030         push(@$outputArray, "    if (thisObject->putDelegate(state, propertyName, value, slot, putResult))\n");
     1049        push(@$outputArray, "    if (pluginElementCustomPut(thisObject, state, propertyName, value, putPropertySlot, putResult))\n");
    10311050        push(@$outputArray, "        return putResult;\n\n");
    10321051    }
    1033    
     1052
    10341053    if (!$ellidesCallsToBase) {
    10351054        push(@$outputArray, "    return JSObject::putByIndex(cell, state, index, value, shouldThrow);\n");
     
    12531272}
    12541273
    1255 sub GenerateDeletePropertyDefinition
     1274sub GenerateDeleteProperty
    12561275{
    12571276    my ($outputArray, $interface, $className, $operation, $conditional) = @_;
     
    12841303}
    12851304
    1286 sub GenerateDeletePropertyByIndexDefinition
     1305sub GenerateDeletePropertyByIndex
    12871306{
    12881307    my ($outputArray, $interface, $className, $operation, $conditional) = @_;
     
    13481367    }
    13491368
    1350     GenerateDeletePropertyDefinition($outputArray, $interface, $className, $namedDeleterOperation, $conditional);
    1351     GenerateDeletePropertyByIndexDefinition($outputArray, $interface, $className, $namedDeleterOperation, $conditional);
     1369    GenerateDeleteProperty($outputArray, $interface, $className, $namedDeleterOperation, $conditional);
     1370    GenerateDeletePropertyByIndex($outputArray, $interface, $className, $namedDeleterOperation, $conditional);
    13521371
    13531372    push(@implContent, "#endif\n\n") if $conditional;
     
    18091828    my $interface = shift;
    18101829    return $interface->extendedAttributes->{CustomGetOwnPropertySlot}
    1811         || $interface->extendedAttributes->{CustomGetOwnPropertySlotByIndex}
    18121830        || $interface->extendedAttributes->{CustomGetOwnPropertySlotAndDescriptor}
     1831        || $interface->extendedAttributes->{Plugin}
    18131832        || GetIndexedGetterOperation($interface)
    18141833        || GetNamedGetterOperation($interface);
     
    18181837{
    18191838    my $interface = shift;
    1820     return $interface->extendedAttributes->{CustomEnumerateProperty}
     1839    return $interface->extendedAttributes->{CustomGetOwnPropertyNames}
    18211840        || GetIndexedGetterOperation($interface)
    18221841        || GetNamedGetterOperation($interface);
     
    18261845{
    18271846    my $interface = shift;
    1828     return $interface->extendedAttributes->{CustomNamedSetter}
    1829         || $interface->extendedAttributes->{CustomPutFunction}
     1847    return $interface->extendedAttributes->{CustomPut}
     1848        || $interface->extendedAttributes->{Plugin}
    18301849        || GetIndexedSetterOperation($interface)
    18311850        || GetNamedSetterOperation($interface);
     
    18401859}
    18411860
    1842 sub InstanceOverridesDelete
     1861sub InstanceOverridesDeleteProperty
    18431862{
    18441863    my $interface = shift;
     
    25732592    }
    25742593
    2575     if (InstanceOverridesDelete($interface)) {
     2594    if (InstanceOverridesDeleteProperty($interface)) {
    25762595        push(@headerContent, "    static bool deleteProperty(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName);\n");
    25772596        push(@headerContent, "    static bool deletePropertyByIndex(JSC::JSCell*, JSC::ExecState*, unsigned);\n");
    25782597    }
    25792598
    2580     if (InstanceOverridesCall($interface)) {
     2599    if (InstanceOverridesGetCallData($interface)) {
    25812600        push(@headerContent, "    static JSC::CallType getCallData(JSC::JSCell*, JSC::CallData&);\n\n");
    25822601        $headerIncludes{"<runtime/CallData.h>"} = 1;
     
    27972816        push(@headerContent, "    bool getOwnPropertySlotDelegate(JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);\n");
    27982817    }
    2799    
    2800     if ($interface->extendedAttributes->{CustomNamedSetter}) {
    2801         push(@headerContent, "    bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);\n");
    2802     }
    2803    
     2818
    28042819    push(@headerContent, "};\n\n");
    28052820
     
    41014116    }
    41024117
    4103     if ($interface->extendedAttributes->{CustomNamedGetterOnPrototype}) {
    4104         push(@implContent, "bool ${className}Prototype::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& slot)\n");
    4105         push(@implContent, "{\n");
    4106         push(@implContent, "    auto* thisObject = jsCast<${className}Prototype*>(cell);\n");
    4107         push(@implContent, "    bool putResult = false;\n");
    4108         push(@implContent, "    if (thisObject->putDelegate(state, propertyName, value, slot, putResult))\n");
    4109         push(@implContent, "        return putResult;\n");
    4110         push(@implContent, "    return Base::put(thisObject, state, propertyName, value, slot);\n");
    4111         push(@implContent, "}\n\n");
    4112     }
    4113 
    41144118    # - Initialize static ClassInfo object
    41154119    push(@implContent, "const ClassInfo $className" . "::s_info = { \"${visibleInterfaceName}\", &Base::s_info, ");
     
    42984302    }
    42994303
    4300     if (InstanceOverridesDelete($interface)) {
     4304    if (InstanceOverridesDeleteProperty($interface)) {
    43014305        GenerateNamedDeleterDefinition(\@implContent, $interface, $className);
    43024306    }
    43034307   
    4304     if (InstanceOverridesCall($interface)) {
    4305         GenerateLegacyCallerDefinitions($interface, $className);
     4308    if (InstanceOverridesGetCallData($interface)) {
     4309        GenerateGetCallData(\@implContent, $interface, $className);
    43064310    }
    43074311   
     
    52515255}
    52525256
     5257sub GenerateGetCallData
     5258{
     5259    my ($outputArray, $interface, $className) = @_;
     5260
     5261    return if $interface->extendedAttributes->{CustomGetCallData};
     5262
     5263    if ($interface->extendedAttributes->{Plugin}) {
     5264        GeneratePluginCall($outputArray, $interface, $className);
     5265    } else {
     5266        GenerateLegacyCallerDefinitions($outputArray, $interface, $className);
     5267    }
     5268}
     5269
     5270sub GeneratePluginCall
     5271{
     5272    my ($outputArray, $interface, $className) = @_;
     5273
     5274    AddToImplIncludes("JSPluginElementFunctions.h");
     5275
     5276    push(@$outputArray, "CallType ${className}::getCallData(JSCell* cell, CallData& callData)\n");
     5277    push(@$outputArray, "{\n");
     5278    push(@$outputArray, "    auto* thisObject = jsCast<${className}*>(cell);\n");
     5279    push(@$outputArray, "    ASSERT_GC_OBJECT_INHERITS(thisObject, info());\n\n");
     5280
     5281    push(@$outputArray, "    return pluginElementCustomGetCallData(thisObject, callData);\n");
     5282    push(@$outputArray, "}\n");
     5283    push(@$outputArray, "\n");
     5284}
     5285
    52535286sub GenerateLegacyCallerDefinitions
    52545287{
    5255     my ($interface, $className) = @_;
    5256 
    5257     return if $interface->extendedAttributes->{CustomCall};
    5258    
     5288    my ($outputArray, $interface, $className) = @_;
     5289
    52595290    my @legacyCallers = @{$interface->{LegacyCallers}};
    52605291    if (@legacyCallers > 1) {
    52615292        foreach my $legacyCaller (@legacyCallers) {
    5262             GenerateLegacyCallerDefinition($interface, $className, $legacyCaller);
     5293            GenerateLegacyCallerDefinition($outputArray, $interface, $className, $legacyCaller);
    52635294        }
    52645295
    52655296        my $overloadFunctionPrefix = "call${className}";
    52665297
    5267         push(@implContent, "EncodedJSValue JSC_HOST_CALL ${overloadFunctionPrefix}(ExecState* state)\n");
    5268         push(@implContent, "{\n");
    5269         push(@implContent, "    VM& vm = state->vm();\n");
    5270         push(@implContent, "    auto throwScope = DECLARE_THROW_SCOPE(vm);\n");
    5271         push(@implContent, "    UNUSED_PARAM(throwScope);\n");
     5298        push(@$outputArray, "EncodedJSValue JSC_HOST_CALL ${overloadFunctionPrefix}(ExecState* state)\n");
     5299        push(@$outputArray, "{\n");
     5300        push(@$outputArray, "    VM& vm = state->vm();\n");
     5301        push(@$outputArray, "    auto throwScope = DECLARE_THROW_SCOPE(vm);\n");
     5302        push(@$outputArray, "    UNUSED_PARAM(throwScope);\n");
    52725303
    52735304        GenerateOverloadDispatcher($legacyCallers[0], $interface, $overloadFunctionPrefix, "", "state");
    52745305
    5275         push(@implContent, "}\n\n");
     5306        push(@$outputArray, "}\n\n");
    52765307    } else {
    5277         GenerateLegacyCallerDefinition($interface, $className, $legacyCallers[0]);
    5278     }
    5279 
    5280     push(@implContent, "CallType ${className}::getCallData(JSCell*, CallData& callData)\n");
    5281     push(@implContent, "{\n");
    5282     push(@implContent, "    callData.native.function = call${className};\n");
    5283     push(@implContent, "    return CallType::Host;\n");
    5284     push(@implContent, "}\n");
    5285     push(@implContent, "\n");
     5308        GenerateLegacyCallerDefinition($outputArray, $interface, $className, $legacyCallers[0]);
     5309    }
     5310
     5311    push(@$outputArray, "CallType ${className}::getCallData(JSCell*, CallData& callData)\n");
     5312    push(@$outputArray, "{\n");
     5313    push(@$outputArray, "    callData.native.function = call${className};\n");
     5314    push(@$outputArray, "    return CallType::Host;\n");
     5315    push(@$outputArray, "}\n");
     5316    push(@$outputArray, "\n");
    52865317}
    52875318
    52885319sub GenerateLegacyCallerDefinition
    52895320{
    5290     my ($interface, $className, $operation) = @_;
     5321    my ($outputArray, $interface, $className, $operation) = @_;
    52915322
    52925323    my $isOverloaded = $operation->{overloads} && @{$operation->{overloads}} > 1;
    52935324    if ($isOverloaded) {
    5294         push(@implContent, "static inline EncodedJSValue call${className}$operation->{overloadIndex}(ExecState* state)\n");
     5325        push(@$outputArray, "static inline EncodedJSValue call${className}$operation->{overloadIndex}(ExecState* state)\n");
    52955326    } else {
    5296         push(@implContent, "static EncodedJSValue JSC_HOST_CALL call${className}(ExecState* state)\n");
    5297     }
    5298 
    5299     push(@implContent, "{\n");
    5300     push(@implContent, "    VM& vm = state->vm();\n");
    5301     push(@implContent, "    auto throwScope = DECLARE_THROW_SCOPE(vm);\n");
    5302     push(@implContent, "    UNUSED_PARAM(throwScope);\n");
     5327        push(@$outputArray, "static EncodedJSValue JSC_HOST_CALL call${className}(ExecState* state)\n");
     5328    }
     5329
     5330    push(@$outputArray, "{\n");
     5331    push(@$outputArray, "    VM& vm = state->vm();\n");
     5332    push(@$outputArray, "    auto throwScope = DECLARE_THROW_SCOPE(vm);\n");
     5333    push(@$outputArray, "    UNUSED_PARAM(throwScope);\n");
    53035334
    53045335    my $indent = "    ";
    5305     GenerateArgumentsCountCheck(\@implContent, $operation, $interface, $indent);
    5306 
    5307     push(@implContent, "    auto* castedThis = jsCast<${className}*>(state->jsCallee());\n");
    5308     push(@implContent, "    ASSERT(castedThis);\n");
    5309     push(@implContent, "    auto& impl = castedThis->wrapped();\n");
     5336    GenerateArgumentsCountCheck($outputArray, $operation, $interface, $indent);
     5337
     5338    push(@$outputArray, "    auto* castedThis = jsCast<${className}*>(state->jsCallee());\n");
     5339    push(@$outputArray, "    ASSERT(castedThis);\n");
     5340    push(@$outputArray, "    auto& impl = castedThis->wrapped();\n");
    53105341
    53115342    my $functionImplementationName = $operation->extendedAttributes->{ImplementedAs} || $codeGenerator->WK_lcfirst($operation->name) || "legacyCallerOperationFromBindings";
    5312     my $functionString = GenerateParametersCheck(\@implContent, $operation, $interface, $functionImplementationName, $indent);
    5313 
    5314     GenerateImplementationFunctionCall(\@implContent, $operation, $interface, $functionString, $indent);
    5315 
    5316     push(@implContent, "}\n\n");
     5343    my $functionString = GenerateParametersCheck($outputArray, $operation, $interface, $functionImplementationName, $indent);
     5344
     5345    GenerateImplementationFunctionCall($outputArray, $operation, $interface, $functionString, $indent);
     5346
     5347    push(@$outputArray, "}\n\n");
    53175348}
    53185349
     
    68196850    }
    68206851
    6821     if ($interface->extendedAttributes->{CustomNamedGetterOnPrototype}) {
     6852    # FIXME: Should this override putByIndex as well?
     6853    if ($interface->extendedAttributes->{CustomPutOnPrototype}) {
    68226854        push(@$outputArray, "\n");
    68236855        push(@$outputArray, "    static bool put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);\n");
    6824         push(@$outputArray, "    bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);\n");
    6825     }
    6826 
    6827     # Custom defineOwnProperty function
     6856    }
     6857
    68286858    if ($interface->extendedAttributes->{CustomDefineOwnPropertyOnPrototype}) {
    68296859        push(@$outputArray, "\n");
     
    70877117}
    70887118
    7089 sub InstanceOverridesCall
     7119sub InstanceOverridesGetCallData
    70907120{
    70917121    my $interface = shift;
    7092     return $interface->extendedAttributes->{CustomCall} || $interface->{LegacyCallers}
     7122    return $interface->{LegacyCallers} || $interface->extendedAttributes->{CustomGetCallData} || $interface->extendedAttributes->{Plugin};
    70937123}
    70947124
     
    70977127    my $interface = shift;
    70987128    return IsDOMGlobalObject($interface)
    7099         || $interface->extendedAttributes->{CustomNamedGetterOnPrototype}
     7129        || $interface->extendedAttributes->{CustomPutOnPrototype}
    71007130        || $interface->extendedAttributes->{CustomDefineOwnPropertyOnPrototype};
    71017131}
  • trunk/Source/WebCore/bindings/scripts/IDLAttributes.json

    r219007 r219302  
    7979            "contextsAllowed": ["attribute", "operation"]
    8080        },
    81         "CustomCall": {
    82             "contextsAllowed": ["interface"]
    83         },
    8481        "CustomConstructor": {
    8582            "contextsAllowed": ["interface"]
     
    9491            "contextsAllowed": ["interface"]
    9592        },
    96         "CustomEnumerateProperty": {
     93        "CustomGetCallData": {
     94            "contextsAllowed": ["interface"]
     95        },
     96        "CustomGetOwnPropertyNames": {
    9797            "contextsAllowed": ["interface"]
    9898        },
     
    100100            "contextsAllowed": ["interface"]
    101101        },
    102         "CustomGetOwnPropertySlotByIndex": {
    103             "contextsAllowed": ["interface"]
    104         },
    105102        "CustomGetOwnPropertySlotAndDescriptor": {
    106103            "contextsAllowed": ["interface"]
     
    118115            "contextsAllowed": ["interface"]
    119116        },
    120         "CustomNamedGetterOnPrototype": {
    121             "contextsAllowed": ["interface"]
    122         },
    123         "CustomNamedSetter": {
    124             "contextsAllowed": ["interface"]
    125         },
    126117        "CustomPreventExtensions": {
    127118            "contextsAllowed": ["interface"]
     
    133124            "contextsAllowed": ["interface"]
    134125        },
    135         "CustomPutFunction": {
     126        "CustomPut": {
     127            "contextsAllowed": ["interface"]
     128        },
     129        "CustomPutOnPrototype": {
    136130            "contextsAllowed": ["interface"]
    137131        },
     
    342336            "notes" : "Only used by WebKitTestRunner and DumpRenderTree"
    343337        },
     338        "Plugin": {
     339            "contextsAllowed": ["interface"],
     340            "notes" : "Should only be used by elements that forward to Netscape plug-ins"
     341        },
    344342        "PrimaryGlobal": {
    345343            "contextsAllowed": ["interface"],
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp

    r218997 r219302  
    414414}
    415415
    416 bool JSTestInterface::put(JSCell* cell, ExecState* state, PropertyName propertyName, JSValue value, PutPropertySlot& putPropertySlot)
    417 {
    418     auto* thisObject = jsCast<JSTestInterface*>(cell);
    419     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    420 
    421     bool putResult = false;
    422     if (thisObject->putDelegate(state, propertyName, value, putPropertySlot, putResult))
    423         return putResult;
    424 
    425     return JSObject::put(thisObject, state, propertyName, value, putPropertySlot);
    426 }
    427 
    428 bool JSTestInterface::putByIndex(JSCell* cell, ExecState* state, unsigned index, JSValue value, bool shouldThrow)
    429 {
    430     auto* thisObject = jsCast<JSTestInterface*>(cell);
    431     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    432 
    433     auto propertyName = Identifier::from(state, index);
    434     PutPropertySlot slot(thisObject, shouldThrow);
    435     bool putResult = false;
    436     if (thisObject->putDelegate(state, propertyName, value, slot, putResult))
    437         return putResult;
    438 
    439     return JSObject::putByIndex(cell, state, index, value, shouldThrow);
    440 }
    441 
    442416template<> inline JSTestInterface* IDLAttribute<JSTestInterface>::cast(ExecState& state, EncodedJSValue thisValue)
    443417{
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h

    r216198 r219302  
    8080
    8181    void finishCreation(JSC::VM&);
    82     bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);
    8382};
    8483
  • trunk/Source/WebCore/bindings/scripts/test/JS/JSTestPluginInterface.h

    r219301 r219302  
    2121#pragma once
    2222
    23 #if ENABLE(Condition1) || ENABLE(Condition2)
    24 
    2523#include "JSDOMWrapper.h"
    26 #include "TestInterface.h"
     24#include "TestPluginInterface.h"
     25#include <runtime/CallData.h>
    2726#include <wtf/NeverDestroyed.h>
    2827
    2928namespace WebCore {
    3029
    31 class WEBCORE_EXPORT JSTestInterface : public JSDOMWrapper<TestInterface> {
     30class JSTestPluginInterface : public JSDOMWrapper<TestPluginInterface> {
    3231public:
    33     using Base = JSDOMWrapper<TestInterface>;
    34     static JSTestInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestInterface>&& impl)
     32    using Base = JSDOMWrapper<TestPluginInterface>;
     33    static JSTestPluginInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestPluginInterface>&& impl)
    3534    {
    36         JSTestInterface* ptr = new (NotNull, JSC::allocateCell<JSTestInterface>(globalObject->vm().heap)) JSTestInterface(structure, *globalObject, WTFMove(impl));
     35        JSTestPluginInterface* ptr = new (NotNull, JSC::allocateCell<JSTestPluginInterface>(globalObject->vm().heap)) JSTestPluginInterface(structure, *globalObject, WTFMove(impl));
    3736        ptr->finishCreation(globalObject->vm());
    3837        return ptr;
     
    4140    static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&);
    4241    static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&);
    43     static TestInterface* toWrapped(JSC::VM&, JSC::JSValue);
     42    static TestPluginInterface* toWrapped(JSC::VM&, JSC::JSValue);
     43    static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
     44    static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
    4445    static bool put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&);
    4546    static bool putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue, bool shouldThrow);
     47    static JSC::CallType getCallData(JSC::JSCell*, JSC::CallData&);
     48
    4649    static void destroy(JSC::JSCell*);
    4750
     
    5457
    5558    static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*);
    56 
    57     // Custom attributes
    58 #if ENABLE(Condition22) || ENABLE(Condition23)
    59     JSC::JSValue implementsStr3(JSC::ExecState&) const;
    60 #endif
    61 #if ENABLE(Condition22) || ENABLE(Condition23)
    62     void setImplementsStr3(JSC::ExecState&, JSC::JSValue);
    63 #endif
    64 #if ENABLE(Condition11) || ENABLE(Condition12)
    65     JSC::JSValue supplementalStr3(JSC::ExecState&) const;
    66 #endif
    67 #if ENABLE(Condition11) || ENABLE(Condition12)
    68     void setSupplementalStr3(JSC::ExecState&, JSC::JSValue);
    69 #endif
    70 
    71     // Custom functions
    72 #if ENABLE(Condition22) || ENABLE(Condition23)
    73     JSC::JSValue implementsMethod3(JSC::ExecState&);
    74 #endif
    75 #if ENABLE(Condition11) || ENABLE(Condition12)
    76     JSC::JSValue supplementalMethod3(JSC::ExecState&);
    77 #endif
     59public:
     60    static const unsigned StructureFlags = JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::TypeOfShouldCallGetCallData | Base::StructureFlags;
    7861protected:
    79     JSTestInterface(JSC::Structure*, JSDOMGlobalObject&, Ref<TestInterface>&&);
     62    JSTestPluginInterface(JSC::Structure*, JSDOMGlobalObject&, Ref<TestPluginInterface>&&);
    8063
    8164    void finishCreation(JSC::VM&);
    82     bool putDelegate(JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&, bool& putResult);
    8365};
    8466
    85 class JSTestInterfaceOwner : public JSC::WeakHandleOwner {
     67class JSTestPluginInterfaceOwner : public JSC::WeakHandleOwner {
    8668public:
    8769    virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
     
    8971};
    9072
    91 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestInterface*)
     73inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestPluginInterface*)
    9274{
    93     static NeverDestroyed<JSTestInterfaceOwner> owner;
     75    static NeverDestroyed<JSTestPluginInterfaceOwner> owner;
    9476    return &owner.get();
    9577}
    9678
    97 inline void* wrapperKey(TestInterface* wrappableObject)
     79inline void* wrapperKey(TestPluginInterface* wrappableObject)
    9880{
    9981    return wrappableObject;
    10082}
    10183
    102 WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestInterface&);
    103 inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestInterface* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
    104 JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<TestInterface>&&);
    105 inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<TestInterface>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); }
     84JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestPluginInterface&);
     85inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, TestPluginInterface* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }
     86JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<TestPluginInterface>&&);
     87inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<TestPluginInterface>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); }
    10688
    107 template<> struct JSDOMWrapperConverterTraits<TestInterface> {
    108     using WrapperClass = JSTestInterface;
    109     using ToWrappedReturnType = TestInterface*;
     89template<> struct JSDOMWrapperConverterTraits<TestPluginInterface> {
     90    using WrapperClass = JSTestPluginInterface;
     91    using ToWrappedReturnType = TestPluginInterface*;
    11092};
    11193
    11294} // namespace WebCore
    113 
    114 #endif // ENABLE(Condition1) || ENABLE(Condition2)
  • trunk/Source/WebCore/bindings/scripts/test/TestInterface.idl

    r217369 r219302  
    3131[
    3232    ActiveDOMObject,
    33     CustomNamedSetter,
     33    CustomPut,
    3434    Conditional=Condition1|Condition2,
    3535    ConstructorCallWith=ScriptExecutionContext,
  • trunk/Source/WebCore/css/CSSStyleDeclaration.idl

    r217773 r219302  
    2020
    2121[
    22     CustomEnumerateProperty,
     22    CustomGetOwnPropertyNames,
    2323    CustomGetOwnPropertySlotAndDescriptor,
    24     CustomNamedSetter,
     24    CustomPut,
    2525    ExportMacro=WEBCORE_EXPORT,
    2626    GenerateIsReachable,
  • trunk/Source/WebCore/html/HTMLAppletElement.idl

    r217773 r219302  
    2020
    2121[
    22     CustomCall,
    23     CustomGetOwnPropertySlotAndDescriptor,
    24     CustomNamedSetter,
     22    Plugin
    2523] interface HTMLAppletElement : HTMLElement {
    2624    [Reflect] attribute DOMString align;
  • trunk/Source/WebCore/html/HTMLEmbedElement.idl

    r217773 r219302  
    2020
    2121[
    22     CustomCall,
    23     CustomGetOwnPropertySlotAndDescriptor,
    24     CustomNamedSetter,
     22    Plugin
    2523] interface HTMLEmbedElement : HTMLElement {
    2624    [Reflect] attribute DOMString align;
  • trunk/Source/WebCore/html/HTMLObjectElement.idl

    r217773 r219302  
    2020
    2121[
    22     CustomCall,
    23     CustomGetOwnPropertySlotAndDescriptor,
    24     CustomNamedSetter
     22    Plugin
    2523] interface HTMLObjectElement : HTMLElement {
    2624    readonly attribute HTMLFormElement form;
  • trunk/Source/WebCore/page/DOMWindow.idl

    r217773 r219302  
    3131    CustomDefineOwnProperty,
    3232    CustomDeleteProperty,
    33     CustomEnumerateProperty,
     33    CustomGetOwnPropertyNames,
    3434    CustomGetOwnPropertySlot,
    35     CustomGetOwnPropertySlotByIndex,
    3635    CustomGetPrototype,
    3736    CustomPreventExtensions,
    3837    CustomProxyToJSObject,
    39     CustomPutFunction,
     38    CustomPut,
    4039    CustomToStringName,
    4140    ExportMacro=WEBCORE_EXPORT,
  • trunk/Source/WebCore/page/Location.idl

    r218835 r219302  
    3232    CustomDefineOwnPropertyOnPrototype,
    3333    CustomDeleteProperty,
    34     CustomEnumerateProperty,
    35     CustomGetOwnPropertySlotAndDescriptor,
     34    CustomGetOwnPropertyNames,
     35    CustomGetOwnPropertySlot,
    3636    CustomGetPrototype,
    37     CustomNamedGetterOnPrototype,
    38     CustomNamedSetter,
    3937    CustomPreventExtensions,
     38    CustomPut,
     39    CustomPutOnPrototype,
    4040    CustomToStringName,
    4141    GenerateIsReachable=ImplFrame,
    4242    IsImmutablePrototypeExoticObject,
    43     Unforgeable,
     43    Unforgeable
    4444] interface Location {
    4545    [SetterCallWith=ActiveWindow&FirstWindow, SetterMayThrowException, DoNotCheckSecurityOnSetter] stringifier attribute USVString href;
  • trunk/Source/WebCore/storage/Storage.idl

    r217773 r219302  
    2525
    2626[
    27     CustomEnumerateProperty,
     27    CustomGetOwnPropertyNames,
    2828    GenerateIsReachable=ImplFrame,
    2929    SkipVTableValidation,
Note: See TracChangeset for help on using the changeset viewer.