Commit Graph

797 Commits

Author SHA1 Message Date
Mark Banner
8c00ef3f30 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-11 13:15:08 +00:00
Ciure Andrei
ed617be144 Backed out 2 changesets (bug 1512052)for causing build bustages CLOSED TREE
Backed out changeset 4773a3f46c22 (bug 1512052)
Backed out changeset 2f48c5afbe57 (bug 1512052)

--HG--
rename : browser/components/attribution/test/xpcshell/.eslintrc.js => browser/components/attribution/test/.eslintrc.js
2018-12-05 05:47:39 +02:00
Mark Banner
8256078237 Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop
Depends on D13745

Differential Revision: https://phabricator.services.mozilla.com/D13746

--HG--
extra : moz-landing-system : lando
2018-12-04 22:27:35 +00:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Mats Palmgren
0196497399 Bug 1510674 - Remove a few unnecessary #include "nsCSSFrameConstructor.h". r=emilio
There are no uses of any frame-ctor things in these files AFAICT.
2018-11-29 00:17:25 +01:00
Ehsan Akhgari
2febd96e7e Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13073

--HG--
extra : moz-landing-system : lando
2018-11-28 00:54:56 +00:00
Cosmin Sabou
0afa5aa670 Backed out 2 changesets (bug 1508472) for causing build bustages on JobScheduler_posix.cpp. CLOSED TREE
Backed out changeset af951294cf96 (bug 1508472)
Backed out changeset 2320933cb7bc (bug 1508472)
2018-11-28 00:08:11 +02:00
Ehsan Akhgari
7c937c2747 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13073

--HG--
extra : moz-landing-system : lando
2018-11-27 21:36:18 +00:00
Andreea Pavel
945463d394 Backed out changeset 11d6688b953f (bug 1508472) for build bustages on a CLOSED TREE 2018-11-27 18:28:30 +02:00
Ehsan Akhgari
d0a3a76106 Bug 1508472 - Part 2: Second batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13073

--HG--
extra : moz-landing-system : lando
2018-11-27 15:18:32 +00:00
Peter Van der Beken
06b131e7c9 Bug 1507604 - Remove nsPIDOMWindowInner::GetPrivateRoot. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D12140

--HG--
extra : moz-landing-system : lando
2018-11-23 15:39:54 +00:00
Kris Maglione
6fb571f4fb Bug 1356412: Part 2 - Remove script loader path mangling from DOM code. r=bz
As in part 1, this no longer serves any purpose.

This patch also removes the otherwise unused WrappersEnabled() method, which
was similarly only useful before we had compartment-based security isolation.
Its functionality is now handled by compartment flags.

Differential Revision: https://phabricator.services.mozilla.com/D10796

--HG--
extra : rebase_source : e4c85eda6cdf430844dea828e2eee3a083f2616d
2018-11-02 16:15:26 -07:00
Timothy Guan-tin Chien
24ccc48fbc Bug 1426492 - Add an assertion to limit XBL bindings in the content process r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D8907

--HG--
extra : moz-landing-system : lando
2018-11-03 11:11:31 +00:00
Gabriele Svelto
266ef73c96 Bug 1503207 - Remove nsWeakPtr.h and cleanup all files including weak reference-related headers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10251

--HG--
extra : moz-landing-system : lando
2018-10-31 20:39:03 +00:00
Emilio Cobos Álvarez
a5c0df3224 Bug 1502875 - Remove AddElementToDocumentPre and RemoveSubtreeFromDocument. r=smaug
The ID table is managed in BindToTree / UnbindFromTree.

I guess this was more important when XUL templates were a thing.

Differential Revision: https://phabricator.services.mozilla.com/D10056
2018-10-29 22:43:29 +01:00
Adrian Wielgosik
e6326985f3 Bug 1480245, part 1 - Remove compatibility methods from nsXPTInterfaceInfo. r=nika
I left GetMethodInfo, GetConstant as they are still useful as separate methods.

Differential Revision: https://phabricator.services.mozilla.com/D9638

--HG--
extra : moz-landing-system : lando
2018-10-25 09:56:26 +00:00
Dave Townsend
4130c8e2c5 Bug 1419091: Delete platformHTMLBindings.xml. r=masayuki
Removes the now unused platformHTMLBindings.xml.

Differential Revision: https://phabricator.services.mozilla.com/D8932

--HG--
extra : rebase_source : a61de540b9b179af37ceefc59cbb60f08c8ef184
extra : intermediate-source : 15811bce212a0bbe0603ff31f3f95934050afe95
extra : source : 09a985b890cd7be3c5c63d6e59df77e3ac05aa54
2018-10-08 11:10:25 -07:00
Dave Townsend
670b098c38 Bug 1419091: Make TextInputListener handle non-native events for input and textarea too. r=masayuki
platformHTMLBindings attaches event handlers directly to the <input> and
<textarea> elements. This matches that by making TextInputListener look up and
call the <input> and <textarea> event handlers from the static C array.
There is a slight difference in that the event handlers are added to the system
bubbling phase as opposed to the regular bubbling phase but in tests this does
not seem to cause problems.

Differential Revision: https://phabricator.services.mozilla.com/D8931

--HG--
extra : rebase_source : ced468c778aea2f616c2fc544c7c908f969f268c
extra : intermediate-source : 2224ee809328bf70ded5648d0a2896d507def220
extra : source : 0e16c555c00a0321e96c9b62e3df9508dd4ba06a
2018-10-15 12:19:30 -07:00
Dave Townsend
c8c2fa1025 Bug 1419091: Switch to a compiled C++ table for html key bindings for browser and editor. r=masayuki
Rather than loading an XBL binding for <browser> and <editor> elements this
generates the handlers from static C arrays.

Differential Revision: https://phabricator.services.mozilla.com/D6181

--HG--
extra : rebase_source : 690dee71ad81fad157052f342451047f10ef3811
extra : intermediate-source : ac56492b6ed6f03cd61389db83a73e0fdf970089
extra : source : a33e19d9f6d584e51153205efc7b5693119818cc
2018-10-08 11:09:31 -07:00
Dave Townsend
6ea60e6b82 Bug 1419091: Define keybindings in a static C++ table. r=masayuki
Copies the keybindings from platformHTMLBindings.xml into an array of C structs
that can be easily used to instantiate an nsXBLPrototypeHandler (done in later
patches).

These were mechanically generated.

Differential Revision: https://phabricator.services.mozilla.com/D8930

--HG--
extra : rebase_source : 01b31333c7b59120976e4aa1481047abe8292e52
extra : source : 72ccc94449163738199ec04886f2f5513bce5122
2018-10-08 11:08:52 -07:00
Daniel Varga
b8e466e4e8 Backed out 5 changesets (bug 1419091) for reftest failure at tests/layout/reftests/bugs/1377447-1.html.
Backed out changeset 15811bce212a (bug 1419091)
Backed out changeset 2224ee809328 (bug 1419091)
Backed out changeset ac56492b6ed6 (bug 1419091)
Backed out changeset 72ccc9444916 (bug 1419091)
Backed out changeset 58d5a882493d (bug 1419091)

--HG--
extra : rebase_source : d0bb1df6e29618f515a5c1860db41ff1e3f4c6a3
2018-10-23 01:08:26 +03:00
Dave Townsend
dec52dda0a Bug 1419091: Delete platformHTMLBindings.xml. r=masayuki
Removes the now unused platformHTMLBindings.xml.

Differential Revision: https://phabricator.services.mozilla.com/D8932

--HG--
extra : rebase_source : 302ea62c1d8eeb120715c64e9d041e43cfd180fb
extra : intermediate-source : 330598d8c8d934de9fedc0e4342d09f58a7f60dc
extra : source : 09a985b890cd7be3c5c63d6e59df77e3ac05aa54
2018-10-08 11:10:25 -07:00
Dave Townsend
1d9152ef0d Bug 1419091: Make TextInputListener handle non-native events for input and textarea too. r=masayuki
platformHTMLBindings attaches event handlers directly to the <input> and
<textarea> elements. This matches that by making TextInputListener look up and
call the <input> and <textarea> event handlers from the static C array.
There is a slight difference in that the event handlers are added to the system
bubbling phase as opposed to the regular bubbling phase but in tests this does
not seem to cause problems.

Differential Revision: https://phabricator.services.mozilla.com/D8931

--HG--
extra : rebase_source : cd3cff63cb6a1da1d9130a04bd7ebe9cd7b62b4e
extra : source : 0e16c555c00a0321e96c9b62e3df9508dd4ba06a
2018-10-15 12:19:30 -07:00
Dave Townsend
3a9499b378 Bug 1419091: Switch to a compiled C++ table for html key bindings for browser and editor. r=masayuki
Rather than loading an XBL binding for <browser> and <editor> elements this
generates the handlers from static C arrays.

Differential Revision: https://phabricator.services.mozilla.com/D6181

--HG--
extra : rebase_source : 2467fb1c8c1f02ab52a96f44f94d8ee9d6ed33d3
extra : source : a33e19d9f6d584e51153205efc7b5693119818cc
2018-10-08 11:09:31 -07:00
Dave Townsend
1c20dd1942 Bug 1419091: Define keybindings in a static C++ table. r=masayuki
Copies the keybindings from platformHTMLBindings.xml into an array of C structs
that can be easily used to instantiate an nsXBLPrototypeHandler (done in later
patches).

These were mechanically generated.

Differential Revision: https://phabricator.services.mozilla.com/D8930

--HG--
extra : rebase_source : 51b167b1d4a471e8926b34935c895093b02b29a0
2018-10-08 11:08:52 -07:00
Nicholas Nethercote
36c48819d1 Bug 1451169 - Use nsStaticAtom* instead of nsStaticAtom** in Element.h. r=baku
--HG--
extra : rebase_source : db09f7ab93a1c41ace03a645623f78a27ecfff8c
2018-04-03 13:21:06 +10:00
Andrew McCreight
837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D6861

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Jan Varga
74ebd2ba1e Bug 1492737 - Part 1: Support passing name length to JS_GetOwnUCPropertyDescriptor and add JS_GetUCPropertyDescriptor; r=Waldo 2018-09-25 11:53:39 +02:00
Nathan Froyd
846d8789ee Bug 1492894 - part 1 - make the node hierarchy consistently constructed with NodeInfo&&; r=mccr8
Various places in dom/ use the pattern:

  already_AddRefed<NodeInfo> ni = ...;

which is supposed to be disallowed by our static analysis code, but
isn't, for whatever reason.  To fix our static analysis code, we need to
eliminate instances of the above pattern.

Unfortunately, eliminating this pattern requires restructuring how Nodes
are created.  Most Node subclasses take `already_AddRefed<NodeInfo>&` in
their constructors, and a few accept `already_AddRefed<NodeInfo>&&`.  We
need to enforce the latter pattern consistently, which requires changing
dozens of source files.
2018-09-21 16:45:49 -04:00
Brian Grinstead
a4630f7000 Bug 1487568 - Ignore whitespace only text nodes for XBL compatibility hack for unmatched children dropping content;r=smaug
For browser.xhtml, we have extra whitespace text nodes that appear inside of
mBoundElement, which was causing XBL content to be incorrectly dropped.

Differential Revision: https://phabricator.services.mozilla.com/D5546

--HG--
extra : moz-landing-system : lando
2018-09-13 18:53:41 +00:00
Daniel Varga
55257c5b6a Backed out changeset 9139afaa8d77 (bug 1487568) for crashtest failure at tests/reftest/tests/layout/generic/crashtests/382745-1.xhtml on a CLOSED TREE
--HG--
extra : amend_source : e49c7ec6b1b05baab713fc4a0665b47628849d8a
2018-09-12 22:25:00 +03:00
Brian Grinstead
d6983041d7 Bug 1487568 - Ignore whitespace only text nodes for XBL compatibility hack for unmatched children dropping content;r=smaug
For browser.xhtml, we have extra whitespace text nodes that appear inside of
mBoundElement, which was causing XBL content to be incorrectly dropped.

Differential Revision: https://phabricator.services.mozilla.com/D5546

--HG--
extra : moz-landing-system : lando
2018-09-12 14:55:06 +00:00
Cameron McCormack
796d3191af Bug 1477079 - Skip XBL style building if document's pres shell went away. r=emilio 2018-09-12 10:44:46 +10:00
Jan de Mooij
cbb67627a3 Bug 722345 part 3 - Remove request API. r=luke
Differential Revision: https://phabricator.services.mozilla.com/D4424

--HG--
extra : rebase_source : 1842588c00dbc8fb4294ce5436cdb787190909b4
2018-08-28 09:53:30 +02:00
Nicholas Nethercote
2fcd08a173 Bug 1486690 - Rename NS_str{,}dup and remove unnecessary checks after calls to them. r=glandium
The 'x' prefix makes it clearer that these are infallible.

A couple of nsJSID methods are now also infallible.

--HG--
extra : rebase_source : fcce44a00212d6d341afbf3827b31bd4f7355ad5
2018-08-28 15:58:54 +10:00
Emilio Cobos Álvarez
d8e5673d67 Bug 1486732 - Remove useless nsXBLBinding::mIsShadowRootBinding. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D4434
2018-08-28 16:02:37 +02:00
Marco Castelluccio
aac81fa3f1 Bug 1486528 - Remove some unnecessary nsIMemory imports. r=njn
--HG--
extra : rebase_source : 5abdbcd1efa23cb05cb1f1dc995c3d532d240de9
2018-08-27 16:38:18 +02:00
svoisen
d9fce4a9d0 Bug 1466722 - Remove remaining references to nsCSSRuleProcessor since it has been removed. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D3928

--HG--
extra : moz-landing-system : lando
2018-08-22 01:29:39 +00:00
Adrian Wielgosik
be0c1a4f55 Bug 1481645 - Remove some redundant uses of do_QueryInterface. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2893

--HG--
extra : moz-landing-system : lando
2018-08-13 09:05:19 +00:00
Emilio Cobos Álvarez
727fe6d4b7 Bug 1482694 - Don't clear the insertion point from ClearInsertedChildren if we're not the insertion point the node is assigned to. r=smaug
What's going on is that nested XBL insertion points are completely unsound, and
we leave all sorts of kids in mInsertedChildren when bindings dynamically
change.

So if bindings change in a particular way so that the innermost insertion point
is cleared, but the outermost bindings aren't, like this, we end up with an
inconsistent flattened tree.

This prevents the inconsistent flattened tree in this case, though what ought
to happen in the SetXBLInsertionPoint(nullptr) case is setting the insertion
point to the outer insertion point.

But we don't keep track of all our insertion points, and I don't think it's
worth to fix that given XBL is going away unless it gives us more problems. See
also bug 1425362 & co.

Differential Revision: https://phabricator.services.mozilla.com/D3163

--HG--
extra : moz-landing-system : lando
2018-08-12 18:17:48 +00:00
Emilio Cobos Álvarez
1fbd784d00 Bug 1481601 - Remove now-useless aPreallocateChildren from nsINode::Clone() and friends. r=bzbarsky
Since sed on multiple lines ended up being such a pain and I didn't end up
writing a script for this because I didn't think it'd end up being so boring, I
may have made a couple cleanups here and there as well...

Differential Revision: https://phabricator.services.mozilla.com/D2887

--HG--
extra : moz-landing-system : lando
2018-08-08 23:58:44 +00:00
Jan de Mooij
d2d99e4725 Bug 1480678 part 2 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in dom/xbl. r=mrbkap 2018-08-04 15:30:39 +02:00
Boris Zbarsky
f771d7e529 Bug 1477923. Make WebIDL callbacks store a global in addition to the object that's used as a callback. r=mccr8
We want to be able to enter the Realm we were in when the callback was created
before calling it, but if the callback stores a cross-compartment wrapper we
don't really have a good way to find that Realm.  So we store it explicitly by
storing a global when the callback is created.

The changes to the constructor signatures to use JSObject* instead of
JS::Handle<JSObject*> are so we can avoid having to root the global for these
calls.  These changes make two of the constructors ambiguous when nullptr is
being passed for the first arg; this patch adds casts to disambiguate.
2018-08-03 17:11:39 -04:00
Emilio Cobos Álvarez
8f34c12e14 Bug 1479860: Remove unused aCompileEventHandlers argument from BindToTree. r=bz
Mostly automatic via sed. Only parts which I touched manually (apart from a
couple ones where I fixed indentation or which had mispelled arguments) are the
callers. I may have removed a couple redundant `virtual` keywords as well when
I started to do it manually, I can revert those if wanted.

Most of them are just removing the argument, but in Element.cpp I also added an
assertion for GetBindingParent when binding the ShadowRoot's kids (the binding
parent is set from the ShadowRoot constructor, and I don't think we bind a
shadow tree during unlink or what not which could cause a behavior difference).

Differential Revision: https://phabricator.services.mozilla.com/D2574

MozReview-Commit-ID: 2oIgatty2HU
2018-08-01 10:42:54 +02:00
Jan de Mooij
9b9ef5d8db Bug 1479363 part 3 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in dom/xbl and dom/xul. r=bholley 2018-07-31 08:37:07 +02:00
Jan de Mooij
80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Jan de Mooij
2264882701 Bug 1477989 part 4 - Use JS::GetNonCCWObjectGlobal in xpc::GetXBLScopeOrGlobal. r=bz
GetOrCreateMapEntryForPrototype is the only caller where the object could be a CCW. However there cx and proto are same-compartment (GetOrCreateMapEntryForPrototype asserts this) so I changed that code to use JS::CurrentGlobalOrNull.
2018-07-26 10:53:21 +02:00
Jan de Mooij
3bfc3b953e Bug 1477989 part 3 - Use JS::GetNonCCWObjectGlobal in nsXBLProtoImpl::InstallImplementation. r=bz
It should not be a CCW; we already use JS::GetNonCCWObjectGlobal on this object in nsXBLProtoImplField::InstallAccessors.
2018-07-26 10:53:00 +02:00
Jan de Mooij
99c47ba5c5 Bug 1477989 part 2 - Use JS::GetNonCCWObjectGlobal in nsXBLBinding::DoInitJSClass. r=bz 2018-07-26 10:52:41 +02:00
Jan de Mooij
b1f2f847f1 Bug 1477989 part 1 - Use JS::GetNonCCWObjectGlobal in nsXBLBinding::LookupMember. r=bz
mBoundElement is a dom::Element* and reflectors are not CCWs.
2018-07-26 10:52:27 +02:00