Commit graph

4,105 commits

Author SHA1 Message Date
Moonchild
684f4824da Issue #618: Pass down referrer and referrer policy when fetching modules.
Because the spec says so.
2020-08-29 08:09:41 +08:00
Moonchild
97617a3ab1 Issue #618: Ignore 'event' and 'for' attributes for module scripts.
Because the spec says so.
2020-08-29 08:09:38 +08:00
Moonchild
34db761758 Issue #618 - Simplify module resolve hook to be a function pointer
This is an ahead-of time port to try and address #1624.
This is based on BZ 1461751 and Jon Coppeard's work in it.
2020-08-29 08:08:41 +08:00
Moonchild
976239c8d0 [js] Add some utility functions to get the current JS runtime. 2020-08-29 08:08:38 +08:00
Gaming4JC
6639e9cdac Issue #618 - Keep track of which modules in a graph have been fetched using a visited set
Ref: BZ 1365187
2020-08-29 08:08:23 +08:00
Gaming4JC
f0d6e293a3 Issue #618 - Simplify module map interface
Ref: BZ 1365187
2020-08-29 08:08:19 +08:00
Gaming4JC
f3d348ebd7 Issue #618 - Align error handling for module scripts with the spec - Debug follow up
MODULE_STATUS_ERRORED is no more. Replacing with newer API.

Ref: BZ 1420420
2020-08-29 08:07:58 +08:00
Gaming4JC
f600824850 Issue #618 - Lazily initialise module binding maps - Debug follow up
The added debug assertion does not work due to missing API.
They were added in BZ 1337491, 1395366, and others, but were primarily used for multi-threading.
This uses our existing non-multithreaded syntax instead, resolving a `no member named` build error.
2020-08-29 08:07:54 +08:00
Jon Coppeard
40017437ab Issue #618 - Record module dependency before starting fetch so that error
handling works correctly

Ref BZ 1395896
2020-08-29 08:07:10 +08:00
Moonchild
39050b430e Issue #618 - Lazily initialise module binding maps
Make it so they are not allocated on a background thread in a different zone to
the final module.

Ref: BZ 1372258
2020-08-29 08:07:06 +08:00
Moonchild
1cfaf06d8f Issue #618 - Use a single slot for the module's environment object.
According to the spec this isn't created until the module is instantiated, but
we create it when we compile the module.
We stored this previously in InitialEnvironmentSlot and copied it to
EnvironmentSlot when it was supposed to be created, but we can just store it in
the latter slot straight away and check the module's status and return null if
it shouldn't exist yet.

This reduces the number of slots needed on a moduleObject to 17.

Re: BZ 1420412 Part 1
We can't implement the second part to further reduce our number of slots,
because it relies on SetProxyReservedSlot which in turn relies on
rearchitecturing JS proxies to make reserved slots dynamic. That's a rabbit hole
we really don't want to fall into.
So, we'll end up being a bit slower because it can't be in-line allocated with
having more than 16 slots, but so be it. I sincerely doubt it will make any
practical difference.
2020-08-29 08:07:03 +08:00
Moonchild
0d874713ef Issue #618 - Align error handling for module scripts with the spec (again)
This updates module implementation to match spec regarding handling of
instantiation errors, after it was changed yet again, this time to not remember
instantiation errors, but instead immediately rethrow applicable ones.

Ref: BZ 1420420
2020-08-29 08:07:00 +08:00
Moonchild
933fb54415 Issue #618 - Fix error events fired when loading JS module dependencies fail
When module dependencies fail, don't spam with errors for each import; only fire
the error event once.

Ref: BZ 1421259
2020-08-29 08:06:57 +08:00
Matt A. Tobin
4413fcfdaa Update old.configure for --enable-phoenix-extensions 2020-08-29 08:06:38 +08:00
Andy
6d0384a86f [Pale-Moon] Issue #1717 - Total Level Rewrite
SSLStatus is now used for basically everything.
2020-08-21 15:11:32 +08:00
Andy
66a5df11c1 [Pale-Moon] Issue #1717 - Differentiate DV & EV Mixed Content
UXP drops STATE_IDENTITY_EV_TOPLEVEL for Mixed Content.
If we want to have different behaviors between DV and EV, we need to use nsISSLStatus.
2020-08-21 15:11:11 +08:00
Andy
81001e37c3 [Pale-Moon] Issue #1717 - UXP Says Mixed Content is Broken
We get a little more picky about it.
2020-08-21 15:10:49 +08:00
Andy
c5ff8be4fb [Pale-Moon] Issue #1717 - Revert 3DES Check to Original Method for Now 2020-08-21 15:10:32 +08:00
Andy
92eed10c3b [Pale-Moon] Issue #1717 - Whitespace Cleanup 2020-08-21 15:10:14 +08:00
Andy
024f61bf38 [Pale-Moon] Issue #1717 - Localize Padlock Tooltip 2020-08-21 15:09:56 +08:00
Andy
a3117f5b44 [Pale-Moon] Issue #1717 - 3DES Detection
This will do to start. Get a better list of what's being deprecated.
2020-08-21 15:09:34 +08:00
Andy
782bcb46dc [Pale-Moon] Issue #1717 - Low Cipher Changes 2020-08-21 15:09:18 +08:00
Andy
02f79388b4 [Pale-Moon] Issue #1717 - Padlock Improvements 2020-08-21 15:09:02 +08:00
FranklinDM
41ed98b736 [Pale-Moon] Issue #1826 - Restore missing close icon on the undo prompt at the quick dial page
While this could've all been placed in the shared new tab style sheet, OSX does not include the SVG close icon used by the other platforms and has its own custom close icon.
2020-08-21 15:08:44 +08:00
Matt A. Tobin
fedaa41f44 Follow up to eb28b1f32 - Correct inputmethod build file by putting Keyboard.jsm back in EXTRA_JS_MODULES
JSMs are NOT Components.
2020-08-21 15:08:13 +08:00
Moonchild
9b260e75cc [js] Reinstate precise floating point model for all js sources. 2020-08-19 16:21:44 +08:00
Moonchild
10fa2b4e32 Issue #457 - Silence SQLite compiler warning
Our use of SQLite explicitly avoids using MSVC's _msize which the lib would
notrmally use. This was set up this way in BZ bug 719579 for legitimate reasons
(because _msize would end up using the system symbol, which would crash trying
to get the size information from jemalloc allocations). Since we build the
SQLite lib separately there is no easy way to avoid this warning as it's not
directly linked against mozglue.dll which has the jemalloc functions it wants
for _msize when not using the system allocator. It is implicitly assuming the
function is an extern returning an int (with the call specifically  casting to
int) which is correct (well, correct _enough_, anyway) so the warning can
safely be ignored for our specific use as it all lines up at link time.
2020-08-19 16:21:41 +08:00
Moonchild
5d3e2b23a1 [db] Update SQLite lib to 3.33.0 2020-08-19 16:21:39 +08:00
athenian200
c1b3280e01 Fix nits 2020-08-19 16:21:24 +08:00
athenian200
42d14af9a3 Issue #1629 - Part 3: Implement behind preference.
This is not very "clean," and is mostly done in the same sloppy way as Emilio did it because that's basically the only way you can do it. Note well that this does NOT actually turn off everything I've done in a clean fashion like ifdefs would. For instance, the Explicitly Enabled flag is still present, but is now always false because the only condition that can set it true is behind the pref and therefore inert when this pref is off. Also, because the arguments of SetDisabled have changed, my modifications to SetMozDisabled must be present regardless of whether the pref is on or off. What I have done is turn off the actual reflection of the disabled attribute in Disabled and SetDisabled, as well as in AfterSetAttr.

However, turning the pref off seems to restore more or less our old behavior, though there may be subtle differences unlike with an ifdef since this is, unfortunately, not an exact science and I can only turn off changes that happen within individual functions and not changes in how functions interact with each other.
2020-08-19 16:21:22 +08:00
athenian200
6835425e20 Issue #1629 - Part 2: Implement the Explicitly Enabled flag.
This part of the bug was significantly complicated by the following major refactors:

https://bugzilla.mozilla.org/show_bug.cgi?id=1456435
https://bugzilla.mozilla.org/show_bug.cgi?id=1459498

As best as I can tell, we just need to implement the explicitly enabled
flag on every instance of GetStyleSheetInfo, make sure
aIsExplicitlyEnabled is false in every situation except the one where
the disabled content attribute is removed from a link element, and
enable alternate stylesheets if this flag is set on them. So we take the
explicitly enabled flag as an input to PrepareSheet, and also add it to
LoadStyleLink and LoadInlineStyle. I also decided not to defer loading of
alternate stylesheets that have been explicitly enabled.
2020-08-19 16:21:19 +08:00
athenian200
4e15e4c252 Issue #1629 - Part 1: Implement basic logic in HTMLLinkElement.
So basically, I'm trying to adapt this to UXP:

https://bugzilla.mozilla.org/show_bug.cgi?id=1281135

The earliest source of difficulty while adapting Bug 1281135 to our codebase was simply getting the new ErrorResult flag added to the SetDisabled function to play nice with the SetMozDisabled function. At this point, the implementation can actually have a stylesheet be disabled by default but there are supposedly issues with alternate stylesheets.

At first I played around with the return type of SetMozDisabled to no avail, but I found another solution fairly quickly.

https://bugzilla.mozilla.org/show_bug.cgi?id=846972
https://bugzilla.mozilla.org/show_bug.cgi?id=1157898

Essentially, the way around the problem of the number of return arguments not matching up is to declare a local variable within SetMozDisabled called ErrorResult rv, and using that to store the return value of the ErrorResult argument from SetDisabled. After that, because ErrorCode was removed, you would return rv.StealNSResult() in order to report success or failure to any consumer that calls on SetMozDisabled.
2020-08-19 16:21:17 +08:00
Gaming4JC
e3326c56b1 Issue #1620 - Intrinsic Aspect Ratio: Debug Follow up.
Newly introduced aspect-ratio property did not have CSS_PROP_LIST_EXCLUDE_INTERNAL defines, resulting in the following assertion:
\!nsCSSProps::PropHasFlags(p, (1<<28)) (properties defined outside of #ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL sections must not have the CSS_PROPERTY_INTERNAL flag), at ...layout/style/nsCSSProps.cpp:289

This patch resolves the assertion by adding #ifndef around the aspect-ratio property.
2020-08-19 16:20:59 +08:00
FranklinDM
194f96855e [Pale-Moon] Issue #1824 - Fix broken page style menu selection for alternative style sheets
Missing `return` in anonymous function which checks if the given style sheet title is present in the document's style sheet array.
2020-08-14 09:01:47 +08:00
Pale Moon
aa1210518c [Pale-Moon] Update user-agent overrides and reorganize. 2020-08-14 09:01:29 +08:00
Moonchild
07929daad2 [CSS] Alias -webkit-appearance for compatibility reasons
Since this is supported as an alias by Firefox and Edge for the same
reasons and we have websites using this to (attempt to) override the
system-provided styling with their own, leaving out the only supported
keyword we'd otherwise have (with -moz- prefix) but still stating
-webkit-.

TODO: unprefix this completely and make the vendor prefixes aliases.
2020-08-14 08:59:42 +08:00
Andy
9f48a59946 Issue #1620 - Enable Intrinsic Ratio by Default
A simpler name feels so much cleaner.
2020-08-14 08:59:37 +08:00
Andy
c02e424911 Issue #1620 - Remove Development Comments 2020-08-14 08:59:35 +08:00
Andy
be1f68f39e Issue #1620 - Use Intrinsic Aspect Ratio for Images
https://bugzilla.mozilla.org/show_bug.cgi?id=1547231
https://bugzilla.mozilla.org/show_bug.cgi?id=1559094
https://bugzilla.mozilla.org/show_bug.cgi?id=1633434
https://bugzilla.mozilla.org/show_bug.cgi?id=1565690
https://bugzilla.mozilla.org/show_bug.cgi?id=1602047

Make use of Aspect Ratios in Image frames before Images are loaded.
- Check for width and height HTML properties and create a ratio with them.
- Overwrite HTML size values with actual image dimensions on load.
- Collapse any frames with srcless images.

Comments:
dom/html/nsGenericHTMLElement.cpp:1483
layout/generic/nsImageFrame.cpp:289
2020-08-14 08:59:33 +08:00
Roy Tam
1ee66d0a5f bump palemoon version 2020-08-13 09:22:06 +08:00
Roy Tam
35f288dc4a Revert UXP issue 1628 related changes. 2020-08-08 10:14:13 +08:00
Matt A. Tobin
15c137e0b0 [Basilisk] Issue MoonchildProductions/UXP#1628 - Remove extensions.update.background.url from preferences 2020-08-08 06:59:26 +08:00
Matt A. Tobin
9664369ac7 [Pale-Moon] Issue MoonchildProductions/UXP#1628 - Remove extensions.update.background.url from preferences 2020-08-08 06:57:58 +08:00
Moonchild
26990a1d74 Pref and disable getRootNode()
This is apparently used for fallback selection and if available it is "assumed"
Shadow DOM is also available, while this is a utility function.

Webcompat is a nightmare sometimes.
2020-08-08 06:56:50 +08:00
Matt A. Tobin
3bfc574220 Issue #1628 - Remove redundant PREF_EM_UPDATE_BACKGROUND_URL 2020-08-08 06:56:47 +08:00
Gaming4JC
5703454329 Issue #1621 - Part 4: Check whether node can be splited.
At first, HTMLEditor::GetActiveEditingHost might return null in this situation, we should check whether nullptr is returned. At second, SplitNodeDeep returns error since curent is design mode and selection node has no parent. So we should check error.

Ref: Bug 1350772
2020-08-06 10:23:48 +08:00
Gaming4JC
ec1301a85d Issue #1621 - Part 3: Use nsIAtom to change attirbute if possible.
We can replace old nsIEditor API with nsIAtom version.

Ref: Bug 1324996
2020-08-06 10:23:45 +08:00
Gaming4JC
b6b2792a35 Issue #1621 - Part 2: Implement nsIAtom version of SetAttribute/RemoveAttribute/CloneAttirubte.
Add nsIAtom version of the following.
 - CloneAttribute
 - RemoveAttribute
 - RemoveAttributeOrEquivalent
 - SetAttribute
 - SetAttributeOrEquivalent

Ref: Bug 1324996
2020-08-06 10:23:43 +08:00
Gaming4JC
5260565a09 Issue #1621 - Part 1: CSSEditUtils should use atom for CSS property if possible.
There is a lot of string compare when using CSS property name. We should use nsGkAtoms instead.

Ref: Bug 1323138
2020-08-06 10:23:41 +08:00
Matt A. Tobin
ee8c57f6da Issue #1625 - Allow MailNews Oauth2 support to be configured in confvars.sh
Baby has his bottle, you ok now?
2020-08-06 10:23:28 +08:00