Граф коммитов

41 Коммитов

Автор SHA1 Сообщение Дата
Jessica Jong 18378d0e3a Bug 1334051 - Part 2: Invoke attributeChangedCallback only if attribute name is in the observed attribute list. f=jdai, r=smaug
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.

MozReview-Commit-ID: LKUY5ibp9RI
* * *
Bug 1334051 - Part 3: Optimize attributeChanged callbacks. r=smaug
2017-08-27 23:25:00 -04:00
Jessica Jong acd0223fec Bug 1334051 - Part 1: Include namespace in attributeChangedCallback. f=jdai, r=smaug
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

MozReview-Commit-ID: 3K6SeIr3FJX
2017-08-27 23:25:00 -04:00
John Dai b50868f89a Bug 1392790 - Avoid doing [CEReactions] if custom element preference is disabled. r=smaug 2017-08-23 02:36:00 -04:00
johndai1984 59be6e40c0 Bug 1299363 - Part 5-2: Implement new upgrade steps. r=bz, r=wchen
MozReview-Commit-ID: 34fIWSKUqyp

--HG--
extra : rebase_source : 3d7af3b1b262ab16c8d70e7389c0534c9261f3f0
extra : histedit_source : 8fd8debbc337ba260c4ec6384026a796bfd00021
2017-08-13 16:40:37 +08:00
Edgar Chen 41babdacd0 Bug 1299363 - Part 5-1: Make the constructor created by document.registerElement() also works with construction stack. r=wchen
So that the old upgrade can also work with new upgrade steps
which will be implemented in part 5-2.

MozReview-Commit-ID: IRyvAPaN19R

--HG--
extra : rebase_source : 2385608f4857401a37f76070eadb643b1016dd15
extra : histedit_source : 4f33007ed262d001782399f6f70ced0c22f47d66
2017-03-23 18:21:23 +08:00
Edgar Chen db2b2840b6 Bug 1299363 - Part 4: Hold a pointer of ElementQueue in ReactionsStack instead. r=wchen
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.

I hit such problem when running
http://w3c-test.org/custom-elements/CustomElementRegistry.html test.

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

MozReview-Commit-ID: KQ86ZugqsPi

--HG--
extra : rebase_source : b5e5c6b45fa79143094f7a337386a4bb57b777be
extra : histedit_source : 70fec53d07b1f693f91db2c1870af3284a47729e
2017-01-09 22:12:57 +08:00
Edgar Chen bc9a767ae3 Bug 1299363 - Part 3: Remove unused argument in UpgradeCandidates. r=bz, r=wchen
MozReview-Commit-ID: 6DtKG5INe8E

--HG--
extra : rebase_source : 4e44459c9b3cc055bab5878c4c113cefb4ea9117
extra : histedit_source : 1f8378e51e3b63b0fa58998902a4f59436e593b5
2016-12-29 18:25:43 +08:00
Sylvestre Ledru 7c0ae251cd Bug 1381253 - Remove redundant control flow declarations rs=ehsan
MozReview-Commit-ID: FFxP4aMCbOL

--HG--
extra : amend_source : 3aec108430b11048f47ffe19d5da7ac5034770a9
2017-07-15 19:03:04 +02:00
John Dai b6b41eca6c Bug 1315885 - Part 4: Implement callback reaction for custom element reactions. r=wchen
--HG--
extra : rebase_source : 0ccd628ce1f0904bf2d412ade2710c6e1203641e
2017-07-18 20:30:00 -04:00
John Dai c409d295b7 Bug 1315885 - Part 3: Transfer the ownership of ReactionQueue's entry due to re-enter CustomElementReactionsStack::InvokeReactions. r=wchen
--HG--
extra : rebase_source : 2dd237b25d8bbaea1f83eee8d1981d2d83d2b76a
2017-07-10 01:40:00 -04:00
John Dai 8b5bf419f7 Bug 1315885 - Part 2: Avoid rethrowing exception in CustomElementCallback::Call. r=wchen
--HG--
extra : rebase_source : 52643ad3f4ff83954d99bfa0382f362d4542be3d
2017-07-11 02:52:00 -04:00
Mats Palmgren 977a9e5f89 Bug 1376498 part 4 - Make all nsClassHashtable::RemoveAndForget() consumers use Remove() instead. r=froydnj
MozReview-Commit-ID: G64YQLlgm6r
2017-07-05 02:01:45 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Mats Palmgren 7edf472a8d Bug 1372048 - Use LookupForAdd instead of Contains+Get/Put to avoid an unnecessary hashtable lookup. r=froydnj
MozReview-Commit-ID: Anh9DdOjNc1
2017-06-14 16:11:21 +02:00
Edgar Chen bc065e9897 Bug 1325279 - Put the reaction queue in CustomElementData structure instead of using a map; r=wchen
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.

MozReview-Commit-ID: D6PouDu8hkL
2017-03-21 17:02:21 +08:00
Edgar Chen 5e15c14056 Bug 1353647 - Fix the custom elements v0 upgrade inconsistency; r=wchen
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.

MozReview-Commit-ID: G3gVsaEa0YF

--HG--
extra : rebase_source : 5e2081e470473cd1a1f642a2dc693127cb9486ca
2017-04-04 23:42:22 +08:00
Edgar Chen be79c5bdce Bug 1359346 - Implement custom element state; r=wchen
https://dom.spec.whatwg.org/#concept-element-custom-element-state

MozReview-Commit-ID: TpGVfTEXPj

--HG--
extra : rebase_source : 26c65a4c83eb4f3c0ccb60a3598336c4afcb0247
2016-12-28 11:43:29 +08:00
Edgar Chen 03f19d5e46 Bug 1357002 - Part 1: Cache "dom.webcomponents.customelements.enabled" preference; r=wchen
MozReview-Commit-ID: HMsvOmYJvjX
2017-04-07 18:48:16 +08:00
John Dai f671ddc4a6 Bug 1309147 - Part 5: Eliminate performance cliff when accessing CEReactions code. r=bz
MozReview-Commit-ID: 61A5YNtJQXF

--HG--
extra : rebase_source : 4ab333a1cf4169047c4500d85412d5b3a642b4eb
extra : histedit_source : 21766c291f63de284baf71fd1d8cf2bb1aaf4bc0
2017-03-30 17:35:59 +08:00
John Dai dc7998c7d8 Bug 1309147 - Part 4: Add CEReactions for CustomElementRegistry. r=bz
MozReview-Commit-ID: ID2TIL9C47R

--HG--
extra : rebase_source : ad2ea9e7b4925d22743a55f55fd6c55e1a8ae805
extra : histedit_source : 176dfbb8a76a1f386d43f20cad1d4fa6125c77af
2017-03-30 18:58:48 +08:00
Edgar Chen f76afcbcd5 Bug 1351979 - Change CustomElementRegistry::Define code to properly propagate out JS exceptions; r=wchen 2017-03-30 11:44:09 +08:00
John Dai b8af434c87 Bug 1347446 - Move custom element reactions stack to DocGroup. r=wchen 2017-03-21 00:42:00 -04:00
Edgar Chen fa227a0808 Bug 1341693 - Don't need to check GetDocShell() when creating CustomElementRegistry; r=wchen
MozReview-Commit-ID: 7k3MQBEMpnV

--HG--
extra : rebase_source : 463205ff7402b132aa48ebc3b59e9128b249ab6b
2017-02-23 18:24:05 +08:00
Ehsan Akhgari 2f146c3954 Bug 1341898 - Make nsDocument::IsWebComponentsEnabled use a cached bool pref; r=baku 2017-02-23 13:25:21 -05:00
Carsten "Tomcat" Book 2484432a93 Merge mozilla-central to autoland 2017-01-19 17:00:25 +01:00
Kris Maglione 729b7a2019 Bug 1273251: Part 3 - Allow CallbackObject to contain a null callable. r=peterv
MozReview-Commit-ID: FCXVHouhG3I

--HG--
extra : rebase_source : f3e9325559d40bcb4017ec2505f435275d4fea7f
2016-11-14 21:25:37 -08:00
Andi-Bogdan Postelnicu a3efd41d68 Bug 1332233 - prevent resource leak in CustomElementRegistry::Define. r=baku
MozReview-Commit-ID: AzXgls3lKCA

--HG--
extra : rebase_source : 89c5c54e0c149aa01dd576fa66402eff1ac76173
2017-01-19 14:31:33 +02:00
John Dai 4335473f7c Bug 1309184 - Implement upgrade reaction for custom element reactions. r=wchen
--HG--
extra : rebase_source : 0333c91029b6e08961e2ad0e7c04c3364cb429b5
2017-01-05 18:38:00 -05:00
Olli Pettay 0364dbc792 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
--HG--
extra : rebase_source : 3ae1207308de120b7299b13ecaa95dd1612b3459
2017-01-03 21:47:55 +02:00
Edgar Chen 881cbd80bd Bug 1274159 - Part 2-2: Support HTMLConstructor WebIDL extended attribute for custom elements; r=bz,wchen
MozReview-Commit-ID: 6egmavfTmFT
2016-11-17 23:31:50 +08:00
Edgar Chen eaad396bb0 Bug 1274159 - Part 1: Support looking up definitions by using constructor as a key; r=wchen,jonco
MozReview-Commit-ID: Bj5fNNETT3w
2016-09-07 17:55:21 +08:00
Edgar Chen 474630d992 Bug 1318630 - Part 1: Fix missing control pref checks for custom element feature; r=wchen
MozReview-Commit-ID: F9EJMk0kVEA
2016-12-08 09:22:46 -10:00
Sebastian Hengst e9c821fcb2 Backed out changeset 33c69deecb7a (bug 1274159) for frequently failing test_custom_element_htmlconstructor.html on Android 4.3 debug. r=backout 2016-12-14 13:28:03 +01:00
Sebastian Hengst 5e1b29b9c0 Backed out changeset f2a5fc3e8c4e (bug 1274159) 2016-12-14 13:27:22 +01:00
Edgar Chen da0139302c Bug 1274159 - Part 2-2: Support HTMLConstructor WebIDL extended attribute for custom elements; r=bz,wchen
MozReview-Commit-ID: 6egmavfTmFT

--HG--
extra : rebase_source : 07436a4b8dfc1960f0cc24b67b8cc5d1e2ffd5cd
2016-11-17 23:31:50 +08:00
Edgar Chen 61b739803a Bug 1274159 - Part 1: Support looking up definitions by using constructor as a key; r=wchen,jonco
MozReview-Commit-ID: Bj5fNNETT3w

--HG--
extra : rebase_source : 07db53b5d541bbeb271f6658234c92f549a20e37
2016-09-07 17:55:21 +08:00
John Dai 48b937b61e Bug 1309140 - Rename CustomElementsRegistry to CustomElementRegistry. r=wchen, r=smaug
MozReview-Commit-ID: 3gYTaRVcV0y

--HG--
rename : dom/base/CustomElementsRegistry.cpp => dom/base/CustomElementRegistry.cpp
rename : dom/base/CustomElementsRegistry.h => dom/base/CustomElementRegistry.h
rename : dom/webidl/CustomElementsRegistry.webidl => dom/webidl/CustomElementRegistry.webidl
2016-10-12 15:26:02 +08:00