Commit Graph

607044 Commits

Author SHA1 Message Date
Boris Zbarsky
c15a7558ea Bug 1479475 part 2. Remove dead code in nsGlobalWindowOuter that is inner-window-only. r=nika 2018-07-31 17:27:02 -04:00
Boris Zbarsky
c70cb82b91 Bug 1479475 part 1. Remove dead code in nsGlobalWindowInner that is outer-window-only. r=nika 2018-07-31 17:27:02 -04:00
Boris Zbarsky
e847da3a28 Bug 1479497. Use the API for getting the canvas frame instead of groveling around for it in nsGlobalWindowInner::UpdateCanvasFocus. r=heycam 2018-07-31 17:27:02 -04:00
Nicholas Nethercote
997e790c3f Bug 1477626 - Use mozilla::HashTable instead of js::HashTable in Bench.cpp. r=froydnj
MozReview-Commit-ID: 4P5L9Kdkiuu

--HG--
extra : rebase_source : 3311757797cbc7c699c39b5ee583910c1924cfb1
2018-07-26 20:16:00 +10:00
Nicholas Nethercote
6998f465ed Bug 1477626 - Use mozilla::HashTable instead of JS::HashTable in DMD. r=erahm
Also use mozilla::HashNumber where appropriate.

MozReview-Commit-ID: BTq0XDS5UfQ

--HG--
extra : rebase_source : 28f45a9b27e831e99620a2b575f373003f1301f2
2018-07-26 20:15:58 +10:00
Nicholas Nethercote
234016c13e Bug 1477626 - Document some differences between mozilla::HashTable and PLDHashTable. r=Waldo
MozReview-Commit-ID: DB0KUy99DDM

--HG--
extra : rebase_source : 4d14c47c48cb821f6c69654c1c5d90c48f217e48
2018-07-26 20:15:55 +10:00
Jonathan Watt
f3ea3c7d86 Bug 1428676 pt 3. Change our existing consumers of 'menulist-button' to use '-moz-menulist-button'. r=emilio 2018-06-20 13:50:23 +01:00
Jonathan Watt
6af7c052b1 Bug 1428676 pt 2. Test content can't use '-moz-appearance: -moz-menulist-button'. r=emilio 2018-06-20 13:50:23 +01:00
Jonathan Watt
11e49726b5 Bug 1428676 pt 1. Add a '-moz-menulist-button' value to '-moz-appearance'. r=emilio
The '-moz-menulist-button' value currently behavies identically to the
'menulist-button' value.  This is not implemented as an alias because later
patches in this patch series will change the behavior of our pre-existing
'menulist-button' value to more closely match what Chrome does.
2018-06-19 20:12:45 +01:00
Andrea Marchesini
059ca97fce Bug 1278831 - DOMEventTargetHelper must release itself when disconnected from the owner and when kept alive by some event listener, r=smaug 2018-08-01 00:19:15 +02:00
Andrea Marchesini
49cbe794ae Bug 1278831 - PermissionStatus must keep itself alive when it has a event listener, r=smaug 2018-08-01 00:19:12 +02:00
Bogdan Tara
eb256a84b2 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-08-01 01:07:12 +03:00
Bogdan Tara
9c44097a0d Merge inbound to mozilla-central. a=merge 2018-08-01 00:58:55 +03:00
Nika Layzell
b78acae439 Bug 1479586 - Fix racy test in browser_async_remove_tab.js, r=kmag
Reviewers: kmag!

Tags: #secure-revision

Bug #: 1479586

Differential Revision: https://phabricator.services.mozilla.com/D2525
2018-07-31 17:53:04 -04:00
Nika Layzell
7fa88ded1b Bug 1474369 - Part 8: Rename from Sequence to Array in xpidl, r=mccr8
Summary:
This more closely matches the C++ names, and reflects the fact that the
reflected type is not WebIDL's mozilla::dom::Sequence. The reasoning behind this
type difference is for ergonomics, due to xpidl only being exposed to internal
JS code.

Depends On D2335

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2337
2018-07-31 17:53:03 -04:00
Nika Layzell
cb71d3b003 Bug 1474369 - Part 7: Rename [array] to LegacyArray within xpt and xpidl, r=mccr8
Summary:
This is done so we can use Array as the name for the new nsTArray-based
type, rather than having to come up with a new name.

LegacyArray was chosen as the [array] attribute is now effectively deprecated,
and we'd like to remove it ASAP.

Depends On D2334

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2335
2018-07-31 17:53:03 -04:00
Nika Layzell
f900f5239d Bug 1474369 - Part 6: Use RefPtr for Array<T> of interface and WebIDL types, r=mccr8
Summary:
This means that using these types involves many fewer footguns, while not
requiring any changes to the actual XPConnect implementation!

Depends on D2111

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2334
2018-07-31 17:53:03 -04:00
Nika Layzell
5b6ca0e475 Bug 1475409 - Part 3: Make the different categories of types in xptinfo more explicit, r=mccr8
Summary:
This should make it more clear which types have which behaviours, and should
make it easier to add new types without forgetting to handle a special case
somewhere.

Depends On D2114

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2115
2018-07-31 17:53:02 -04:00
Nika Layzell
985488cb0f Bug 1475409 - Part 2: Be more explicit about the type of nsXPTType::Tag(), r=mccr8
This will get us both more clarity as to what types are, but also will improve switch exhaustiveness checks.

Summary: Depends On D2113

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2114
2018-07-31 17:53:02 -04:00
Nika Layzell
2cb67382dc Bug 1475409 - Part 1: Remove nsXPTType::TagPart(), r=mccr8
Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1475409

Differential Revision: https://phabricator.services.mozilla.com/D2113
2018-07-31 17:53:02 -04:00
Nika Layzell
cd11b005fc Bug 1474369 - Part 5: Add tests for new Sequence<T> types, r=mccr8
Summary: Depends On D2110

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2111
2018-07-31 17:53:01 -04:00
Nika Layzell
d4c9b9edf4 Bug 1474369 - Part 4: Add support for Sequence<T> types to xpidl and XPConnect, r=mccr8
Summary:
This patch adds support for the `Sequence<T>` type. This is largely a
straightforward type propagation patch, but there are a few notable things:

 1. We allow `[iid_is(x)] Sequence<nsQIResult>`, so Sequence can be Dependent.

 2. `Sequence<T>` is reflected into C++ as a `nsTArray<T>`, which is different
    than WebIDL's `mozilla::dom::Sequence<T>` type. This decision was made for
    general ergonomics reasons, as `nsTArray<T>` is more prevailent throughout
    the codebase, and lengths in this case cannot be controlled by content, as
    XPConnect is only exposed to Chrome JS.

 3. Owned pointers in `Sequence<T>` are not reflected as their owned
    counterparts. For example, `Sequence<nsISupports>` is reflected as
    `nsTArray<nsISupports*>` rather than `nsTArray<RefPtr<nsISupports>>`. This
    was done to avoid depending on `RefPtr<T>` and `T*` having the same
    in-memory representation, however if that is considered an acceptable
    dependency, it would be nice to support that.

 4. We also don't reflect singly-owned pointers as their owned counterparts. For
    example, `nsTArray<nsIIDPtr>` would be reflected as `nsTArray<nsIID*>`
    rather than `nsTArray<mozilla::UniquePtr<nsIID>>`. If we are willing to
    depend on `mozilla::UniquePtr<T>`'s in-memory representation, we could also
    do this, however.

 5. There are no restrictions on what types can appear inside of a `Sequence<T>`
    or what can appear inside an `[array] T`. We may want to add restrictions
    either at the xpidl level or in XPConnect.

Depends On D2109

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2110
2018-07-31 17:53:01 -04:00
Nika Layzell
4d1911e395 Bug 1474369 - Part 3: Add generic type parsing support to xpidl, r=mccr8
Summary:
This patch allows parsing generic types, such as Sequence<T>, in XPIDL. It does
this by introducing a new type, TypeId, which contains both the name string and
an optional list of generic parameters.

Various places which use the xpidl.py library had to be updated to construct one
of these TypeId objects, as TypeId and `str` are not compatible types.

Depends On D2106

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2109
2018-07-31 17:53:00 -04:00
Nika Layzell
71fd37e0c9 Bug 1474369 - Part 2: Make JSArray2Native and NativeArray2JS more generic, so they can be used with Sequence<T>, r=mccr8
Summary:
The background logic for handling lists of XPConnect values is similar between
`[array] T` and `Sequence<T>`. The major differences are with regard to how
native length is determined, how 'null' and 'undefined' are handled, and how
native buffer allocation is handled.

This patch modifies the JSArray2Native function to make it generic over an
allocation strategy function, which can be implemented for each of `[array] T`
and `Sequence<T>`. The function takes in a `uint32_t*` pointer, pointing at the
computed length of the JS array. The callback can then allocate the correct
backing buffer, and optionally modify the length to copy.

The NativeArray2JS function is also modified to make it directly take a pointer
to the native buffer rather than determining it from a pointer to an `[array] T`
parameter.

Depends On D2105

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2106
2018-07-31 17:53:00 -04:00
Nika Layzell
5ee2c61291 Bug 1474369 - Part 1: Clean up value initialization codepaths in XPConnect, r=mccr8
Summary:
A goal of the Sequence<T> work is to allow using more complex types within lists
in XPConnect. For example, we ideally want to support `Sequence<AString>`,
rather than requiring people to use the unergonomic 'wstring' type.

These types require initialization before they can be read into. Currently this
initialization for parameters is directly handled by XPCWrappedNative's
CallMethodHelper object.

This patch introduces a new function to the `xpc` namespace to initialize a
specific value from an uninitialized state to a safe state.

Reviewers: mccr8!

Tags: #secure-revision

Bug #: 1474369

Differential Revision: https://phabricator.services.mozilla.com/D2105
2018-07-31 17:53:00 -04:00
Nika Layzell
24cf25ae22 Bug 1461450 - Part 2: Add tests for AutoTArray move constructors, r=erahm 2018-07-31 17:52:59 -04:00
Nika Layzell
da14f0e1df Bug 1461450 - Part 1: Add move constructors and assignment operators to nsTArray, r=froydnj 2018-07-31 17:52:59 -04:00
Nika Layzell
95fd91c8e3 Bug 1471726 - Part 2: Add basic tests for jsval array codegen, r=mccr8 2018-07-31 17:52:59 -04:00
Nika Layzell
345a0af828 Bug 1471726 - Part 1: Correct codegen for XPIDL arrays of JSVals, r=mccr8 2018-07-31 17:52:58 -04:00
Brindusan Cristian
f4c55c8456 Backed out 4 changesets (bug 1479486, bug 1479497, bug 1479475) for build bustages on builds/worker/workspace/build/src/dom/base/nsGlobalWindowInner.cpp:932:53. CLOSED TREE
Backed out changeset b75e262fac02 (bug 1479486)
Backed out changeset 45692ba0fddd (bug 1479475)
Backed out changeset 524fb20de6a2 (bug 1479475)
Backed out changeset 4663bd19da9b (bug 1479497)
2018-08-01 00:49:43 +03:00
Boris Zbarsky
261165b8f7 Bug 1479486. Remove some unused chromeonly history APIs on Window. r=mccr8
Well, back() is used, but only in tests, and those can use history.back().
2018-07-31 17:27:03 -04:00
Boris Zbarsky
372d4b0f69 Bug 1479475 part 2. Remove dead code in nsGlobalWindowOuter that is inner-window-only. r=nika 2018-07-31 17:27:02 -04:00
Boris Zbarsky
e3ef65a87f Bug 1479475 part 1. Remove dead code in nsGlobalWindowInner that is outer-window-only. r=nika 2018-07-31 17:27:02 -04:00
Boris Zbarsky
402a9b83f0 Bug 1479497. Use the API for getting the canvas frame instead of groveling around for it in nsGlobalWindowInner::UpdateCanvasFocus. r=heycam 2018-07-31 17:27:02 -04:00
Robert Longson
3116ab5e06 Bug 1479272 - remove svg.marker-improvements.enabled pref r=heycam 2018-07-31 21:45:29 +01:00
Brindusan Cristian
888682e5d5 Backed out changeset e9cec41e7772 (bug 1458819) for linting failure on /testing/mozharness/configs/builds/branch_specifics.py:104:5. CLOSED TREE 2018-07-31 22:44:08 +03:00
Felipe Gomes
c09addaf9a Bug 1479251 - registeredURLs may not have been set up yet when the first process launches. r=mossop
MozReview-Commit-ID: A9kC8yJavrg

--HG--
extra : rebase_source : 388b0587010ca2547f6157580c29e1b89fbc40bc
2018-07-31 10:30:38 -03:00
Andrew Swan
ad31645d25 Bug 1451513 Part 3: Make loading the mochitest extension more robust r=kmag
A couple of changes to ensure that the mochitest harness doesn't try to
start executing changes before the mochitest extension is loaded:
1. Fix the marionette driver to wait for an installed extension to
   be started before returning from Addon:install
2. Wait for extension API onStartup() handlers to finish before
   considering a webextension started.

MozReview-Commit-ID: 8YEdNn6s5qh

--HG--
extra : rebase_source : 67e9abadcda82d55ac73c33367ec65cdbf7b823d
2018-07-30 17:03:27 -07:00
Brad Werth
774ae7e6d8 Bug 1479627 Part 1: Set overflow:hidden for webconsole message-body style, to avoid a slow path in restyling. r=nchevobbe
MozReview-Commit-ID: ImKq594IB7P

--HG--
extra : rebase_source : ae8f6aa599d7c4e34be0dbe2c262edf7e820b030
2018-07-30 16:41:47 -07:00
Bogdan Tara
642f18b262 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-31 21:32:12 +03:00
Bogdan Tara
b95ba78360 Merge inbound to mozilla-central. a=merge 2018-07-31 21:30:12 +03:00
Bogdan Tara
fb57ee9280 Backed out changeset 7e49d55f0240 (bug 1446956) for browser_ext_omnibox.js failures CLOSED TREE 2018-07-31 21:07:33 +03:00
Bogdan Tara
8ccee52ef3 Backed out changeset cc67a75b9160 (bug 1446956) for browser_ext_omnibox.js failures CLOSED TREE 2018-07-31 21:03:08 +03:00
Gijs Kruitbosch
dcbec7c8b6 Bug 1478404 - remove _xpcom_categories annotations as they're dead code, r=florian
Support for the _xpcom_categories property was removed in Bug 568691,
but we left a bunch of consumers behind, and it's been cargo-culted a bit more.
We should remove the remaining remnants.

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

--HG--
extra : moz-landing-system : lando
2018-07-31 17:39:25 +00:00
Narcis Beleuzu
d948e64c34 Backed out changeset 0a485a8db67c (bug 1472921) for debug-mochitest-chrome failures on test_perf-settings-interval.html 2018-07-31 19:52:32 +03:00
Emilio Cobos Álvarez
3deb38c4a8 Bug 1474142: Don't skip calling _onDragEnd even if the from and to target is the customizable area. r=Gijs
We may not really receive a dragend event if we're fast enough.

Calling _onDragEnd multiple times is fine (it should be idempotent).

This particular exception was added in bug 978084 along with all the _onDragEnd
calls, but I don't think it's sound over-all.

I don't really want to dig into the XUL button code to see why drag end was
consistently firing there, unless you think it's really really needed :)

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

--HG--
extra : moz-landing-system : lando
2018-07-31 15:38:34 +00:00
Nicolas Chevobbe
d4fdced45f Bug 1457478 - Do not call Services.console.logStringMessage in clearMessagesCache; r=bgrins.
This was causing an empty message to appear in the
browser console when clicking the clear button.
This specific call was introduced 5 years ago without
much explanation, and since the error console is now
gone, I think it's safe to remove the call.

A test is added to make sure we do not print any extra
messages when clearing the browser console.

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

--HG--
extra : moz-landing-system : lando
2018-07-31 14:16:42 +00:00
Devika Sugathan
ae8a6c6dcc Bug 1472121 - Remove unused patches from build/build-clang/. r=marco 2018-07-31 00:35:36 +05:30
Emilio Cobos Álvarez
27250792bc Bug 1479240: Make system metric queries always return false instead of not matching for fingerprinting-resistance. r=heycam
Looks like these used this mechanism for no great reason, and actually doing
this exposes trivially whether fingerprinting-resistance is enabled, which looks
like an anti-goal (if a media query parses correctly, and doesn't match either 1
or 0, then fingerprinting-resistance is enabled).

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

MozReview-Commit-ID: 76tIIkwlpeP
2018-07-31 12:55:59 +02:00
Jan Varga
27932e0385 Bug 1478573; r=asuth 2018-07-31 12:27:17 +02:00