Commit Graph

770153 Commits

Author SHA1 Message Date
Jon Coppeard
032eecdec3 Bug 1731218 - Part 6: Check that we don't increase the size of Rooted for GC thing types r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D125955
2021-09-21 11:17:51 +00:00
Jon Coppeard
c6196ebacd Bug 1731218 - Part 5: Update Rooted constructor test expectations r=sfink
I don't know exactly why this is happening but we're now directly constructing
MyContainer and not copying it. I confirmed that this is calling the first
Rooted consturctor so I updated the tests to expect this.

Differential Revision: https://phabricator.services.mozilla.com/D125954
2021-09-21 11:17:50 +00:00
Jon Coppeard
ba7fd90527 Bug 1731218 - Part 4: Add typed base classes for roots r=tcampbell
This adds typed base classes with trace() methods. RootedTraceable is removed
and we store T directly in Rooted.

Differential Revision: https://phabricator.services.mozilla.com/D125953
2021-09-21 11:17:50 +00:00
Jon Coppeard
6dad3e1d0d Bug 1731218 - Part 3: Give Rooted a base class and use this refer to these roots when we don't know the type r=tcampbell
The link pointers move to the base class in a similar way to PersistentRootedBase.
This lets us get rid of a bunch more reinterpret_casts.

Differential Revision: https://phabricator.services.mozilla.com/D125952
2021-09-21 11:17:50 +00:00
Jon Coppeard
b3e8fa487f Bug 1731218 - Part 2: Give PersistentRooted a base class and use this refer to these roots when we don't know the type r=tcampbell
This removes the need for a bunch of reinterpret_casts.

Differential Revision: https://phabricator.services.mozilla.com/D125951
2021-09-21 11:17:49 +00:00
Jon Coppeard
174d704606 Bug 1731218 - Part 1: Rename rooting API base classes to 'Operations' in prepartion for adding base classes r=sfink
These are really mixins used to add public methods based on the type and don't
need to the base of an inheritance tree.

Differential Revision: https://phabricator.services.mozilla.com/D125950
2021-09-21 11:17:49 +00:00
Jon Coppeard
13d878dcbb Bug 1731218 - Part 0: Remove unnecessary template from Rooted constructor r=sfink
I don't think this does anything. The type is always present so we won't
restrict use of this constructor by SFINAE, although I may have misunderstood
the purpose of this.

I tried 'fixing' the SFINAE to what I though it should be by using enable_if_t
but it had the same effect as removing it. In both cases the code compiles, and
if I try to construct a rooted with an inappropriate argument it fails with a
sensible error.

Differential Revision: https://phabricator.services.mozilla.com/D125949
2021-09-21 11:17:49 +00:00
Nazım Can Altınova
a15be90d61 Bug 1654413 - Deserialize and stream the markers and marker schemas r=emilio,gerald
Now we can deserialize and stream everything to the JSON.

Differential Revision: https://phabricator.services.mozilla.com/D124027
2021-09-21 11:08:12 +00:00
Nazım Can Altınova
ca180f8629 Bug 1654413 - Add add_marker Rust profiler API and serialize the marker to the buffer r=emilio,gerald
This only adds the API and then adds the profiler payload to the buffer. The
deserialization and streaming will happen in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D124026
2021-09-21 11:08:11 +00:00
Nazım Can Altınova
a5b9cfdadb Bug 1654413 - Add MarkerSchema struct and its enums for marker API r=emilio,gerald
You can see the `mozilla::MarkerSchema` for the C++ counterpart. This Rust
struct simply wraps the C++ object and keeps the reference of it as RAII. This
heap allocates the inner C++ object but it's fine to do it here, because it's
we only create a MarkerSchema object at the end of a profiling session and it
happens once per marker type. It should be very rare.

Differential Revision: https://phabricator.services.mozilla.com/D124025
2021-09-21 11:08:11 +00:00
Nazım Can Altınova
c850585eae Bug 1654413 - Add JSONWriter struct for marker schema r=emilio,gerald
JSON writer will be used for the third and last marker API. This is needed
because we need to describe a marker payload struct on how to serialize it.

Differential Revision: https://phabricator.services.mozilla.com/D124024
2021-09-21 11:08:11 +00:00
Nazım Can Altınova
978dbc8ab8 Bug 1654413 - Add add_text_marker Rust API r=emilio,gerald
This is the second API for the markers. This allows one payload as a text for
more information. See the PROFILER_MARKER_TEXT macro for the C++ counterpart.

Differential Revision: https://phabricator.services.mozilla.com/D124023
2021-09-21 11:08:10 +00:00
Nazım Can Altınova
02f9877e83 Bug 1654413 - Add add_untyped_marker Rust API r=emilio,gerald
This is the first and simplest API for the markers. There will be two more
APIs in the following patches (add_text_marker and add_marker). You can see the
PROFILER_MARKER_UNTYPED macro for the C++ counterpart.

Differential Revision: https://phabricator.services.mozilla.com/D124022
2021-09-21 11:08:10 +00:00
Nazım Can Altınova
7f96087d60 Bug 1654413 - Add a MarkerStack Rust enum for the marker API r=emilio,gerald
MarkerStack object is a bit more complex in the C++ side. But we don't need a
complex object like that in here. A simple enum is enough to determine what
type of marker stack we are capturing. C++ side will be handling the capturing
of the stack.

Differential Revision: https://phabricator.services.mozilla.com/D124021
2021-09-21 11:08:09 +00:00
Nazım Can Altınova
7ec023dfe3 Bug 1654413 - Add a MarkerTiming and MarkerOptions Rust structs for the marker API r=emilio,gerald
These structs are needed for the marker APIs. We also have the same structs as
the C++ classes. See `mozilla::MarkerTiming` and `mozilla::MarkerOptions`.

Differential Revision: https://phabricator.services.mozilla.com/D124020
2021-09-21 11:08:09 +00:00
Nazım Can Altınova
2957052aa8 Bug 1654413 - Add a small gecko_profiler_category macro as a sugar for marker categories r=emilio
This is a syntactical sugar to write the categories more easily. I prefer to
have this macro because this is the same syntax as the categories in the label
frames API.

Differential Revision: https://phabricator.services.mozilla.com/D124019
2021-09-21 11:08:08 +00:00
Nazım Can Altınova
53a1965f9e Bug 1654413 - Add ProfilerTime Rust struct for marker API r=emilio,gerald
This will be used to get the time from profiler, so marker API can use it to
understand the start or end time.

Differential Revision: https://phabricator.services.mozilla.com/D124018
2021-09-21 11:08:08 +00:00
Nazım Can Altınova
de9c311511 Bug 1654413 - Rerun the profiler API build.rs when the included header files are changed r=emilio
For some reason, I thought that `parse_callbacks(Box::new(CargoCallbacks))`
would also automatically adds the initial header files that are manually added.
But apparently `parse_callbacks` is only executed when the inner included
header files are found.

Differential Revision: https://phabricator.services.mozilla.com/D124017
2021-09-21 11:08:08 +00:00
Sandor Molnar
bf98cdbcb8 Backed out 5 changesets (bug 1718711) for causing multiple failures in xdr/module-oom.js. CLOSED TREE
Backed out changeset 73bf3a3d829a (bug 1718711)
Backed out changeset 429677b09999 (bug 1718711)
Backed out changeset 32023146b793 (bug 1718711)
Backed out changeset 75eac408c699 (bug 1718711)
Backed out changeset 48fdf77fbc02 (bug 1718711)
2021-09-21 13:56:56 +03:00
Tooru Fujisawa
179dc1309f Bug 1718711 - Part 5: Remove codeModule/decodeModule shell functions. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D121266
2021-09-21 10:19:53 +00:00
Tooru Fujisawa
838d8f3d95 Bug 1718711 - Part 4: Use compileToStencilXDR instead of codeModule. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D121265
2021-09-21 10:19:52 +00:00
Tooru Fujisawa
30af321bc5 Bug 1718711 - Part 3: Add module option to compileToStencil. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D121264
2021-09-21 10:19:52 +00:00
Tooru Fujisawa
12de1bb33c Bug 1718711 - Part 2: Fix help comment for compileToStencil. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D121263
2021-09-21 10:19:51 +00:00
Tooru Fujisawa
9eaf31ee8f Bug 1718711 - Part 1: Remove stale requirement around saveIncrementalBytecode and assertEqBytecode. r=nbp
assertEqBytecode couldn't be used with saveIncrementalBytecode because
we were merging at decode timing.

Bug 1687095 changed it to merge before encoding, and the resulting XDR buffer
becomes same between incremental encode and re-encode.

Differential Revision: https://phabricator.services.mozilla.com/D121262
2021-09-21 10:19:51 +00:00
Kershaw Chang
3ab686eb88 Bug 1730418 - Fetch HTTPS RR in nsHttpChannel::MaybeUseHTTPSRRForUpgrade, r=necko-reviewers,dragana
Before this patch, we fetch HTTPS RR in `nsHttpChannel::MaybeStartDNSPrefetch`, which is too early. It's possible that this http request is blocked by an extension but we still send the query for HTTPS RR.
To improve this, we move the time of fetching HTTPS RR a bit late.

Differential Revision: https://phabricator.services.mozilla.com/D125931
2021-09-21 08:58:24 +00:00
Jon Coppeard
2612047acf Bug 1601228 - Move GC sweeping implementation to a new source file r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D125980
2021-09-21 08:55:09 +00:00
stransky
91a022938e Bug 1731155 [Wayland] Check popupFrame at nsWindow::WaylandPopupSetDirectPosition(), r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D126183
2021-09-21 08:53:45 +00:00
André Bargull
27cd54a779 Bug 1693576 - Part 8: Add a method to retrieve week day information to Calendar. r=platform-i18n-reviewers,gregtatum
The last addition for the "Intl Locale Info API" proposal.

Differential Revision: https://phabricator.services.mozilla.com/D125578
2021-09-21 08:51:22 +00:00
André Bargull
ea30633946 Bug 1693576 - Part 7: Add method to enumerate over all time zones used in a region. r=platform-i18n-reviewers,gregtatum
The filter type is `UCAL_ZONE_TYPE_ANY` to ensure all possible time zones are
returned, and not just CLDR canonical time zones. (CLDR canonical time zones
are different from IANA canonical time zones.)

Differential Revision: https://phabricator.services.mozilla.com/D125576
2021-09-21 08:51:22 +00:00
André Bargull
17e8b2c855 Bug 1693576 - Part 6: Rename GetDefaultTimeZoneOffsetMs() to GetRawOffsetMs(). r=platform-i18n-reviewers,gregtatum
- `TimeZone` objects can be created with any time zone identifier, so the "Default"
  part in the name isn't correct.
- The "TimeZone" part is no longer needed, now that there's a distinct class for
  `TimeZone` objects.

Therefore let's rename `GetDefaultTimeZoneOffsetMs()` to `GetRawOffsetMs()`.

Differential Revision: https://phabricator.services.mozilla.com/D125575
2021-09-21 08:51:21 +00:00
André Bargull
5638c044f2 Bug 1693576 - Part 5: Move time zone functions from mozilla::Calendar into mozilla::TimeZone. r=platform-i18n-reviewers,gregtatum
Time zone functions being part of `UCalendar` is an internal implementation
detail of ICU4C. For the public unified Intl API we should rather follow
Temporal (or ICU4C's C++ API) and have a separate `TimeZone` class.

The files were moved using `hg cp` to preserve the file history.

Differential Revision: https://phabricator.services.mozilla.com/D125574
2021-09-21 08:51:21 +00:00
André Bargull
e2eb40c097 Bug 1693576 - Part 4: Switch intl_numberingSystem to use mozilla::intl::NumberingSystem. r=platform-i18n-reviewers,gregtatum
Use the new `NumberingSystem` class to replace `UNumberingSystem` in SpiderMonkey.

Differential Revision: https://phabricator.services.mozilla.com/D125573
2021-09-21 08:51:21 +00:00
André Bargull
67b7d804e6 Bug 1693576 - Part 3: Add NumberingSystem class to the unified Intl API component. r=platform-i18n-reviewers,gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D125572
2021-09-21 08:51:20 +00:00
André Bargull
1919267c6d Bug 1693576 - Part 2: Add DateTimeFormat::GetAllowedHourCycles(). r=platform-i18n-reviewers,gregtatum
ICU's public API only provides a function to return the preferred hour cycle
(`udatpg_getDefaultHourCycle()`), whereas for `Intl.Locale` we want to be able
to determine all allowed hour cycles. So we have to do it the hard way and
directly read ICU resource bundles to get the data we need for this feature.

Differential Revision: https://phabricator.services.mozilla.com/D125571
2021-09-21 08:51:20 +00:00
André Bargull
ed57b49cb4 Bug 1693576 - Part 1: Add "commonlyUsed" to Calendar and Collator. r=platform-i18n-reviewers,gregtatum
Pass through the "commonlyUsed" parameter to ICU to be able to filter any
uncommon keyword values.

Differential Revision: https://phabricator.services.mozilla.com/D125570
2021-09-21 08:51:19 +00:00
Nicolas Silva
185d43a993 Bug 1728569 - Increase the the maximum resolution of cached conic gradients with hard stops. r=gfx-reviewers,lsalzman
Right now the max resolution is 1024 which is visually fine if the gradient is smooth but can cause very visible aliasing artifacts with hard stops in very large gradients. The best way to address this would be to render very large gradients as brushes as we did before caching but involves more work and code to maintain.
In the mean time, increasing the maximum resolution is only a half solution but significantly improves the visual quality in the bad cases. Very large conic gradients are uncommon enough that it should let us focus on higher priority work.

Differential Revision: https://phabricator.services.mozilla.com/D124193
2021-09-21 08:36:15 +00:00
Sandor Molnar
10773301cf Backed out 7 changesets (bug 1731218) for causing spidermonkey build bustages in RootingAPI. CLOSED TREE
Backed out changeset 0dfcae852026 (bug 1731218)
Backed out changeset e2c59b5af7ea (bug 1731218)
Backed out changeset 3e98b832dcc6 (bug 1731218)
Backed out changeset 57e60277e4ca (bug 1731218)
Backed out changeset 3b264a4bc67e (bug 1731218)
Backed out changeset 304f27af6b95 (bug 1731218)
Backed out changeset 06e7a1992de8 (bug 1731218)
2021-09-21 11:37:12 +03:00
Michael Kohler
2a78d18891 Bug 1707887 - Do not show nav arrow on security button in Site Identity when button is disabled r=johannh
Differential Revision: https://phabricator.services.mozilla.com/D125095
2021-09-21 08:18:22 +00:00
Jon Coppeard
cfdd17b046 Bug 1731218 - Part 6: Check that we don't increase the size of Rooted for GC thing types r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D125955
2021-09-21 07:57:25 +00:00
Jon Coppeard
a12097a185 Bug 1731218 - Part 5: Update Rooted constructor test expectations r=sfink
I don't know exactly why this is happening but we're now directly constructing
MyContainer and not copying it. I confirmed that this is calling the first
Rooted consturctor so I updated the tests to expect this.

Differential Revision: https://phabricator.services.mozilla.com/D125954
2021-09-21 07:57:25 +00:00
Jon Coppeard
4e793eed42 Bug 1731218 - Part 4: Add typed base classes for roots r=tcampbell
This adds typed base classes with trace() methods. RootedTraceable is removed
and we store T directly in Rooted.

Differential Revision: https://phabricator.services.mozilla.com/D125953
2021-09-21 07:57:24 +00:00
Jon Coppeard
96c9aca4a9 Bug 1731218 - Part 3: Give Rooted a base class and use this refer to these roots when we don't know the type r=tcampbell
The link pointers move to the base class in a similar way to PersistentRootedBase.
This lets us get rid of a bunch more reinterpret_casts.

Differential Revision: https://phabricator.services.mozilla.com/D125952
2021-09-21 07:57:24 +00:00
Jon Coppeard
09ae160102 Bug 1731218 - Part 2: Give PersistentRooted a base class and use this refer to these roots when we don't know the type r=tcampbell
This removes the need for a bunch of reinterpret_casts.

Differential Revision: https://phabricator.services.mozilla.com/D125951
2021-09-21 07:57:23 +00:00
Jon Coppeard
da8915efaf Bug 1731218 - Part 1: Rename rooting API base classes to 'Operations' in prepartion for adding base classes r=sfink
These are really mixins used to add public methods based on the type and don't
need to the base of an inheritance tree.

Differential Revision: https://phabricator.services.mozilla.com/D125950
2021-09-21 07:57:23 +00:00
Jon Coppeard
ae4e5f23b3 Bug 1731218 - Part 0: Remove unnecessary template from Rooted constructor r=sfink
I don't think this does anything. The type is always present so we won't
restrict use of this constructor by SFINAE, although I may have misunderstood
the purpose of this.

I tried 'fixing' the SFINAE to what I though it should be by using enable_if_t
but it had the same effect as removing it. In both cases the code compiles, and
if I try to construct a rooted with an inappropriate argument it fails with a
sensible error.

Differential Revision: https://phabricator.services.mozilla.com/D125949
2021-09-21 07:57:23 +00:00
Botond Ballo
f4e1dde25a Bug 1729118 - Move InternalHitTester into test code. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D126159
2021-09-21 06:53:38 +00:00
Botond Ballo
1c5b8ae7d8 Bug 1729118 - Remove the only remaining non-test use of the internal hit tester. r=hiro
This use happened during shutdown, at which time the fallback
behaviour of the WebRender hit tester (to return the root APZC)
is equally suitable.

Differential Revision: https://phabricator.services.mozilla.com/D126158
2021-09-21 06:53:38 +00:00
Botond Ballo
53fea48d7d Bug 1729118 - Extract an IAPZHitTester interface with WebRender and internal hit test implementations. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D126157
2021-09-21 06:53:38 +00:00
Botond Ballo
44a0ca0809 Bug 1729118 - Move GuidComparatorIgnoringPresShell to ScrollableLayerGuid.h. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D126156
2021-09-21 06:53:37 +00:00
Botond Ballo
1ca62ef41e Bug 1729118 - Make the 'apz.manager' log module a static member of APZCTreeManager so other classes can use it. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D126155
2021-09-21 06:53:37 +00:00