mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-04 22:37:29 +09:00
Bug 1309147 - Part 3: Implement the support for CEReactions in Codegen.
Tag UXP Issue #1344
This commit is contained in:
parent
0b774c0ec4
commit
303037d0fc
8 changed files with 96 additions and 0 deletions
|
|
@ -7672,6 +7672,17 @@ class CGPerSignatureCall(CGThing):
|
|||
CGIfWrapper(CGList(xraySteps),
|
||||
"objIsXray"))
|
||||
|
||||
if (idlNode.getExtendedAttribute('CEReactions') is not None and
|
||||
not getter):
|
||||
cgThings.append(CGGeneric(fill(
|
||||
"""
|
||||
CustomElementReactionsStack* reactionsStack = GetCustomElementReactionsStack(${obj});
|
||||
Maybe<AutoCEReaction> ceReaction;
|
||||
if (reactionsStack) {
|
||||
ceReaction.emplace(reactionsStack);
|
||||
}
|
||||
""", obj=objectName)))
|
||||
|
||||
# If this is a method that was generated by a maplike/setlike
|
||||
# interface, use the maplike/setlike generator to fill in the body.
|
||||
# Otherwise, use CGCallGenerator to call the native method.
|
||||
|
|
@ -13840,12 +13851,18 @@ class CGBindingRoot(CGThing):
|
|||
iface = desc.interface
|
||||
return any(m.getExtendedAttribute("Deprecated") for m in iface.members + [iface])
|
||||
|
||||
def descriptorHasCEReactions(desc):
|
||||
iface = desc.interface
|
||||
return any(m.getExtendedAttribute("CEReactions") for m in iface.members + [iface])
|
||||
|
||||
bindingHeaders["nsIDocument.h"] = any(
|
||||
descriptorDeprecated(d) for d in descriptors)
|
||||
bindingHeaders["mozilla/Preferences.h"] = any(
|
||||
descriptorRequiresPreferences(d) for d in descriptors)
|
||||
bindingHeaders["mozilla/dom/DOMJSProxyHandler.h"] = any(
|
||||
d.concrete and d.proxy for d in descriptors)
|
||||
bindingHeaders["mozilla/dom/CustomElementRegistry.h"] = any(
|
||||
descriptorHasCEReactions(d) for d in descriptors)
|
||||
|
||||
def descriptorHasChromeOnly(desc):
|
||||
ctor = desc.interface.ctor()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue