Commit graph

3,292 commits

Author SHA1 Message Date
Gaming4JC
207d5a2e3e Bug 1334043 - Part 1: Replace attached callback (v0) with connected callback (v1).
Tag UXP Issue #1344
2020-01-31 07:37:32 +08:00
Gaming4JC
d1a1106760 Bug 1392970 - Part 2: Get CustomElementDefinition from CustomElementData when possible.
Tag UXP Issue #1344
2020-01-31 07:37:28 +08:00
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
054c852fd2 Bug 1301024 - Part 1: Set CreateElement/CreateElementNS is attribute.
Tag UXP Issue #1344
2020-01-31 07:37:20 +08:00
Gaming4JC
a8c9f80fbe Bug 1398401 - Add preference check for custom element setup.
Tag UXP Issue #1344
2020-01-31 07:37:16 +08:00
Gaming4JC
6f325a61af Bug 1332233 - prevent resource leak in CustomElementRegistry::Define.
Tag UXP Issue #1344
2020-01-31 07:37:10 +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
b2e0ae6983 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-31 07:36:57 +08:00
Gaming4JC
3dce7ee1bb 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-31 07:36:54 +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
a35a4e8f12 Bug 1299363 - Part 2: Allow prototype swizzling in html constructor.
Tag UXP Issue #1344
2020-01-31 07:36:46 +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
931b14f847 Bug 1315885 - Part 3: Transfer the ownership of ReactionQueue's entry due to re-enter CustomElementReactionsStack::InvokeReactions.
Tag UXP Issue #1344
2020-01-31 07:36:37 +08:00
Gaming4JC
b94fadac97 Bug 1315885 - Part 2: Avoid rethrowing exception in CustomElementCallback::Call.
Tag UXP Issue #1344
2020-01-31 07:36:34 +08:00
Gaming4JC
1cdd15ee85 Bug 1315885 - Part 1: Add ShadowRoot CEReactions annotation.
Tag UXP Issue #1344
2020-01-31 07:36:31 +08:00
Gaming4JC
a5a2fbc9d7 Bug 1340027 - Part 5: Add XSLTProcessor CEReactions annotation.
Tag UXP Issue #1344
2020-01-31 07:36:28 +08:00
Gaming4JC
350dc9e678 Bug 1340027 - Part 4: Add DOM parsing CEReactions annotation.
Tag UXP Issue #1344
2020-01-31 07:36:25 +08:00
Gaming4JC
895d5b190f Bug 1340027 - Part 3: Add CSSStyleDeclaration CEReactions annotation.
Tag UXP Issue #1344
2020-01-31 07:36:22 +08:00
Gaming4JC
8119a60e3d Bug 1340027 - Part 2: Add HTML CEReactions annotation.
Tag UXP Issue #1344
2020-01-31 07:36:19 +08:00
Gaming4JC
0ff8d62963 Bug 1340027 - Part 1: Add DOM CEReactions annotation.
Tag UXP Issue #1344
2020-01-31 07:36:16 +08:00
Gaming4JC
dd7fa403a8 Bug 1377993 - Make node slots less memory hungry in common cases.
Tag UXP Issue #1344
2020-01-31 07:36:13 +08:00
Gaming4JC
7f03d02552 Bug 1347634 - GetCustomElementData and SetCustomElementData don't need to be virtual;
Tag UXP Issue #1344
2020-01-31 07:36:11 +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
cca692c240 Creating customized built-in elements without relevant definitions registered first shouldn't throw NotFoundError;
per spec change: https://github.com/w3c/webcomponents/issues/608

Tag UXP Issue #1344
2020-01-31 07:36:05 +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
5ad5f4e1ec Bug 1357002 - Part 2: Don't call SetupCustomElement() if the custom element feature is pref-ed off;
Tag UXP Issue #1344
2020-01-31 07:35:59 +08:00
Gaming4JC
979d2bfb96 Bug 1357002 - Part 1: Cache dom.webcomponents.customelements.enabled preference;
Tag UXP Issue #1344
2020-01-31 07:35:56 +08:00
Gaming4JC
d662ddd6b6 Bug 1341898 - Make nsDocument::IsWebComponentsEnabled use a cached bool pref;
Note: Minus IPC bit.

Tag UXP Issue #1344
2020-01-31 07:35:53 +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
cc71e21e02 Bug 1309147 - Part 4: Add CEReactions for CustomElementRegistry.
Tag UXP Issue #1344
2020-01-31 07:35:47 +08:00
Gaming4JC
303037d0fc Bug 1309147 - Part 3: Implement the support for CEReactions in Codegen.
Tag UXP Issue #1344
2020-01-31 07:35:44 +08:00
Gaming4JC
0b774c0ec4 Bug 1309147 - Part 2: Add the name of 'this' value's JSObject* for codegen to generate CEReaction code.
Tag UXP Issue #1344
2020-01-31 07:35:41 +08:00
Gaming4JC
39fcec342d Bug 1309147 - Part 1: Implement the support for CEReactions in WebIDL parser.
Tag UXP Issue #1344
2020-01-31 07:35:38 +08:00
Gaming4JC
932dde0dfe Bug 1350960 - Release CustomElementReactionsStack in TabGroup thread when DocGroup is going away.
Note: In UXP we use non-Quantum thread checking implementation here.

Tag UXP Issue #1344
2020-01-31 07:35:35 +08:00
Gaming4JC
a176a0e5f2 Bug 1351979 - Change CustomElementRegistry::Define code to properly propagate out JS exceptions;
Tag UXP Issue #1344
2020-01-31 07:35:32 +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
d76a336cd0 Bug 1274159 - Part 4: Add test cases for HTMLConstructor;
Tag UXP Issue #1344
2020-01-31 07:35:20 +08:00
Gaming4JC
af9931215b Bug 1274159 - Part 3-2: Update web-platform-test expected result;
Tag UXP Issue #1344
2020-01-31 07:35:17 +08:00
Gaming4JC
978d53832c Bug 1274159 - Part 3-1: Add HTMLConstructor to HTMLElement and its subclass;
Tag UXP Issue #1344
2020-01-31 07:35:14 +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
64e957cc9b Bug 1274159 - Part 2-1: Include the name of relevant interface in nsHTMLTagList.h;
Tag UXP Issue #1344
2020-01-31 07:35:08 +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
Gaming4JC
a2e1955dc6 Bug 1271549 - Remove details and summary preference.
Tag UXP Issue #1344
2020-01-31 07:35:02 +08:00