Commit graph

3,318 commits

Author SHA1 Message Date
Gaming4JC
76b1eaa538 Bug 1410790 - Add more assertion in CustomElementData::SetCustomElementDefinition and GetCustomElementDefinition;
This is a follow-up patch for bug 1392970. Since we only set CustomElementDefinition on a custom element which is custom, we could add more assertion to ensure that.

Tag UXP Issue #1344
2020-01-31 07:38:53 +08:00
Gaming4JC
afc180e2f1 Bug 1366241 - Change memory layout of element name and attribute name hashes in HTML parser from sorted to level order BST in order to take advantage of cache during lookup.
HTML Regen.

Tag UXP Issue #1344
2020-01-31 07:38:50 +08:00
Gaming4JC
35fd97ab97 Bug 1366241 - Change memory layout of element name and attribute name hashes from sorted to level order BST in order to take advantage of cache during lookup.
Java Regen.

Tag UXP Issue #1344
2020-01-31 07:38:47 +08:00
Gaming4JC
3df0912752 Bug 1366241 - Change memory layout of element name and attribute name hashes from sorted to level order BST in order to take advantage of cache during lookup.
Tag UXP Issue #1344
2020-01-31 07:38:44 +08:00
Gaming4JC
f4b7430967 Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
HTML Regen.

Tag UXP Issue #1344
2020-01-31 07:38:41 +08:00
Gaming4JC
39b7466633 Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
Manual changes

Tag UXP Issue #1344
2020-01-31 07:38:37 +08:00
Gaming4JC
d91db14a71 Bug 1358037 - Inline the methods of nsHtml5ElementName and nsHtml5AttributeName.
Tag UXP Issue #1344
2020-01-31 07:38:34 +08:00
Gaming4JC
84ba7ad062 Bug 1355479 - Flatten attribute storage in the HTML parser to AutoTArray to avoid malloc.
HTML Regen.

Tag UXP Issue #1344
2020-01-31 07:38:31 +08:00
Gaming4JC
a330217f3f Bug 1355479 - Flatten attribute storage in the HTML parser to AutoTArray to avoid malloc.
- Removes nsHtml5ReleasableAttributeName
- Adds nsHtml5AttributeEntry.h
- Makes nsHtml5HtmlAttributes no longer gentered.

Tag UXP Issue #1344
2020-01-31 07:38:28 +08:00
Gaming4JC
67a2c5cb06 Bug 1355479 - Remove isindex on the Java side and allow the C++ side to reduce malloc in attribute handling.
Tag UXP Issue #1344
2020-01-31 07:38:25 +08:00
Gaming4JC
81958be04f Bug 1355769 - Avoid malloc for nsHtml5ElementName when processing a non-interned element name.
Fix build - Remove no longer used ReleaseableElement

Tag UXP Issue #1344
2020-01-31 07:38:22 +08:00
Gaming4JC
c37e7b2047 Bug 1355769 - Avoid malloc for nsHtml5ElementName when processing a non-interned element name.
HTML Regen.

Tag UXP Issue #1344
2020-01-31 07:38:19 +08:00
Gaming4JC
4f93df8cbf Bug 1355769 - Avoid malloc for nsHtml5ElementName when processing a non-interned element name.
Tag UXP Issue #1344
2020-01-31 07:38:17 +08:00
Gaming4JC
7be0e39443 Bug 1355493 - Tweak bufToHash() and reduce the number of pre-interned elements.
HTML Regen.

Tag UXP Issue #1344
2020-01-31 07:38:14 +08:00
Gaming4JC
94f9a7d235 Bug 1355493 - Tweak bufToHash() and reduce the number of pre-interned elements.
Java Regen.

Tag UXP Issue #1344
2020-01-31 07:38:11 +08:00
Gaming4JC
d39cb8903f Bug 1355493 - Tweak bufToHash() and reduce the number of pre-interned elements.
Tag UXP Issue #1344
2020-01-31 07:38:07 +08:00
Gaming4JC
a5448058ba Bug 1352082 - Avoid shifting a signed integer left in C++.
Tag UXP Issue #1344
2020-01-31 07:38:04 +08:00
Gaming4JC
2d6fd63895 Bug 1352082 - Avoid shifting a signed integer left in C++.
Tag UXP Issue #1344
2020-01-31 07:38:01 +08:00
Gaming4JC
c0e1a6e397 Bug 1352290 - Add assertion to CustomElementReactionsStack::Enqueue to ensure upgrade reactions aren't scheduled to BackupQueue;
Tag UXP Issue #1344
2020-01-31 07:37:59 +08:00
Gaming4JC
eb9d4bb8df Bug 1407937 - Move mDefinition from CustomElementReacion to CustomElementUpgradeReaction;
Tag UXP Issue #1344
2020-01-31 07:37:56 +08:00
Gaming4JC
e925977c0f Bug 1406297 - Fix Document.createElement must report an exception.
Tag UXP Issue #1344
2020-01-31 07:37:52 +08:00
Gaming4JC
f077bd93a4 Bug 1319342 - Clone a node should enqueue an upgrade reaction.
Tag UXP Issue #1344
2020-01-31 07:37:48 +08:00
Gaming4JC
d35ff2985e Bug 1121994 - Implement adopted callback for custom elements.
Tag UXP Issue #1344
2020-01-31 07:37:46 +08:00
Gaming4JC
659204631b Bug 1334044: Replace detached callback (v0) with disconnected callback (v1).
Tag UXP Issue #1344
2020-01-31 07:37:43 +08:00
Gaming4JC
b477c03089 Bug 1334043 - Part 3: Update tests for connected callback.
Tag UXP Issue #1344
2020-01-31 07:37:39 +08:00
Gaming4JC
befa1027e3 Bug 1334043 - Part 2: Make nsContentUtils::EnqueueLifecycleCallback static.
We make nsContentUtils::EnqueueLifecycleCallback static so that it can be called without a window object. To achive this, we also make CustomElementReaction not taking a CustomElementRegistry in the constructor, as it can call Upgrade statically.

Tag UXP Issue #1344
2020-01-31 07:37:35 +08:00
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