Commit Graph

28 Commits

Author SHA1 Message Date
Gaming4JC 42331663e6 Bug 1392970 - Part 2: Get CustomElementDefinition from CustomElementData when possible.
Tag UXP Issue #1344
2020-01-26 15:50:28 -05:00
Gaming4JC 8573c572fb Bug 1392970 - Part 1: Make CustomElementDefinition ref-counted and put it in CustomElementData.
Tag UXP Issue #1344
2020-01-26 15:50:27 -05:00
Gaming4JC f50503df9c Bug 1301024 - Part 2: Implement create an element steps.
Tag UXP Issue #1344
2020-01-26 15:50:27 -05:00
Gaming4JC 49f597e7fb Bug 1332233 - prevent resource leak in CustomElementRegistry::Define.
Tag UXP Issue #1344
2020-01-26 15:50:26 -05:00
Gaming4JC bf004bb63b Bug 1334051 - Part 2: Invoke attributeChangedCallback only if attribute name is in the observed attribute list.
We call attributeChangedCallback in two cases:

1. When any of the attributes in the observed attribute list has changed, appended, removed, or replaced.

2. When upgrading an element, for each attribute in element's attribute list that is in the observed attribute list.

Note: w/ Fixup for not implementing an API Enhancement Bug 1363481.

Tag UXP Issue #1344
2020-01-26 15:50:25 -05:00
Gaming4JC 08fc057471 Bug 1334051 - Part 1: Include namespace in attributeChangedCallback.
Per spec [1], we should include namesapce in attributeChangedCallback argurment list.
[1] https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element, step 3

Tag UXP Issue #1344
2020-01-26 15:50:25 -05:00
Gaming4JC 704318ea0a Bug 1299363 - Part 5-2: Implement new upgrade steps.
Tag UXP Issue #1344
2020-01-26 15:50:25 -05:00
Gaming4JC bbb717ec12 Bug 1299363 - Part 5-1: Make the constructor created by document.registerElement() also works with construction stack.
So that the old upgrade can also work with new upgrade steps which will be implemented in part 5-2.

Tag UXP Issue #1344
2020-01-26 15:50:24 -05:00
Gaming4JC 515c46e695 Bug 1353647 - Fix the custom elements v0 upgrade inconsistency;
There are two places doing prototype setup in old upgrade,
- If definition comes after JS reflector creation, CustomElementRegistry::Upgrade will do prototype swizzling.
- If definition comes before JS reflector creation, Element::WrapObject will set up the prototype.

The later one does SubsumesConsideringDomain, but the former doesn't not.

This patch is to fix the inconsistency, i.e. the former case should also do SubsumesConsideringDomain.

Tag UXP Issue #1344
2020-01-26 15:50:24 -05:00
Gaming4JC d7e5ad445c Bug 1299363 - Part 4: Hold a pointer of ElementQueue in ReactionsStack instead.
1. It is possible that invoking a reaction triggers pushing a new ElementQueue into ReactionStack (e.g., calling define() in constructor which probably enqueue another upgrade reaction), and the reference of ElementQueue passed to InvokeReactions becomes invalid due to the memmove in nsTArray implementation.

2. And we get another benefit from this is memmove becomes faster.

Tag UXP Issue #1344
2020-01-26 15:50:23 -05:00
Gaming4JC ca596f2823 Bug 1299363 - Part 3: Remove unused argument in UpgradeCandidates.
Tag UXP Issue #1344
2020-01-26 15:50:23 -05:00
Gaming4JC 53c9b77ed4 Bug 1315885 - Part 4: Implement callback reaction for custom element reactions.
Note: Skipped SyncInvokeReactions since it is removed in CE v1, waste of time.

Tag UXP Issue #1344
2020-01-26 15:50:22 -05:00
Gaming4JC e6733c9278 Bug 1315885 - Part 3: Transfer the ownership of ReactionQueue's entry due to re-enter CustomElementReactionsStack::InvokeReactions.
Tag UXP Issue #1344
2020-01-26 15:50:21 -05:00
Gaming4JC 6ff1c0c52f Bug 1315885 - Part 2: Avoid rethrowing exception in CustomElementCallback::Call.
Tag UXP Issue #1344
2020-01-26 15:50:21 -05:00
Gaming4JC a2c7b5f1d9 Bug 1325279 - Put the reaction queue in CustomElementData structure instead of using a map;
Bug 1347446 makes accessing ElementReactionQueue becomes a bit non-trival (have to get it via DocGroup). Since bug 1359346 already refactors the creation time of CustomElementData, ReactionQueue can also be put into CustomElementData, then we can just get ReactionQueue from Element.

Tag UXP Issue #1344
2020-01-26 15:50:17 -05:00
Gaming4JC e86aac28b8 Bug 1359346 - Implement custom element state;
https://dom.spec.whatwg.org/#concept-element-custom-element-state

Tag UXP Issue #1344
2020-01-26 15:50:16 -05:00
Gaming4JC 9abc9b2b78 Bug 1357002 - Part 1: Cache dom.webcomponents.customelements.enabled preference;
Tag UXP Issue #1344
2020-01-26 15:50:15 -05:00
Gaming4JC 859fbc139a Bug 1341898 - Make nsDocument::IsWebComponentsEnabled use a cached bool pref;
Note: Minus IPC bit.

Tag UXP Issue #1344
2020-01-26 15:50:15 -05:00
Gaming4JC d8109fa9a0 Bug 1309147 - Part 5: Eliminate performance cliff when accessing CEReactions code.
Tag UXP Issue #1344
2020-01-26 15:50:15 -05:00
Gaming4JC e055747038 Bug 1309147 - Part 4: Add CEReactions for CustomElementRegistry.
Tag UXP Issue #1344
2020-01-26 15:50:14 -05:00
Gaming4JC 16cd53bd8d Bug 1351979 - Change CustomElementRegistry::Define code to properly propagate out JS exceptions;
Tag UXP Issue #1344
2020-01-26 15:50:12 -05:00
Gaming4JC 25a33c7123 Bug 1347446 - Move custom element reactions stack to DocGroup.
Tag UXP Issue #1344
2020-01-26 15:50:12 -05:00
Gaming4JC 5cf46e2f87 Bug 1341693 - Don't need to check GetDocShell() when creating CustomElementRegistry;
Tag UXP Issue #1344
2020-01-26 15:50:11 -05:00
Gaming4JC 3a97503b36 Bug 1309184 - Implement upgrade reaction for custom element reactions.
Tag UXP Issue #1344
2020-01-26 15:50:11 -05:00
Gaming4JC 5222f6e9da Bug 1274159 - Part 2-2: Support HTMLConstructor WebIDL extended attribute for custom elements;
Tag UXP Issue #1344
2020-01-26 15:50:09 -05:00
Gaming4JC 2d31ebf6b6 Bug 1274159 - Part 1: Support looking up definitions by using constructor as a key;
Tag UXP Issue #1344
2020-01-26 15:50:08 -05:00
wolfbeast 1f9ab3a6e6 Remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS 2019-01-18 22:43:29 +01:00
Matt A. Tobin 5f8de423f1 Add m-esr52 at 52.6.0 2018-02-02 04:16:08 -05:00