At present, the "layout.css.stylo-blocklist.blocked_domains" pref is empty. It
is probably meaningless to set "layout.css.stylo-blocklist.enabled" pref to true
by default. We can set "layout.css.stylo-blocklist.enabled" pref to true by the
styloblocklist system add-on once the "layout.css.stylo-blocklist.blocked_domains"
pref is non-empty.
MozReview-Commit-ID: 2B5JnGEafLo
--HG--
extra : rebase_source : 7b694a2cbe70d2d09c1a5c2c2e4c6eec31f39a1e
It's unnecessarily general, because we only ever use
Preferences::DirtyCallback() as the callback.
And because it's no longer a callback, the patch renames DirtyCallback() as
HandleDirty().
MozReview-Commit-ID: Hl50dcxfVQq
--HG--
extra : rebase_source : 5807d2ed650466f85cd7325f2adccdc177ccb4d2
It's simple enough that having a separate function isn't helpful.
MozReview-Commit-ID: Ke9BIfp9yHU
--HG--
extra : rebase_source : 57aee451b8fd3450da4a604cefbf9fafda894b1c
Preferences.cpp has two functions named pref_DoCallback(). One of them has a
single use in the parser. This patch inlines that single use to remove the name
duplication.
MozReview-Commit-ID: HnyteQ0N5M1
--HG--
extra : rebase_source : 37a34f3fbe866eee71a7bf0bba07d9d67cc8c81d
Right now, NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR expects singleton
constructors to return already-addrefed raw pointers, and while it accepts
constructors that return already_AddRefed, most existing don't do so.
Meanwhile, the convention elsewhere is that a raw pointer return value is
owned by the callee, and that the caller needs to addref it if it wants to
keep its own reference to it.
The difference in convention makes it easy to leak (I've definitely caused
more than one shutdown leak this way), so it would be better if we required
the singleton getters to return an explicit already_AddRefed, which would
behave the same for all callers.
This also cleans up several singleton constructors that left a dangling
pointer to their singletons when their initialization methods failed, when
they released their references without clearing their global raw pointers.
MozReview-Commit-ID: 9peyG4pRYcr
--HG--
extra : rebase_source : 2f5bd89c17cb554541be38444672a827c1392f3f
This makes it clear that the stored string values are never modified.
It requires some const_casts to free the strings, but that feels like an ok
trade-off.
MozReview-Commit-ID: JikBT3uwpfq
--HG--
extra : rebase_source : e611e57de4f059275ae2908f7300065cf953461d
Because nsCString is nicer than UniqueFreePtr<char>.
The patch also streamlines pref_savePrefs(). And also changes StrEscape() to
always put quotations around the result, because that's needed in both call
sites.
MozReview-Commit-ID: HT7HZz4QiSN
--HG--
extra : rebase_source : f8d26a8c9f7ea911272113efc56744df639c5ccf
There's not much use using |protected| in a |final| class.
MozReview-Commit-ID: IECyfNGZsL5
--HG--
extra : rebase_source : bc9597ee45583e809f89f7e558cc325460390f98
It's always gHashTable, and all the other functions in this file work directly
on gHashTable rather than taking a parameter.
MozReview-Commit-ID: BDCEvcMlo8P
--HG--
extra : rebase_source : e5d10e42401136a9a82d665d9717cf71ecf7e4ae
First, the patch removes the return values from PrefTypeFlags::Set*(). They
allow chained calls, but they're barely used and they just make the code harder
to read.
Second, the patch changes pref_SetValue() to not modify and return the pref
flags. It's clearer if the flags changing is done separately. This requires
passing pref_SetValue() the old type instead of the flags.
MozReview-Commit-ID: HZVS2TIlBIY
--HG--
extra : rebase_source : 32950f00975f7d9df63fa0af1c36e82b58516245
It's unnecessarily general, because we only ever use
Preferences::DirtyCallback() as the callback.
And because it's no longer a callback, the patch renames DirtyCallback() as
HandleDirty().
MozReview-Commit-ID: Hl50dcxfVQq
--HG--
extra : rebase_source : f453d31215de3fdb0c5b6176becf2669e7ad55f1
It's simple enough that having a separate function isn't helpful.
MozReview-Commit-ID: Ke9BIfp9yHU
--HG--
extra : rebase_source : de1518544ddb28185635628c33d356ab07480c1c
Preferences.cpp has two functions named pref_DoCallback(). One of them has a
single use in the parser. This patch inlines that single use to remove the name
duplication.
MozReview-Commit-ID: HnyteQ0N5M1
--HG--
extra : rebase_source : 93f963d3ba445c1c3a482fa95dbab33e57dae188
Some odd touchpad utils give focus to window under mouse cursor when user tries
to scroll the content with swiping or something.
This is really odd behavior because some windows like popup windows doesn't
want focus. However, such ones do actually. For making easier to check such
device's behavior, we should have a pref to emulate such behavior.
MozReview-Commit-ID: 6euwpHn7blf
--HG--
extra : rebase_source : cc23f08f422f25f2851404696e06e069c7936186
"Nonsecure HTTP" here just means regular, not-HTTPS HTTP. It doesn't mean HTTPS without the `Secure` cookie flag. Honor the expiration time of third-party cookies set over HTTPS, whether or not they have the `Secure` cookie flag. If a third-party cookie is set over HTTPS and then later sent in nonsecure HTTP request (which is allowed for cookies without the `Secure` cookie flag), the cookie won't be turned into a session cookie unless the nonsecure HTTP response sets a new cookie value.
This feature is controlled by the pref "network.cookie.thirdparty.nonsecureSessionOnly".
MozReview-Commit-ID: HlCg21JyvNC
--HG--
rename : extensions/cookie/test/unit/test_cookies_thirdparty_session.js => extensions/cookie/test/unit/test_cookies_thirdparty_nonsecure_session.js
extra : source : d1be2e4265201efd3ee93e965ac68561f548fd05
extra : intermediate-source : f5b382fa1b70e30a907b1f10d74f8c0c6dff344e
nsIPrefLocalizedString is meant to be a wrapper for nsISupportsString,
basically identical but with a different identifier. But it's not a
sub-interface of nsISupportsString. Instead it (almost) duplicates
nsISupportsString's internals.
Specifically, nsISupportsString has `attribute AString data`, resulting in
these C++ methods:
> NS_IMETHOD GetData(nsAString& aData)
> NS_IMETHOD SetData(const nsAString& aData)
nsIPrefLocalizedString has `attribute wstring data`, resulting in these C++
methods:
> NS_IMETHOD GetData(char16_t** aData)
> NS_IMETHOD SetData(const char16_t* aData)
Then we have nsPrefLocalizedString, the concrete subclass of
nsIPrefLocalizedString. It implements the AString methods via
NS_FORWARD_NSISUPPORTSSTRING, which forwards to mUnicodeString. It also
implements the wstring methods explicitly, and they just call the AString
methods. It's all a bit of a mess.
(Both interfaces also have `wstring toString()`. The forwarding works more
smoothly for that method.)
This patch changes nsIPrefLocalizedString so it is a trivial sub-interface of
nsISupportsString. This change eliminates the need for the wstring methods, so
the patch removes them as well. The net result is we have less code, and fewer
conversions between C strings and Gecko strings. The patch also merges the
nsISupportsString and nsIPrefLocalizedString cases in
nsPrefBranch::SetComplexValue(), because they are now identical. (The
nsISupportsString and nsIPrefLocalizedString cases in
nsPrefBranch::GetComplexValue() remain distinct; indeed, that's the whole
reason for having them as separate interfaces.)
This lets us replace moz_xstrdup() of string literals with AssignLiteral(),
among other improvements.
--HG--
extra : rebase_source : 9994d8ccb4f196cf63564b0dac2ae6c4370defb4
The layout.css.stylo-blocklist.blocked_domains pref is set to "arewestyloyet.rs"
on Nightly, but empty string on Beta. Since we're going to QA the styloblocklist
add-on in Bug 1407911, we make the prefs aligned in both Beta and Nightly in this
patch.
MozReview-Commit-ID: HoleJvVYm7o
--HG--
extra : rebase_source : cb8104f3d7fdb99fe0ea6ee84781c4b421a8f421
This patch declares a new default action, "horizontal scroll", this scrolls
content horizontally with deltaY of wheel events and ignores deltaX and deltaZ.
This is used for default action with Shift key in default setting except on
macOS. On macOS, legacy mouse's vertical wheel operation with Shift key causes
native horizontal wheel event. Therefore, we don't need to use this new
default action on macOS. Additionally, old default action with Shift key,
navigating history, is moved to with Alt key. This makes same settings between
macOS and the others. So, this is better for users who use macOS and another
OS and web app developers who check wheel events only on macOS or other
platform(s).
For simpler implementation, default action handlers moves deltaY values to
deltaX values temporarily *only* while they handle wheel events. This is
performed by AutoWheelDeltaAdjuster and restored after handling it
automatically.
So, in other words, even if default action is "horizontal scroll", web apps
receives wheel events whose deltaY is not zero but its content will be
scrolled horizontally. This is same as Chromium, so, this behavior shouldn't
cause any incompatible behavior with it.
MozReview-Commit-ID: E4X3yZzLEAl
--HG--
extra : rebase_source : e20d854c6b0a181ad4c9e7304bd9ad14256481ff
After data delivery for a request has been retargeted, there's no reliable way
to get the appropriate event target to re-dispatch data events after
asynchronous processing.
While it's technically possible to retrieve the current thread from
OnDataAvailable callbacks and re-use that for later dispatch, that approach
has some issues:
1) It's not currently possible to reliably map the current thread to the
thread pool that owns it. That means that if data delivery is being targetted
to a thread pool, attempts to redispatch events to the previous delivery
thread might lead to long delays when one thread in a pool is blocked.
2) If a filter wishes to dispatch data events to the wrapped listeners before
it's recieved any data (as extensions StreamFilters sometimes do), there's no
way to determine the proper event target without waiting for initial data to
be received.
Simply returning the correct event target from the request solves both of
these problems.
MozReview-Commit-ID: CJxq7O4399R
--HG--
extra : rebase_source : db2f659ecad16daafdbcc108d7b1a51ea1af31f9
This pref is only for webrender layers mode. So we should remove it.
MozReview-Commit-ID: AxPLnc0uO1U
--HG--
extra : rebase_source : daecac41200be2244b0c6dccb66e0d61d7634691
This is possible now that all of libpref is in a single .cpp file.
For some functions, this required moving the comment from the forward
declaration to the definition.
MozReview-Commit-ID: 7XjHENZkc61
--HG--
extra : rebase_source : adc61d0463769c311915139f6e98c2f3187a2d21
Thanks to xidorn's donation, now we can do some real domain testings for stylo
blocklist mechanism. Note that we only add arewestyloyet.rs domain in Nightly
channel for testing, and the domain should be removed in other channels.
MozReview-Commit-ID: Io351w6sg5b
--HG--
extra : rebase_source : 339fdcf754c41f79ef03324697695b8e44a5d261
It's declared in Preferences.h, which Preferences.cpp includes.
MozReview-Commit-ID: 7bjcgsrbfGl
--HG--
extra : rebase_source : ea932402b7eaae876fcba2c0cfdfad2bc728cb8d
We can just use XRE_IsContentProcess() instead, because the pointer return
value is only ever used in a bool context.
MozReview-Commit-ID: 6R4Bwf1cnKU
--HG--
extra : rebase_source : 392e01cfc145f05783c4bdc7aa08486ef07982be
This is detritus from old changes that can be cleaned up now.
The patch removes the declaration of PrefChangedFunc from Preferences.cpp
because it's also in Preferences.h, which is included by Preferences.cpp.
The patch also removes the part of the comment about passing a non-zero result
because it's clearly false -- the callback has no return value.
MozReview-Commit-ID: 72cdauYsRUt
--HG--
extra : rebase_source : 84cbbcea3b0ce3242c629e428be1e81be9cb5792
Their last use was removed in bug 200524, 14.5 years ago.
MozReview-Commit-ID: FoM8KpJNA7m
--HG--
extra : rebase_source : 0c0ffb90a5e8d23cead729b71563ad2249102c96
It's unclear how to compile it; it isn't a proper test, because it just prints
stuff out without explicitly checking anything; and I bet nobody has run it in
a long time.
MozReview-Commit-ID: 48s7pCy7HC6
--HG--
extra : rebase_source : 39d3ba85bd9e45e68b7c7c4cd27b5d7a5a9272b0
Try looks good. Let's turn it on for more tests on Nightly.
MozReview-Commit-ID: 21mQfRmOYag
--HG--
extra : rebase_source : 8f51bd517816deba68dad511a9f859ab1df25baf
extra : intermediate-source : 5150eb8b0826be6578b2d8c68d6d864cc9f55f25
extra : source : 63542cbae67928b936f0472b8dca1f7035759115
This is a mixture of clang-format and manual restyling.
MozReview-Commit-ID: ApLqaQ3KZ5S
--HG--
extra : rebase_source : 4b4ac2f7f05eaa39181005655a62234275b96ff6
This is a mixture of clang-format and manual restyling.
MozReview-Commit-ID: 6S6yUDXQJtE
--HG--
extra : rebase_source : f7f52bd4c2fe9de1d5b6d99bf2daf841e511d913
This is a mixture of clang-format and manual restyling.
MozReview-Commit-ID: G5ipKb1w5L0
--HG--
extra : rebase_source : 232cae37df4d6d41256c76d0616df5d1c53786fd