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

3277 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke 15d3d060cf Bug 1184468 - Use nsTHashtable::Keys where possible in netwerk. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106950
2021-03-24 17:51:12 +00:00
Simon Giesecke 5b5b39393f Bug 1184468 - Add To(T)Array functions that materialize a range into an array. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109056
2021-03-24 17:51:11 +00:00
Csoregi Natalia f54ee076ae Backed out 13 changesets (bug 708901, bug 1184468) for causing build bustage on GeckoViewHistory.cpp. CLOSED TREE
Backed out changeset b1e4c01e63b8 (bug 708901)
Backed out changeset 37b52cce83c0 (bug 708901)
Backed out changeset eee75f33f060 (bug 708901)
Backed out changeset 479bf64c7986 (bug 708901)
Backed out changeset 15a8fb94d15d (bug 708901)
Backed out changeset be31ccd9a61d (bug 708901)
Backed out changeset fc54f4eaedd5 (bug 708901)
Backed out changeset 03c3a56c3d13 (bug 708901)
Backed out changeset 73f11d3c1298 (bug 708901)
Backed out changeset aed22fd80893 (bug 708901)
Backed out changeset 74d8249fbe7e (bug 708901)
Backed out changeset acb725eb3c1d (bug 1184468)
Backed out changeset 70f3ea6efec4 (bug 1184468)
2021-03-24 19:26:20 +02:00
Simon Giesecke 8aaa3daac8 Bug 1184468 - Use nsTHashtable::Keys where possible in netwerk. r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D106950
2021-03-24 16:58:57 +00:00
Simon Giesecke 5a92e6d185 Bug 1184468 - Add To(T)Array functions that materialize a range into an array. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D109056
2021-03-24 16:58:56 +00:00
Emilio Cobos Álvarez 8b97179d90 Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

We have to add width: 100% to the UA sheet because we don't get it
automatically set to the scrollport size to by the scrollport anymore.
Otherwise this would regress vertical writing-modes.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-24 11:21:14 +00:00
Gerald Squelart 2400d86309 Bug 1700498 - nsTSetInserter::operator* returns a proxy - r=sg
Previously `operator*` returned the iterator, and the templated `operator=` would handle the value insertion.
However that `operator=` prevented a defaulted copy-assignment operator, which is used in some algorithms to overwrite the iterator itself.
So now `operator*` returns a proxy, which implements the templated `operator=` that is used to insert a value. This allows the nsTSetInserter to have a its defaulted `operator=`.

Side-effect: `E` (the hash's KeyClass) is not needed anymore in nsTSetInserter, so it's only templated on the set type.

Tech note: `std::back_insert_iterator` doesn't use a value, but has explicitly-defined `operator=(const typename Container::value_type&)` and  `operator=(typename Container::value_type&&)`. Unfortunately, some of our stored value types are references (e.g.: `nsStringHashKey::KeyType` is `const nsAString&`), which, due to reference collapsing, would have made both `operator=`'s have the same signature! That's why this implementation uses a proxy sub-type with a single templated `operator=` that can handle anything.

Differential Revision: https://phabricator.services.mozilla.com/D109587
2021-03-24 10:25:23 +00:00
Csoregi Natalia 024e0b2323 Backed out 10 changesets (bug 1581859) for causing hazard failures. CLOSED TREE
Backed out changeset 93fe6801a5e2 (bug 1581859)
Backed out changeset 0a33cb185fb3 (bug 1581859)
Backed out changeset 9ceaad6dab5b (bug 1581859)
Backed out changeset ee611f0839ca (bug 1581859)
Backed out changeset 4199963fe477 (bug 1581859)
Backed out changeset b4c5ace21b9e (bug 1581859)
Backed out changeset 6003469dc449 (bug 1581859)
Backed out changeset 826c62b783c0 (bug 1581859)
Backed out changeset e1d7851295fd (bug 1581859)
Backed out changeset 9796577af27a (bug 1581859)
2021-03-24 08:48:00 +02:00
Butkovits Atila 6cc3507063 Backed out 3 changesets (bug 1700472) for causing reftest failures.
Backed out changeset df4d74e9669f (bug 1700472)
Backed out changeset ec476bf43984 (bug 1700472)
Backed out changeset 168b31448423 (bug 1700472)
2021-03-24 03:12:44 +02:00
Kris Maglione 4abddadf18 Bug 1581859: Part 3a - Add do_GetProperty helper for nsIPropertyBag2. r=mccr8
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like `do_GetInterface`.

Differential Revision: https://phabricator.services.mozilla.com/D103210
2021-03-23 23:57:10 +00:00
Emilio Cobos Álvarez 966d0f4dfc Bug 1700472 - Remove -moz-scrolled-page-sequence. r=dholbert
This is needed for bug 1700379, because otherwise we create a reference
frame with the root's scrolled content (the
::-moz-scrolled-page-sequence), and that breaks some display list
invariants.

Always create a canvas frame instead, (doesn't matter when printing
since we print off the page sequence frame directly), and create a
single ::-moz-page-sequence box.

Differential Revision: https://phabricator.services.mozilla.com/D109512
2021-03-23 22:31:08 +00:00
Simon Giesecke ae75c3faa8 Bug 1601556 - Make Result<V, E> a literal type if V and E are literal types and PackingStrategy is not Variant. r=emilio
Also make CompactPair<A, B> a literal type if A and B are literal types,
and add MaybeStorageBase that ought to be used as a basis of MaybeStorage
in a follow-up patch.

Differential Revision: https://phabricator.services.mozilla.com/D55930
2021-03-23 12:35:19 +00:00
Simon Giesecke e5674e128d Bug 708901 - Add nsTHashSet. r=xpcom-reviewers,nika
Depends on D109276

Differential Revision: https://phabricator.services.mozilla.com/D107684
2021-03-23 10:36:31 +00:00
Cosmin Sabou 7eba371387 Backed out 10 changesets (bug 1581859) for causing hazard failures on ExtensionsParent.cpp.
Backed out changeset 6020ec7d7f32 (bug 1581859)
Backed out changeset 07901e457839 (bug 1581859)
Backed out changeset e23389fc98b5 (bug 1581859)
Backed out changeset 4287eebc2c77 (bug 1581859)
Backed out changeset eeff6f501cfc (bug 1581859)
Backed out changeset 22db36f7d16d (bug 1581859)
Backed out changeset 16831d45d0ed (bug 1581859)
Backed out changeset 816643de7694 (bug 1581859)
Backed out changeset 6fd5aa7895e3 (bug 1581859)
Backed out changeset 2b68d2eee18e (bug 1581859)
2021-03-23 05:48:27 +02:00
Kris Maglione 136038c0cb Bug 1581859: Part 3a - Add do_GetProperty helper for nsIPropertyBag2. r=mccr8
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like `do_GetInterface`.

Differential Revision: https://phabricator.services.mozilla.com/D103210
2021-03-22 20:12:15 +00:00
Kagami Sascha Rosylight 24e9b29c8d Bug 1699707 - Remove DeviceProximityEvent and UserProximityEvent r=agi,annevk,smaug
Note that this removes `window.ondeviceproximity` and `window.onuserproximity` which unexpectedly have been exposed unconditionally.

Differential Revision: https://phabricator.services.mozilla.com/D109160
2021-03-22 18:16:16 +00:00
Simon Giesecke 3dfd3cf4dc Bug 1698871 - Add SafeRefPtr support to nsBaseHashtable. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D108658
2021-03-22 15:18:35 +00:00
smolnar 20bfecac32 Backed out 2 changesets (bug 1698871) backed out for causing mochitest and xpc failures in SafeRefPtr. CLOSED TREE
Backed out changeset 1c617ab7df90 (bug 1698871)
Backed out changeset c3605f06194b (bug 1698871)
2021-03-22 16:40:12 +02:00
Simon Giesecke d06dde5f0e Bug 1698871 - Add SafeRefPtr support to nsBaseHashtable. r=dom-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D108658
2021-03-22 13:23:42 +00:00
Gerald Squelart 9250fa99a8 Bug 1699923 - Revert changes to nsTArrayBackInserter::operator=. r=gerald,masayuki a=bustage-fix DONTBUILD
The changes to nsTArrayBackInserter::operator= broke the builds on Windows
under some circumstances. This reverts those changes. Necessary adaptations
in the stack are made in later patch.

Differential Revision: https://phabricator.services.mozilla.com/D109276
2021-03-22 09:11:03 +00:00
Simon Giesecke cbcae47d96 Bug 1184468 - Add nsBaseHashtable::Values function to get a STL-style range of values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108586
2021-03-19 17:27:28 +00:00
Simon Giesecke 3206cac123 Bug 1184468 - Add nsTHashtable::Keys function to get a STL-style range of keys. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106949
2021-03-19 17:27:28 +00:00
Kagami Sascha Rosylight 9441435604 Bug 1699332 - Remove remaining presentation URL references r=annevk
Differential Revision: https://phabricator.services.mozilla.com/D109010
2021-03-19 12:36:57 +00:00
Simon Giesecke e0393699f5 Bug 1698098 - Add nsBaseHashtable::Clone methods. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106883
2021-03-19 09:01:46 +00:00
Narcis Beleuzu ffb77b2d9a Backed out 9 changesets (bug 1581859) for bustages jsapi.h . CLOSED TREE
Backed out changeset 2a3a77ae1eae (bug 1581859)
Backed out changeset 181c3f29f222 (bug 1581859)
Backed out changeset f7c39feb502e (bug 1581859)
Backed out changeset 9c7d0015c616 (bug 1581859)
Backed out changeset d2b8ee78745d (bug 1581859)
Backed out changeset 92359266d420 (bug 1581859)
Backed out changeset 98ba6b96c900 (bug 1581859)
Backed out changeset 0eb043b5c904 (bug 1581859)
Backed out changeset 55a4c2fc561d (bug 1581859)
2021-03-18 08:26:57 +02:00
Kris Maglione d865a9f20f Bug 1581859: Part 3a - Add do_GetProperty helper for nsIPropertyBag2. r=mccr8
There currently isn't a typesafe way to get a property with a given interface
from a property bag from C++. This patch adds one, following the pattern of
similar helpers, like `do_GetInterface`.

Differential Revision: https://phabricator.services.mozilla.com/D103210
2021-03-18 05:51:06 +00:00
Simon Giesecke b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Emilio Cobos Álvarez 9cec29125b Bug 1698043 - Simplify <input type=number/search> layout to fix this bug and make ::-moz-complex-control-wrapper unnecessary. r=dholbert
This should be a simpler setup. We keep every element being a direct
anon child of the text control, and special case the reflow of the
spinners / clear button, to subtract that size from the other elements.

This fixes the bug by ensuring that the editor and placeholder are sized
and positioned in exactly the same way.

Differential Revision: https://phabricator.services.mozilla.com/D108305
2021-03-14 07:53:13 +00:00
Butkovits Atila f564d3679e Backed out changeset 2bc9ef937528 (bug 1698043) for causing failures on search-with-value.html. CLOSED TREE 2021-03-14 06:42:25 +02:00
Emilio Cobos Álvarez ceed5b80ff Bug 1698043 - Simplify <input type=number/search> layout to fix this bug and make ::-moz-complex-control-wrapper unnecessary. r=dholbert
This should be a simpler setup. We keep every element being a direct
anon child of the text control, and special case the reflow of the
spinners / clear button, to subtract that size from the other elements.

This fixes the bug by ensuring that the editor and placeholder are sized
and positioned in exactly the same way.

Differential Revision: https://phabricator.services.mozilla.com/D108305
2021-03-14 02:35:49 +00:00
Simon Giesecke 2740499927 Bug 1634281 - Remove nsDataHashtable. r=xpcom-reviewers,nika
After the previous patch, nsDataHashtable is now unused, and can be removed in
favor of nsTHashMap.

Differential Revision: https://phabricator.services.mozilla.com/D106120
2021-03-10 10:47:48 +00:00
Simon Giesecke 32b1a38aa7 Bug 1634281 - Add nsTHashMap. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105962
2021-03-09 11:39:35 +00:00
Simon Giesecke cb6c8aead4 Bug 1695162 - Make nsTHashtable::ConstIter return a real ConstIterator. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D107038
2021-03-09 10:28:16 +00:00
Simon Giesecke 502b8a0314 Bug 1695162 - Add weak accessor to nsBaseHashtableET to better support range iteration. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106640
2021-03-04 18:52:19 +00:00
Simon Giesecke c57f081813 Bug 1634281 - Merge nsRefPtrHashtable and nsInterfaceHashtable into nsRefCountedHashtable. r=xpcom-reviewers,necko-reviewers,nika
The only difference between nsRefPtrHashtable and nsInterfaceHashtable was
that the former enforced explicit refcounting also with InsertOrUpdate.
This enforcement is removed.

Differential Revision: https://phabricator.services.mozilla.com/D106006
2021-03-04 18:52:19 +00:00
Simon Giesecke 3004f1f2f3 Bug 1634281 - Make nsDataHashtable a type alias. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105961
2021-03-04 18:52:18 +00:00
Simon Giesecke 6da5224516 Bug 1634281 - Add nsHashtablesFwd.h and remove all other forward declarations for hashtables. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105960
2021-03-04 18:52:17 +00:00
Simon Giesecke c5bdcb69d1 Bug 1695162 - Make nsBaseHashtable::ConstIter return a real ConstIterator. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106642
2021-03-03 08:58:53 +00:00
Simon Giesecke d9f1e7e67d Bug 1695162 - Delete nsBaseHashtable::Iterator move constructor as it's almost unused. r=xpcom-reviewers,nika
The only place using it is HashElemIter, which unnecessarily wraps Iterator in a
Maybe. This wrapping is removed.

Differential Revision: https://phabricator.services.mozilla.com/D106639
2021-03-03 08:58:53 +00:00
Simon Giesecke b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Simon Giesecke 25331cfdfd Bug 1634281 - Pull up GetOrInsertNew to nsBaseHashtable and support other smart pointer types. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106486
2021-03-02 09:02:19 +00:00
Simon Giesecke f4f7c593e0 Bug 1692835 - Remove nsJSThingHashtable. r=xpcom-reviewers,nika
The only use of nsJSThingHashtable is replaced by a direct use of
nsBaseHashtable.

Differential Revision: https://phabricator.services.mozilla.com/D105971
2021-03-02 09:02:19 +00:00
Simon Giesecke 5441c4cbcf Bug 1693530 - Add nsBaseHashtable::TryLookupOrInsertWith variant that accepts a functor returning a mozilla::Result. r=janv,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105634
2021-03-02 09:02:19 +00:00
Simon Giesecke 4c057f184c Bug 1692123 - Refactor and improve documentation of nsTArray_RelocateUsingMoveConstructor. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105454
2021-03-02 08:28:25 +00:00
Simon Giesecke 41be2e9861 Bug 1691913 - Update documentation of nsBaseHashtable. r=xpcom-reviewers,nika
In particular, clarify where UserDataType is used and where not.

Differential Revision: https://phabricator.services.mozilla.com/D105478
2021-03-01 09:59:31 +00:00
Simon Giesecke 1657421237 Bug 1691913 - Remove custom nsDataHashtable::GetValue. r=xpcom-reviewers,nika
Since all uses of GetValue have been replaced by other methods, the method
itself can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D105477
2021-03-01 09:59:31 +00:00
Simon Giesecke b399a8194c Bug 1691913 - Add some convenience methods to LookupResult and EntryHandle. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D105475
2021-03-01 09:59:29 +00:00
Simon Giesecke cf78ee5d9e Bug 1695275 - Simplify hashtable clearing when EntryType is trivially destructible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106647
2021-03-01 08:17:48 +00:00
Simon Giesecke 9e76c043ff Bug 1695275 - Simplify hashtable clearing when there is no Clear operation. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106644
2021-03-01 08:17:47 +00:00