Commit graph

18 commits

Author SHA1 Message Date
Gaming4JC
7ce1742985 Bug 1392970 - Part 1: Make CustomElementDefinition ref-counted and put it in CustomElementData.
Tag UXP Issue #1344
2020-01-31 07:37:25 +08:00
Gaming4JC
b0285ef3f7 Bug 1301024 - Part 2: Implement create an element steps.
Tag UXP Issue #1344
2020-01-31 07:37:22 +08:00
Gaming4JC
2bd8be69ea 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-31 07:37:07 +08:00
Gaming4JC
4408e19e96 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-31 07:37:03 +08:00
Gaming4JC
729ffa53f3 Bug 1299363 - Part 5-2: Implement new upgrade steps.
Tag UXP Issue #1344
2020-01-31 07:37:00 +08:00
Gaming4JC
005b7118ee 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-31 07:36:52 +08:00
Gaming4JC
9fc88d01e3 Bug 1299363 - Part 3: Remove unused argument in UpgradeCandidates.
Tag UXP Issue #1344
2020-01-31 07:36:49 +08:00
Gaming4JC
c34486aaa0 Bug 1299363 - Part 1: Implement construction stack.
Tag UXP Issue #1344
2020-01-31 07:36:43 +08:00
Gaming4JC
34dd7065f5 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-31 07:36:40 +08:00
Gaming4JC
b631d9d59c 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-31 07:36:08 +08:00
Gaming4JC
cb89330bf3 Bug 1359346 - Implement custom element state;
https://dom.spec.whatwg.org/#concept-element-custom-element-state

Tag UXP Issue #1344
2020-01-31 07:36:01 +08:00
Gaming4JC
f7154d573b Bug 1309147 - Part 5: Eliminate performance cliff when accessing CEReactions code.
Tag UXP Issue #1344
2020-01-31 07:35:50 +08:00
Gaming4JC
bde53294f8 Bug 1347446 - Move custom element reactions stack to DocGroup.
Tag UXP Issue #1344
2020-01-31 07:35:29 +08:00
Gaming4JC
62678b52de Bug 1341693 - Don't need to check GetDocShell() when creating CustomElementRegistry;
Tag UXP Issue #1344
2020-01-31 07:35:26 +08:00
Gaming4JC
a91f703945 Bug 1309184 - Implement upgrade reaction for custom element reactions.
Tag UXP Issue #1344
2020-01-31 07:35:23 +08:00
Gaming4JC
ed08e1aced Bug 1274159 - Part 2-2: Support HTMLConstructor WebIDL extended attribute for custom elements;
Tag UXP Issue #1344
2020-01-31 07:35:10 +08:00
Gaming4JC
516fe49cb2 Bug 1274159 - Part 1: Support looking up definitions by using constructor as a key;
Tag UXP Issue #1344
2020-01-31 07:35:05 +08:00
Roy Tam
dcd9973243 import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo 2018-01-19 03:59:58 +08:00