Commit Graph

16179 Commits

Author SHA1 Message Date
Steve Fink
e1fedf5974 Bug 1442722 - Move scope into JSStructuredData, r=baku,jorendorff
--HG--
extra : topic : clone.refactor
extra : rebase_source : 657bfd1a4c87de0a27c99e685adbf739c907ed6c
2018-04-03 11:17:33 -07:00
Olli Pettay
1dc582540a Bug 1463116 - Make mBindingParent strong, r=bz
--HG--
extra : rebase_source : 84aed48c0d8bd298cba0d6b6c6fa898b6c95c1ef
2018-05-22 00:11:11 +03:00
shindli
4ff26c26f4 Merge inbound to mozilla-central. a=merge 2018-05-22 00:29:52 +03:00
Nicolas B. Pierron
bdd58b3482 Bug 1461672 - Remove Telemetry probe added to tune the JSBC. r=francois,bkelly 2018-05-21 17:17:18 +00:00
Emilio Cobos Álvarez
da9f6c6d11 No bug - Remove code that does nothing. r=me
Scoped stylesheets are long gone, and this code just looks at stuff without
using it.

MozReview-Commit-ID: 9pVxND9i23v
2018-05-20 18:47:06 +02: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
6f273bf6d2 Bug 894215 part 2. Fix the document "disallow bfcaching" mechanism to work without asserting. r=smaug
There are two issues being fixed here.  First, if DisallowBFCaching is called
before CanSavePresentation, we should really return false from
CanSavePresentation.  Otherwise we'll end up doing a bunch of state-capturing
work for no reason.

Second, if DisallowBFCaching is called between CanSavePresentation and
nsDocumentViewer::Destroy, we need to actually tear down the viewer state.
What we do right now is avoid putting the viewer into the SHEntry, but still
not tear down its presshell and so forth, which leads to asserts in
~nsDocumentViewer when this case is hit.
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
Olli Pettay
ae41728c3d Bug 1404864 - ensure HTMLInputElement.form works per spec in Shadow DOM, r=peterv
--HG--
extra : rebase_source : a9a597728ec3e5f2949de6769ce4ee490993a797
2018-05-18 20:02:14 +03:00
Ciure Andrei
26287d7c31 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-19 01:09:10 +03: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
Jan de Mooij
969bbf2190 Bug 1461938 part 1 - Store JS::Realm* instead of JSCompartment* in JSContext. r=luke
--HG--
extra : rebase_source : 7af7e5854bdbe0d750a13e0e8c70a71c2c5f88c3
2018-05-17 18:02:40 +02:00
Boris Zbarsky
6cecfe655d Bug 1377980 part 4. Remove nsIDOMRange. r=mccr8 2018-05-17 12:01:38 -04:00
Boris Zbarsky
c4000f8b65 Bug 1377980 part 3. Remove nsIDOMRange use in JS. r=mccr8 2018-05-17 12:01:38 -04:00
Boris Zbarsky
2e09ba1f75 Bug 1377980 part 2. Remove most C++ use of nsIDOMRange. r=mccr8 2018-05-17 12:01:38 -04:00
Boris Zbarsky
40d2bf9d7f Bug 1377980 part 1. Remove use of nsIDOMRange in xpidl. r=mcc8 2018-05-17 12:01:37 -04:00
Peter Van der Beken
0e48ffc2b4 Bug 1457301 - Crash in mozilla::ipc::ProcessLink::SendMessage | IPC_Message_Name=PBrowser::Msg_AsyncMessage. r=mccr8.
Add back code to block big messages in DispatchAsyncMessage that wasn't added to the
codepath used by the WebIDL bindings. Also remove the non-WebIDL version of
DispatchAsyncMessage, as it's now unused.

--HG--
extra : rebase_source : ec7e5663683c98de4275ce05d6ada2f175dcb355
2018-05-16 22:29:37 +02:00
Cosmin Sabou
caba9f10be Merge mozilla-central to inbound. a=merge 2018-05-17 12:49:47 +03:00
Cosmin Sabou
0917b1478d Merge inbound to mozilla-central. a=merge 2018-05-17 12:46:31 +03: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
29f84e7bf2 Bug 1461292 part 4 - Remove unnecessary JSAutoRealm from GetPluginJSObject. r=bz 2018-05-16 21:05:29 +02:00
shindli
fdb6353ff2 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-16 21:53:27 +03:00
shindli
55f2b0d77a Merge inbound to mozilla-central. a=merge 2018-05-16 21:31:38 +03:00
Jon Coppeard
8d493df52b Bug 1444956 - Support BinAST decoding in the script loader r=baku 2018-05-16 15:58:13 +01:00
Xidorn Quan
5896b33074 Bug 1461933 - Remove ServoBindings.h from ComputedStyleInline.h. r=emilio
For doing this, ServoComputedData is split into separate files, so that
files don't need to include ServoBindings.h just for accessing style
structs from ComputedStyles.

MozReview-Commit-ID: DPAd7PUUCl9

--HG--
extra : rebase_source : 7d6f739b7fb58a46e1624ba62e717412057ea9c1
2018-05-16 15:35:59 +10:00
Margareta Eliza Balazs
d4b9e50875 Merge inbound to mozilla-central. a=merge 2018-05-16 13:00:51 +03:00
Markus Stange
633ac66e7f Bug 1461555 - Rename ProfileEntry to ProfilingStackFrame. r=njn
The term "entry" is already used for elements in the profile buffer.

MozReview-Commit-ID: 1aB22V6veQh

--HG--
extra : rebase_source : c664eb4d6bed6cb74ba8a1b67ea99bd8ca57bcf7
extra : source : 3264c0cc0027b240b55bd3aebf27263b1e1d1cc0
2018-05-15 01:14:03 -04:00
Dorel Luca
0d2ff9e60d Merge mozilla-inbound to mozilla-central. a=merge 2018-05-16 00:54:22 +03:00
Emilio Cobos Álvarez
11794a944d Bug 1461701: Remove nsUpdateType and UPDATE_CONTENT_MODEL. r=smaug
MozReview-Commit-ID: 33iBMZqnkAc
2018-05-15 18:47:16 +02:00
Emilio Cobos Álvarez
cb56e2c9f3 Bug 1459529: Remove UPDATE_STYLE. r=heycam
Now that BeginUpdate is useless for the UPDATE_STYLE case, we don't need the
update mechanism at all. Just ensure that ApplicableStylesChanged is called on
the pres shell via the relevant RuleChanged, etc. notifications.

There's a big hidden gotcha here. nsIDocument::BeginUpdate does put a script
blocker on the stack for these updates. However it's not needed, since no script
can run during these notifications (only the stylesheet events we post for
devtools, but those use AsyncEventDispatcher and PostDOMEvents, so they don't
try to run immediately).

nsIDocument::BeginUpdate also does XBL binding attached queue stuff, but we
can't change bindings during these notifications anyway, so it also doesn't
matter.

MozReview-Commit-ID: HJvK6zQfloh
2018-05-15 18:44:29 +02:00
Emilio Cobos Álvarez
29a24373d9 Bug 1459529: Remove some useless nsIDocumentObserver notifications. r=heycam
MozReview-Commit-ID: DzuiqVGKsiu
2018-05-15 18:44:28 +02:00
Emilio Cobos Álvarez
2054320f28 Bug 1459529: Make sheets be associated to a shadow root too potentially. r=bz
MozReview-Commit-ID: Cd8xJuLRY5w
2018-05-15 18:44:25 +02:00
Csoregi Natalia
00dd116638 Merge inbound to mozilla-central. a=merge 2018-05-15 12:53:24 +03:00
Olli Pettay
20c34cefa0 Bug 1461278 - Print a note to the web console when a web site is using shadow DOM (v1), preffed off by default, r=emilio 2018-05-15 02:04:32 +03:00
Narcis Beleuzu
d7f7ec03a3 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-15 00:41:06 +03:00
Narcis Beleuzu
932adad93d Merge inbound to mozilla-central. a=merge 2018-05-15 00:36:35 +03:00
Adrian Wielgosik
c501e3beb0 Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle

--HG--
extra : rebase_source : a48b7c72a0f7ede38c91149a04d5de53987736f1
2018-05-11 19:46:15 +02:00
Adrian Wielgosik
5c8a9e8239 Bug 1460940 - Remove nsIDOMDocument uses in uriloader/. r=bz
MozReview-Commit-ID: LnXwludmiAn

--HG--
extra : rebase_source : 7acfeda4eb85992d53f90a533ec2c638cefcdd0f
2018-05-11 19:46:15 +02:00
Adrian Wielgosik
af5b239997 Bug 1460940 - Remove nsIDOMDocument uses in netwerk/. r=bz
MozReview-Commit-ID: QkZ36LGoBx

--HG--
extra : rebase_source : 5aa83c576f269a6f33a1fb7ea7a61bd63a3c0c25
2018-05-11 19:46:15 +02:00
Adrian Wielgosik
8a6d4efe5d Bug 1460940 - Remove nsIDOMDocument uses in widget/. r=bz
MozReview-Commit-ID: Rxvwm6zfrB

--HG--
extra : rebase_source : 0b76b09e0a9521af10b9900e33ff6b35abc289ff
2018-05-11 19:46:15 +02:00
Adrian Wielgosik
fff55359ea Bug 1460940 - Remove nsIDOMDocument uses in image/. r=bz
MozReview-Commit-ID: HUiegmeFLo4

--HG--
extra : rebase_source : cd6453dc5d708fc5cdc75114d163ea2389423d55
2018-05-11 19:46:15 +02:00
Adrian Wielgosik
f5e05d1158 Bug 1460940 - Convert nsIDocumentEncoder to use nsIDocument. r=bz
MozReview-Commit-ID: 1Nla9DnwFiu

--HG--
extra : rebase_source : e019c8370f453c6794052e441dc76fc98d603510
2018-05-11 19:46:15 +02:00
Adrian Wielgosik
b3a78c6c93 Bug 1460940 - Convert nsSyncLoadService::LoadDocument to use nsIDocument. r=bz
MozReview-Commit-ID: LtFdEVXDvLw

--HG--
extra : rebase_source : 9fe20ccaa54525b8b10b6fbad74968a497929193
2018-05-11 19:46:15 +02:00
Adrian Wielgosik
4fca802957 Bug 1460940 - Convert NS_NewDOMDocument to use nsIDocument. r=bz
MozReview-Commit-ID: GoJ30YZGRhq

--HG--
extra : rebase_source : 0995705c2c31c1a779c22c8336482d4c7e89e319
2018-05-11 19:46:15 +02:00