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

123 Коммитов

Автор SHA1 Сообщение Дата
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Olli Pettay 5f299f6227 Bug 1443722 - Implement customElements.upgrade(), static void TryUpgrade , r=mrbkap 2018-06-20 02:14:05 +03:00
Olli Pettay d10d7af09d Bug 1443722 - Implement customElements.upgrade() , r=mrbkap
--HG--
extra : rebase_source : b6153841b5cb38d697795564f1e864e46eb96d35
2018-06-20 02:06:33 +03:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab 7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen 8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Olli Pettay 60fc265ce2 bug 1464345, ensure all CustomElementReaction implementations traverse their member variables, r=mrbkap 2018-05-30 13:24:44 +03:00
Timothy Guan-tin Chien 9b93107cb5 Bug 1462703 - Upgrade the created element after callback runs r=smaug
nsContentUtils::NS_NewXULOrHTMLElement will call into
CustomElementRegisty::RegisterCallbackUpgradeElement, which keeps
the newly created element, allowing RunCustomElementCreationCallback
to upgrade them after the callback runs.

It is unclear if this changes the order of constructor executions,
but even so it should not affact our use case.

MozReview-Commit-ID: LWTn7B35aBv

--HG--
extra : rebase_source : 15382431f34dd887c14142ff47337e8d1eec74ef
extra : source : 47058a61951c2974514e41e316e5370cfa4f9d8b
2018-05-23 13:04:18 +08:00
Timothy Guan-tin Chien dc0ecec7d0 Bug 1462703 - Set returned CustomElementDefinition again after script runner is set r=smaug
This would help in the case where it is safe to run script in-place and
the CustomElementDefinition is available before the function exits.

This fixes the tests changed.

MozReview-Commit-ID: Ays91W94WZm

--HG--
extra : rebase_source : 6b0f1f90de9a6bfd7db577f1fb0e76564c3627e7
extra : source : 47c62a1e2f268e1be24c3fddfc006c3ad45ba4ac
2018-05-22 07:30:07 +08:00
Timothy Guan-tin Chien e84b173ee2 Bug 1462806 - Extract is value from nsXMLContentSink r=smaug
Nodes copied from DOMParser document fragment would need to be
created with the proper custom element data.

CustomElementRegistry::IsCustomElementEnabled() is changed to allow
it to run in the test document.

MozReview-Commit-ID: 4GACDR8FIc7

--HG--
extra : rebase_source : 39da41dd1ca56bf62043418c503c526e2895254f
2018-05-20 10:23:46 +08:00
Margareta Eliza Balazs 0bb5e5ba36 Merge inbound to mozilla-central. a=merge 2018-05-19 12:39:28 +03:00
Boris Zbarsky a02a40bdb5 Bug 1462737. Make AsElement() not compile when called on Element or some subclass. r=mccr8
It's just noise if we already have an Element.
2018-05-18 23:37:56 -04:00
Boris Zbarsky 395d320fce Bug 1461711 part 4. Stop unwrapping the custom element prototype when getting the lifecycle callbacsk. r=smaug
There is no reason to do that, apart from allowing Xrays to shoot themselves in the foot....
2018-05-18 16:18:19 -04:00
Boris Zbarsky 4fe32cc96b Bug 1461711 part 3. Fix potential leak of LifecycleCallbacks in CustomElementRegistry::Define. r=smaug 2018-05-18 16:18:19 -04:00
Boris Zbarsky d37ee8aa88 Bug 1461711 part 2. Remove some unnecessary Realm machinery in CustomElementRegistry::Define. r=smaug
1) The passed-in constructor is already same-compartment with the passed-in
   aCx, so there is no need to enter its Realm to work with it.

2) aCx is already in the compartment of constructorProtoUnwrapped when we do
   JS_WrapValue on rootedv, which is initialized to constructorProtoUnwrapped.
   That JS_WrapValue call is not needed.
2018-05-18 16:18:19 -04:00
Boris Zbarsky 9f24750878 Bug 1461711 part 1. Change CustomElementRegistry::Define to just take a JSContext from the caller instead of setting up an AutoJSAPI itself. r=smaug
This more closely matches what should happen with entry/incumbent globals in
the spec.
2018-05-18 16:18:19 -04:00
Boris Zbarsky 2b7be9c25a Bug 1462453. Remove the useless, and incorrect, CheckLifeCycleCallbacks function. r=smaug
This check is already done by the dictionary init method.  This function just
makes us do extra non-spec get operations.

For now this introduces more failures due to bug 1419323 and the spec issue at
<https://github.com/whatwg/html/issues/3580>.  The tests testing for that stuff
were passing due to exceptions getting thrown from CheckLifeCycleCallbacks.
2018-05-18 16:18:19 -04:00
Timothy Guan-tin Chien 08741f30ed Bug 1460962 - Support customized built-in element in XUL r=smaug
This patch enables us to specify a custom element type with |is| attribute
or property when creating a XUL element. Because non-dashed names are valid
custom element names in XUL (bug 1446247), other checks has to modified
accordingly.

The checks I am settling with are
1) Forbids the custom built-in element names to be a non-dashed name.
2) Forbids the custom built-in element to extend a dashed built-in element name.

This also ensures the custom built-in element types don't take on the same
name as the element name it extends.

MozReview-Commit-ID: GCQ9RnfvvrC

--HG--
extra : rebase_source : 2fa13742525d2107580d50872ff5b0fc42539498
extra : source : 2dc5513660d78a4de4801109140743ffc9297f71
2018-05-11 12:44:46 -07:00
Timothy Guan-tin Chien c01a7646b9 Bug 1460815 - Provide a chrome-only callback on CustomElementRegistry so script can define CE lazily r=smaug
This patch creates a chrome-only method
customElements.setElementCreationCallback() so that custom elements migrated
from XBL bindings doesn't have to be define()'d on document loading. With this
method, we will set callbacks and the platform will get back to us when it
encounters a matched custom element type -- and the callback will load the
relevant script.

It's important to note that the callback runs after construction of the first
element; it will be upgraded when it's being appended.

MozReview-Commit-ID: 80z72zwXRlf

--HG--
extra : rebase_source : 826188e56bb0b167d1e5bafb7d2a487a32bd9dfa
2018-05-11 11:23:31 -07:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Olli Pettay a7be7cff43 Bug 1460334 - Fix crash caused when attempting to migrate <deck> from a XBL binding to a Custom Element. r=peterv
--HG--
extra : amend_source : 461d41fa51087ce1cefc72df61a00e9cae5605e5
2018-05-10 14:08:00 -04:00
Olli Pettay a055a5fc0d Bug 1444285, let custom element upgrades to use backup queue inside chrome/XBL, r=mrbkap
--HG--
extra : rebase_source : 73d484bf9cae0168c4a1dc478ad8d1ccd5eed93f
2018-04-27 02:08:27 +03:00
Brian Grinstead 6cb530800d Bug 1446247 - Pass namespace into IsCustomElementName to allow for non-dashed XUL elements;r=e7358d9c+590837,smaug
This will make it possible to migrate existing bindings without also needing to
mass-rewrite frontend code at the same time.

MozReview-Commit-ID: IBBqC4eeDDX

--HG--
extra : rebase_source : e901ac665208b3a683668c1bb33a26dcf479580c
2018-03-29 09:34:56 -07:00
Olli Pettay f2340aa57f Bug 1452386 - Add a helper to get the existing nsIWeakReference from nsINode, r=emilio 2018-04-07 20:41:03 +03:00
Olli Pettay 0f16188dd5 Bug 1452074 - improve the performance related to unresolved custom elements, r=emilio 2018-04-07 12:50:01 +03:00
Andreea Pavel 9f9457503a Backed out changeset e220521c6ff6 (bug 1446247) on request a=backout r=smaug 2018-04-06 13:23:59 +03:00
Brian Grinstead 81b95b0b38 Bug 1451340 - Don't attempt to RegisterUnresolvedElement for native anonymous content;r=smaug
The webconsole UI generates a large number of scrollbars, and considering their children as
potential Custom Elements causes a slowdown when setting innerHTML="" when devtools closes.

MozReview-Commit-ID: 2QCcXCnTHA2

--HG--
extra : rebase_source : 5226e5689195a047ebcb9903b4565df13b6b1aa0
2018-04-05 12:01:18 -07:00
Brian Grinstead a5543400b1 Bug 1446247 - Pass namespace into IsCustomElementName to allow for non-dashed XUL elements;r=e7358d9c+590837,smaug
This will make it possible to migrate existing bindings without also needing to
mass-rewrite frontend code at the same time.

MozReview-Commit-ID: IBBqC4eeDDX

--HG--
extra : rebase_source : e901ac665208b3a683668c1bb33a26dcf479580c
2018-03-29 09:34:56 -07:00
Dave Townsend c70f34995e Bug 1421070: Always enable custom elements in chrome. r=smaug, rs=MattN
This allows custom elements to work in any document in the parent process that
allows XUL and XBL. The test takes the easy option of moving the existing XUL
custom element test to a run with the custom element pref disabled.

MozReview-Commit-ID: CMiLzmp60jA

--HG--
extra : rebase_source : 735688061116c633b816f4f9d488712408df11a5
extra : source : 794ee6857d83dfe0b18629c12e96a622fc899586
2017-10-20 11:02:33 -07:00
Margareta Eliza Balazs 190225b29c Backed out changeset 794ee6857d83 (bug 1421070) for 15 failures in toolkit/components/payments/test/mochitest/test_ObservedPropertiesMixin.html on a CLOSED TREE
--HG--
extra : amend_source : 0574ce1b5b6a6e8735245684eb8e9ec7b0ac2647
2018-03-23 03:42:25 +02:00
Dave Townsend 2626e1c261 Bug 1421070: Always enable custom elements in chrome. r=smaug
This allows custom elements to work in any document in the parent process that
allows XUL and XBL. The test takes the easy option of moving the existing XUL
custom element test to a run with the custom element pref disabled.

MozReview-Commit-ID: CMiLzmp60jA

--HG--
extra : rebase_source : b9632de82cf79c1df15be09fadf1d25817c8a894
extra : amend_source : 235a76453d1d6782903d5051ee8e234b965dcc36
2017-10-20 11:02:33 -07:00
Blake Kaplan b12e3317aa bug 1326028 - Upgrade elements in the right order. r=smaug
MozReview-Commit-ID: 4u5PipUqN0j

--HG--
extra : rebase_source : d51e63783c156b2ecebbaed98d530a83bcb3f6b8
2018-02-21 16:43:09 -08:00
Andreea Pavel 9b1570bb80 Backed out 3 changesets (bug 1326028) for wpt bustage in custom-elements/CustomElementRegistry.html on a CLOSED TREE
Backed out changeset 38057b774238 (bug 1326028)
Backed out changeset ab4ee52d5a81 (bug 1326028)
Backed out changeset 414efc66b026 (bug 1326028)
2018-03-07 08:07:28 +02:00
Blake Kaplan 3b005f58b3 bug 1326028 - Upgrade elements in the right order. r=smaug
MozReview-Commit-ID: 4u5PipUqN0j

--HG--
extra : rebase_source : 9aa33ff7dddc16ed153ff4673d05fd74bdef9ac6
2018-02-21 16:43:09 -08:00
Olli Pettay 2439836b37 Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Boris Zbarsky e278d7fdb7 Bug 1438326. Don't try to enqueue custom element callbacks when the custom element definition has been unlinked. r=smaug
MozReview-Commit-ID: FLf6CJcpcVQ
2018-03-01 12:32:32 -05:00
Csoregi Natalia 1fd0486e23 Backed out 7 changesets (bug 1193394) for browser-chrome failures on browser_ext_popup_background.js. CLOSED TREE
Backed out changeset 9683f24ff8ec (bug 1193394)
Backed out changeset 0e7140a7c841 (bug 1193394)
Backed out changeset a0e26f6b2784 (bug 1193394)
Backed out changeset 29e1fceaf48d (bug 1193394)
Backed out changeset b8632bbbd273 (bug 1193394)
Backed out changeset a54ef2d8f896 (bug 1193394)
Backed out changeset 55c94c05c57f (bug 1193394)
2018-03-01 16:29:02 +02:00
Olli Pettay b7726493fb Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Edgar Chen 084a83413d Bug 1430951 - Avoid element name atomizing to improve performance of LookupCustomElementDefinition; r=smaug
Since we are dealing with the element (nodeInfo->LocalName() and NameAtom() are the same value),
we could use nodeInfo->NameAtom() instead.

MozReview-Commit-ID: 4vIBDEM1Nwv

--HG--
extra : rebase_source : 150d5ea982363eb2ef4c5039fae67be1e08884ba
2018-01-17 14:55:13 +08:00
Boris Zbarsky 478687c2e8 Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor
MozReview-Commit-ID: GwVDrTLPTOb
2018-02-01 14:21:14 -05:00
Edgar Chen 4281f3eea3 Bug 1430034 - Fix attributeChangedCallback isn't fired with correct newValue when the attribute value is an empty string; r=smaug
MozReview-Commit-ID: L3RvNPNDfUC

--HG--
extra : rebase_source : dbe1d825beaec044ebb91d00a45b6feececfc46b
2018-01-15 15:24:41 +08:00
Edgar Chen fd3cbab671 Bug 1417829 - Remove unresolved pseudoclass; r=heycam,smaug
MozReview-Commit-ID: JHfYVnh1SET

--HG--
extra : rebase_source : 287a967f4f354999ab8af93eb696e81727289b12
2017-12-04 17:49:41 +08:00
Csoregi Natalia ce986a196a Backed out changeset 760107333833 (bug 1420178) for assertion failure at dom/base/CustomElementRegistry.cpp:1065 in browser-chrome on Windows. r=backout on a CLOSED TREE 2018-01-10 11:27:26 +02:00
Edgar Chen 4a910281dc Bug 1420178 - Add assertion to ensure the custom element reactions aren't scheduled to BackupQueue if they are from author code; r=smaug
MozReview-Commit-ID: BSna1j1NBSX

--HG--
extra : rebase_source : 0a76832477429c146ade2c597a2e13f83835bc2a
2017-12-05 17:56:57 +08:00
Edgar Chen 5fedbb92b8 Bug 1422197 - Add fast path to get DocGroup in binding code for [CEReactions]; r=smaug
MozReview-Commit-ID: HgbFo9ddr0o

--HG--
extra : rebase_source : 04989782fc7c7ce79e0e65b3dc907c9e174a0809
2017-11-27 16:10:27 +08:00
Edgar Chen 158a96884b Bug 1421544 - Lazy push/pop CustomElementReactionsStack entry; r=smaug
MozReview-Commit-ID: CeSNbp8uCp

--HG--
extra : rebase_source : be2941d8cad82d2a0230ee0217fba41277fa0b48
2017-11-28 16:58:50 +08:00
Edgar Chen 0c779a0480 Bug 1421170 - Move the declarations of CustomElementUpgradeReaction and CustomElementCallbackReaction to CustomElementRegistry.cpp; r=smaug
The CustomElementUpgradeReaction and CustomElementCallbackReaction are only used inside CustomElementRegistry.cpp,
so we don't need to expose them in header file.

MozReview-Commit-ID: 9lYwHeFIODi

--HG--
extra : rebase_source : 099821b680b171b0c354c34ebd91ba5963536dc1
2017-11-28 14:52:32 +08:00
Edgar Chen 3a109e4f15 Bug 1416999 - Remove the custom elements prototype and document order stored in CustomElementDefinition; r=smaug
They are used for old spec, and we don't need them after removing document.registerElement

MozReview-Commit-ID: EqzB1PJJtrg

--HG--
extra : rebase_source : 5eaa1343bc749d172eb782e063d74099f856f9da
2017-11-29 10:51:54 +08:00
Edgar Chen 9f4324f41e Bug 1416999 - Remove document.registerElement; r=smaug
MozReview-Commit-ID: HiX07Vbljhk

--HG--
rename : dom/base/test/chrome/registerElement_ep.js => dom/base/test/chrome/custom_element_ep.js
rename : dom/base/test/chrome/frame_registerElement_content.html => dom/base/test/chrome/frame_custom_element_content.html
rename : dom/base/test/chrome/test_registerElement_content.xul => dom/base/test/chrome/test_custom_element_content.xul
rename : dom/base/test/chrome/test_registerElement_ep.xul => dom/base/test/chrome/test_custom_element_ep.xul
rename : dom/base/test/test_document_register.html => dom/base/test/test_custom_element.html
rename : dom/tests/mochitest/webcomponents/test_document_register.html => dom/tests/mochitest/webcomponents/test_custom_element_define.html
rename : dom/tests/mochitest/webcomponents/test_document_register_parser.html => dom/tests/mochitest/webcomponents/test_custom_element_define_parser.html
rename : dom/tests/mochitest/webcomponents/test_template_custom_elements.html => dom/tests/mochitest/webcomponents/test_custom_element_template.html
extra : rebase_source : cd2ebf166e8bd9c49910387c9136d7b83b51598d
2017-11-16 12:23:15 +08:00