Commit graph

2,885 commits

Author SHA1 Message Date
athenian200
68ee7c2d20 MoonchildProductions#1251 - Part 6: Solaris needs an audio implementation.
Current versions of libcubeb already have a Sun audio implementation, but in Firefox 52 and earlier, this was all they had. I'm not completely happy with this implementation because it has issues like video freezing if the soundcard isn't working, but I think fixing this or pulling in a newer libcubeb would be going too far for too little gain.
2019-11-04 11:52:21 +08:00
athenian200
bfb6af4f3a MoonchildProductions#1251 - Part 5: Fix POSIX compliance issue in process_util.h.
https://bugzilla.mozilla.org/show_bug.cgi?id=1364865

Solaris doesn't define NAME_MAX because if you read the current POSIX standard literally, no system that supports multiple file systems or networking should be defining it. It's a pedantic choice given that they USED to define NAME_MAX, but Solaris always did take POSIX compliance seriously, for better or worse.
2019-11-04 11:52:19 +08:00
athenian200
afb2e3a054 MoonchildProductions#1251 - Part 4: Core build system changes, lots of libevent/IPC junk.
This is mostly ifdefs, but as you can see, Solaris is actually a lot like Linux. They're both more SysV than BSD at core, and most of the differences have more to do with Solaris not using glibc than anything else.

I still need to audit a lot of these changes and understand why they're needed and what the alternative approaches are. After this patch, most of the core functionality needed to build Solaris is here.
2019-11-04 11:52:17 +08:00
athenian200
c54b1f4ea0 MoonchildProductions#1251 - Part 3: Finally end the long tradition of casting getpid() to int.
https://bugzilla.mozilla.org/show_bug.cgi?id=535106
https://bugzilla.mozilla.org/show_bug.cgi?id=1359841

Like many parts of the busted Solaris support, this one has its origins in the pre-Firefox days. Bug 535106, another Mozilla suite bug. It keeps coming up because the core issue is never addressed, the fact that nsTSubstring doesn't know how to handle pid_t. I think the explicit cast to int is a band-aid they use because they know if they touch that substring header file to make it handle pid_t, they'll probably be asked to fix all the other problems with it. I honestly think it just works by accident on other platforms because it's implicitly cast to signed or unsigned int, even though the POSIX standard says pid_t can be either long or int, and work as either a signed or unsigned integer. Whatever the case may be, it's handled better on Solaris now than it was.

Ironically enough, the main point of having pid_t rather than just having pids be int or something is to hide this little implementation detail so you can just use pid_t for the return type in portable code without having to worry about what it is on a specific platform. The unfortunate way Mozilla implemented string functions turns that on its head and makes the good things about pid_t into liabilities rather than assets.
2019-11-04 11:52:16 +08:00
athenian200
f7e2b86c94 MoonchildProductions#1251 - Part 2: Make the mozconfig loader POSIX-compliant.
https://bugzilla.mozilla.org/show_bug.cgi?id=1360571

Solaris uses ksh as the default shell, and furthermore bash doesn't seem to support the 'local' keyword feature when invoked as sh on OpenIndiana. We could just change the script to use bash (it is an option even on Solaris), but this fix is available and Mozilla has been using it since Firefox 55 with no issues on any other platforms. It was specfically done this way to avoid any need to change existing mozconfig files, so I feel confident saying the change is totally benign and if anything the way it is now is technically a POSIX compliance issue inherited from Mozilla that we'll hit if we ever try to compile this on any Unix platform where bash isn't sh.
2019-11-04 11:52:14 +08:00
athenian200
6de8a0f12d MoonchildProductions#1251 - Part 1: Restore initial Solaris support, fixed up.
Compared with what Pale Moon had for Solaris originally, this is mostly the same zero point I started patching from, but I've made the following changes here after reviewing all this initial code I never looked at closely before.

1. In package-manifest.in for both Basilisk and Pale Moon, I've made the SPARC code for libfreebl not interefere with the x86 code, use the proper build flags, and also updated it to allow a SPARC64 build which is more likely to be used than the 32-bit SPARC code we had there.

2. See Mozilla bug #832272 and the old rules.mk patch from around Firefox 30 in oracle/solaris-userland. I believe they screwed up NSINSTALL on Solaris when they were trying to streamline the NSS buildsystem, because they started having unexplained issues with it around that time after Firefox 22 that they never properly resolved until Mozilla began building NSS with gyp files. I'm actually not even sure how relevant the thing they broke actually is to Solaris at this point, bug 665509 is so old it predates Firefox itself and goes back to the Mozilla suite days. I believe $(INSTALL) -t was wrong, and they meant $(NSINSTALL) -t because that makes more sense and is closer to what was there originally. It's what they have for WINNT, and it's possible a fix more like that could serve for Solaris as well. Alternatively, we could get rid of all these half-broken Makefiles and start building NSS with gyp files like Mozilla did.

3. I've completely cut out support for the Sun compiler and taken into account the reality that everyone builds Firefox (and therefore its forks) with GCC now on Solaris. This alone helped clean up a lot of the uglier parts of the code.

4. I've updated all remaining SOLARIS build flags to the newer XP_SOLARIS, because the SOLARIS flag is no longer set when building Solaris.

5. I've confirmed the workaround in gtxFontconfigFonts.cpp is no longer necessary. The Solaris people got impatient about implementing a half-baked patch for a fontconfig feature that wasn't ready yet back in 2009, and somehow convinced Mozilla to patch their software to work around it when really they should have just fixed or removed their broken fontconfig patch. The feature they wanted has since been implemented properly, and no version of Solaris still uses the broken patch that required this fix. If anyone had ever properly audited this code, it would have been removed a long time ago.
2019-11-04 11:52:13 +08:00
wolfbeast
465f7201ca #1261 - Update status bar component for the removal of Object.(un)watch
This fixes the regression from #1257 by adding in an
Object.prototype.watch() shim, based on Eli Grey's polyfill.

This resolves #1261.
2019-11-02 06:45:33 +08:00
wolfbeast
3d8d9f95df Issue #1257 - Part 3: Remove/update tests.
This removes a ton of tests that are no longer relevant with (un)watch
removed (e.g. testing stability/bugs in the watchpoint system itself
which has never been the most stable), and updates others that would
previously rely on watch/unwatch, so that they don't unexpectedly fail.
2019-11-01 10:25:02 +08:00
wolfbeast
ca9e376e55 Issue #1257 - Part 2: Remove watch/unwatch and JS watchpoint class. 2019-11-01 10:24:09 +08:00
wolfbeast
3b9fbdc71d Issue #1257 - Part1: Remove watch class-hook and proxy trap. 2019-11-01 10:24:07 +08:00
wolfbeast
abbe1d4499 Force clobber. 2019-10-25 12:00:54 +08:00
wolfbeast
0771bbb58c Add size checks to WebGLContext::BufferData()
On MacOS, particularly large allocations within the platform limits
(1.2G+) will fail and crash. This adds a specific size check for that
when working around driver bugs (default).
While there, added a generic size_t limited size check for the
platform, and reporting OOM if too large.
2019-10-25 12:00:30 +08:00
wolfbeast
8896e73c1a Fix type barrier in IonBuilder::jsop_getimport. 2019-10-25 12:00:28 +08:00
Henri Sivonen
0e80c15692 Adjust tokenization of U+0000 2019-10-25 12:00:25 +08:00
Byron Campen
df83678e80 Prevent nr_ice_component_insert_pair from leaking. 2019-10-25 12:00:23 +08:00
wolfbeast
a194aefa0d Leverage strings to get working dirs in nsUpdateDriver. 2019-10-25 12:00:21 +08:00
Simon Giesecke
8b52506007 Ensure that file actors created after the database was closed are expired. 2019-10-25 12:00:19 +08:00
wolfbeast
21f7feb805 Avoid following the prototype chain
No longer follow the value's prototype chain when creating index updates
in IndexedDB.
2019-10-25 12:00:16 +08:00
wolfbeast
96cb9e1c39 Add null check in Http2Session::RecvAltSvc 2019-10-25 12:00:14 +08:00
wolfbeast
d794c3d762 Issue #1255 - Port upstream fix from libexpat 2019-10-25 12:00:12 +08:00
wolfbeast
4a024d6b52 Avoid uint32_t overflow in js shell by checking size of file before
trying to stuff something insanely large into a Uint8Array.

See also: BMO 1571911
2019-10-25 12:00:10 +08:00
wolfbeast
d21dc0f76a Issue #1253 - Reset performance object on navigation
This also addresses clearing of document dependent JS slots which might
get out of sync with innerWindow navigation; relevant comments added.

This resolves #1253
2019-10-25 12:00:08 +08:00
wolfbeast
c87432ab7e Issue #1229 - Remove fallback for $INSTDIR
This resolves #1229
2019-10-25 12:00:05 +08:00
wolfbeast
2df83f4801 Issue #1231 - Correct defines for Mac and keep universal prefs generic. 2019-10-25 12:00:03 +08:00
Gaming4JC
23a2c27f8b Issue #1243 - Update List of NSS Exported Symbols
Add NSS_CMSSignedData_GetDigestAlgs and NSS_CMSSignedData_hasDigests which are required for security patches in mailnews applications. Ref: m-c bug 1526473
2019-10-25 11:59:22 +08:00
Dmitry Grigoryev
6ba305ded8 Replace calls to undefined functions isMarkable() and toMarkablePointer() 2019-10-18 09:05:01 +08:00
wolfbeast
1e7a9e0e28 No Issue - Expand HWA over RDP to Windows 8.1 and 10.
When Mozilla implemented this initially, only Windows 8 existed.
Because of the strict equal check, 8.1 and 10 didn't get HWA over RDP
while they are perfectly capable of doing so with RemoteFX. This change
allows any version of Windows from 8.0 onwards to use HWA over RDP.
2019-10-18 09:05:00 +08:00
Matt A. Tobin
d381d20590 Don't treat format warnings as errors in xpconnect
GCC 9 compiler does not like the way we have it in XPCWrappedNative.cpp
2019-10-18 09:04:58 +08:00
Matt A. Tobin
12097d40a2 Fix build errors with newer glibc versions 2019-10-18 09:04:57 +08:00
Dmitry Grigoryev
12fba36d6e Added missing libwebp files to update.sh 2019-10-18 09:04:55 +08:00
wolfbeast
bca314ad02 No issue - Update TZ data to 2019c 2019-10-05 07:22:37 +08:00
Dmitry Grigoryev
9d42392ea8 Added missing libwebp NEON files 2019-10-05 07:22:24 +08:00
Gaming4JC
4bc299bb79 Issue #1230 - Part 3: Update Reftests
Ref:
1434478 part 7 - Update tests and enable some previously temporarily disabled Grid reftests from bug 1427608.
2019-10-05 07:22:16 +08:00
Gaming4JC
bbb8b6490a Issue #1230 - Part 2: Align devtools to the changes in css-grid
Ref:
1398537 part 4 - [css-multicol] Implement percentages for 'column-gap' (automated update of devtools).
2019-10-05 07:22:14 +08:00
Gaming4JC
e4c397f0d9 Issue #1230 - Part 1: Fix Back-computing percentages for intrinsic sizing in Layout CSS-Grid
List of relevant patches applied:

1398537 part 2 - [css-multicol] Implement percentages for 'column-gap' (Gecko part).

1434478 part 1 - [css-grid] Stop back-computing percentage grid gaps when the percentage basis is indefinite. Treat them as zero sized instead.

1434478 part 2 - Stop back-computing percentage padding/margin when the percentage basis is indefinite. Treat them as zero sized instead.

1434478 part 3 - Remove IntrinsicISizeOffsetData::hPctPadding/hPctMargin members since they are now unused.

1434478 part 4 - Factor out constants like NS_UNCONSTRAINEDSIZE so they can be used in headers without needing nsIFrame.h (idempotent patch).

1434478 part 5 - Create nsLayoutUtils::ResolveToLength for resolving CSS <length-percentage> (idempotent patch).

1434478 part 6 - Propagate a percentage basis to nsIFrame::IntrinsicISizeOffsets for resolving padding/margin.

This is needed only for CSS Grid since in other cases we're only using IntrinsicISizeOffsets in the inline-axis and the percentage basis is always indefinite for *intrinsic sizing*. When calculating the intrinsic size of grid items in the grid container's block axis however, we do have a definite size for the grid area in the inline-axis and it should be used per: https://drafts.csswg.org/css-grid/#algo-overview "2. Next, the track sizing algorithm resolves the sizes of the grid rows, using the grid column sizes calculated in the previous step." (Percentage padding/margin for grid items is always resolved against the grid area's inline-size nowadays.)
2019-10-05 07:22:11 +08:00
Gaming4JC
1f9d16132b Issue #1233 - Part 2: Update Reftests
List of relevant patches applied:

1425599 part 15 - [css-grid] Test reference fixes + more tests.

1373678 Part 3: Add line number checks to test_grid_implicit.html.

1416350 - Part 3: Add test to verify line numbers of grids with leading implicit tracks.

1416350 - Part 4: Add a reftest of repeat:auto-fit grids with leading implicit tracks.

1417711 - [css-grid] An abs.pos. grid container child that only covers removed 'auto-fit' tracks should not span to the end padding edge.

1416350 - Part 5: Correct the expected results for grids that have leading implicit tracks.

1418727 part 3 - [css-grid] Reftest updates.
2019-10-05 07:22:08 +08:00
Gaming4JC
f22ad944b7 Issue #1233 - Part 1: Fix grid overflow and rendering issues by improving Layout CSS-Grid API
List of relevant patches applied:

1425599 part 1 - [css-grid] Change the track sizing algorithm for spanning items so that it accumulates individual item contributions to the plan by max() rather than incrementing the planned size directly.

Also, fix a bug when copying back the planned limits after updating it for the first span group. It should only copy back track sizes that were actaully spanned by those items, other content-sized tracks' limits should remain at "infinity".

1425599 part 2 - [css-grid] Factor out the min-sizing parts of the track sizing for spanned items to a templated method (idempotent change).

1425599 part 3 - [css-grid] Factor out most of the max-sizing parts of the track sizing for spanned items to a templated method (idempotent change).

1425599 part 4 - [css-grid] Factor out the starting base/limit size to a templated method (idempotent change).

1425599 part 5 - [css-grid] Make CollectGrowable a templated method so that it works with either base/limit sizes (idempotent change).

1425599 part 6 - [css-grid] Make the size distribution methods templated with the intent of merging them in a later patch (idempotent change).

This patch also introduces an eInfinitelyGrowable bit to help get rid of the 'limits' temporary track sizes in the next patch.

1425599 part 7 - [css-grid] Remove the 'limits' copy of track sizes since they are no longer needed (idempotent change).

1425599 part 8 - [css-grid] Factor out the fit-content clamping function from DistributeToTrackLimits and pass it as a param instead (idempotent change).

1425599 part 9 - [css-grid] Merge DistributeToTrackLimits/Bases (idempotent change).

1425599 part 10 - [css-grid] Make MarkExcludedTracks a static method since it doesn't use 'this' (idempotent change).

1425599 part 11 - [css-grid] Hoist the marking of excluded tracks out from GrowSelectedTracksUnlimited to a separate method (idempotent change).

1425599 part 12 - [css-grid] Merge CopyPlanToBase/Limits into a templated method instead (idempotent change).

1425599 part 13 - [css-grid] Merge Grow[Base|Limits]ForSpanningItems into a templated method instead (idempotent change).

1425599 part 14 - [css-grid] Use iterators instead of an array + start/end index for the item data (idempotent change).

1425599 part 16 - [css-grid] Make SizeContributionForPhase a template.

1425599 - [css-grid] Follow-up bustage fix for stupid compiler warnings.

1378481 - Assign 'roundingError' in the default branch too, to avoid a maybe-uninitialized compiler warning.

1423292 - [css-grid] Add a couple of ItemState bits to Dump(), and make an ItemState assertion stricter (DEBUG-only changes).

1373678 Part 1: Reduce grid line numbers by count of leading implicit lines, minimum 0.

1416350 - Part 1: Correctly account for removed 'auto-fit' tracks also when there are leading implicit tracks.

1416350 - Part 2: Correct logic for Grid API line numbering with leading implicit tracks.

1418727 part 1 - [css-grid] Introduce StateBitsForRange() that collects the union of the state bits for a range of tracks (idempotent change).

1418727 part 2 - [css-grid] Require that an item spans at least one track with an 'auto' min sizing function for Automatic Minimum Size to apply.
2019-10-05 07:22:06 +08:00
adeshkp
c6714e1279 Issue #1231 - Stop using ICC profiles on Linux.
General consensus seems to be that color management on Linux desktops
is not mature enough to enable by default.
2019-10-05 07:21:50 +08:00
Moonchild
c93a31b725 No issue - Add 360 Safeguard to DLL blocklist
360 Safeguard/360 Total Security (Qihoo) causes crashes in a11y components.
This adds the offending dll to the injection blocklist.
See BZ bug 1536227 for details.
2019-09-20 22:14:46 +08:00
wolfbeast
5449e900ba Issue #1226 - Explicitly enable sse2 on x86_64 also.
Although it's enabled by default in gcc (should be, anyway!), we're
being explicit here for 64-bit x86 platforms here also. This matches the
old behavior.
2019-09-20 22:14:44 +08:00
wolfbeast
3686403436 Don't assume Intel architecture for compiler optimizations on Linux/gcc.
This only adds SSE2 flags when the CPU architecture is correct for it.
Resolves #1226
2019-09-20 22:14:42 +08:00
wolfbeast
c2fafd67b0 Fix whitelisting of JavaScript-uris by CSP hash. 2019-09-06 23:50:03 +08:00
wolfbeast
c3dc56af72 Properly implement various HSTS states.
Previously, HSTS preload list values could be overridden temporarily due
to counter-intuitive behavior of the API's removeState function.
This adds an explicit flag to the API for writing knockout values to
the Site Security Service, with the default resetting to whatever the
preload list state is.
2019-09-06 23:50:01 +08:00
wolfbeast
33d503a975 Use the correct group for JIT constraints.
This fixes a rare crash/CTD in JS.
This adds information about the constraints to a new RAII class so we
can finish all constraints at the end.
Based on changes in BZ 1568397
2019-09-06 23:49:58 +08:00
Olli Pettay
ec1e15a6f2 Ensure the right body element is used throughout the method call. 2019-09-06 23:49:56 +08:00
Sebastian Streich
3f25eeefaf Add checks to respect CSP-wildcard + Ports. 2019-09-06 23:49:53 +08:00
wolfbeast
cfc50f18c4 Fix a crash in IndexedDB. 2019-09-06 23:49:51 +08:00
Nathan Froyd
f40a82f098 Kill newly-spawned threads if we're shutting down. 2019-09-06 23:49:48 +08:00
wolfbeast
26b079c59f Remove HTML5 parser java docs and generation code.
java->C++ automated translation is not something we want to deal with
now or in the future.
2019-09-06 23:49:46 +08:00
wolfbeast
01f0d00864 Belatedly fix html5 parser attribution for files not covered by the MPL. 2019-09-06 23:49:44 +08:00