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

10806 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 04027a5656 Bug 1607131 - Make `beforeinput` event for `MozEditableElement.setUserInput()` not cancelable by default r=smaug
Blink and WebKit do not fire `beforeinput` event when user uses build-in
password manager and autocomplete.  But the `inputType` value for this case,
`"insertReplacementText"` is defined as cancelable in the spec, and it's
actually cancelable when it's fired for correcting a word with built-in
spellchecker of them.

For making only our users' autocomplete and password manager not blocked by
web apps, we should make them not cancelable by default, but I think that we
should keep dispatching such non-cancelable `beforeinput` for conforming to
the standard unless we'd get a web-compat report for this.

Differential Revision: https://phabricator.services.mozilla.com/D93206
2020-10-20 00:13:43 +00:00
Alex Henrie a1acf45525 Bug 1671749 - Remove workaround for MinGW from nsAuthSSPI destructor. r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D93874
2020-10-19 14:44:44 +00:00
Andrea Marchesini 29ccb54ede Bug 1641611 - PermissionManager should take the largest ID considering the expired permissions too, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D92887
2020-10-13 16:43:37 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Nathan Froyd cfb8fb313f Bug 1662251 - stop assigning from NS_Convert* values, mostly; r=sg
This patch was generated by running:

```
perl -p -i \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF8toUTF16\((.*)\);/\1CopyUTF8toUTF16(\3, \2);/;' \
     -e 's/^(\s+)([a-zA-Z0-9.]+) = NS_ConvertUTF16toUTF8\((.*)\);/\1CopyUTF16toUTF8(\3, \2);/;' \
     $FILE
```

against every .cpp and .h in mozilla-central, and then fixing up the
inevitable errors that happen as a result of matching C++ expressions with
regexes.  The errors fell into three categories:

1. Calling the convert functions with `std::string::c_str()`; these were
   changed to simply pass the string instead, relying on implicit conversion
   to `mozilla::Span`.
2. Calling the convert functions with raw pointers, which is not permitted
   with the copy functions; these were changed to invoke `MakeStringSpan` first.
3. Other miscellaneous errors resulting from over-eager regexes and/or the
   replacement not being type-aware.  These changes were reverted.

Differential Revision: https://phabricator.services.mozilla.com/D88903
2020-09-02 09:54:37 +00:00
Emilio Cobos Álvarez 0c03ba166c Bug 1658471 - Remove dom.security.featurePolicy.enabled. r=baku
We've shipped it on by default since 74 (bug 1617219).

Differential Revision: https://phabricator.services.mozilla.com/D86665
2020-08-12 10:57:04 +00:00
Valentin Gosu 06b00d0bf4 Bug 1657582 - Add nsIDNSAddrRecord interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,dragana
This interface extends nsIDNSRecord and makes the DNS code more extensible
by allowing us to support more record types.
This change does require the consumer to be aware of the type they requested
and to QueryInterface to either nsIDNSAddrRecord for regular IP lookups,
or to nsIDNSByTypeRecord for other kinds of lookups.

Differential Revision: https://phabricator.services.mozilla.com/D86177
2020-08-12 10:49:39 +00:00
Tim Huang aaf012c1e2 Bug 1654803 - Fixing the crash issue in PermissionDelegateHandler::GetPermission(). r=baku
At very rare situations, we won't be able to get the top level window
context. Perhaps, it's the case that the window has been detached from
the dom tree while checking the permission. So, we need to check the top
level window context before we really use it.

Differential Revision: https://phabricator.services.mozilla.com/D85978
2020-08-12 07:53:35 +00:00
Bogdan Tara 694b77183c Backed out 2 changesets (bug 1657582) for test_DNSLookup.js failures CLOSED TREE
Backed out changeset 784122a5f5ab (bug 1657582)
Backed out changeset 0f17312b01ad (bug 1657582)
2020-08-12 11:18:06 +03:00
Valentin Gosu 5eeaf52395 Bug 1657582 - Add nsIDNSAddrRecord interface r=necko-reviewers,geckoview-reviewers,snorp,mixedpuppy,dragana
This interface extends nsIDNSRecord and makes the DNS code more extensible
by allowing us to support more record types.
This change does require the consumer to be aware of the type they requested
and to QueryInterface to either nsIDNSAddrRecord for regular IP lookups,
or to nsIDNSByTypeRecord for other kinds of lookups.

Differential Revision: https://phabricator.services.mozilla.com/D86177
2020-08-12 01:35:10 +00:00
shravanrn 571754630f Bug 1657573: Change libhunspell's file access code to use function pointers r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D86173
2020-08-10 15:29:25 +00:00
Gijs Kruitbosch 7be797a434 Bug 1654098 - fix a few racist epithets missing 'exclude from suggestions' annotation, r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D86559
2020-08-10 15:21:20 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Andreas Farre b13577d8e4 Bug 1613431 - Part 3: Handle synced setters return value. r=nika
Depends on D83646

Differential Revision: https://phabricator.services.mozilla.com/D83647
2020-07-31 13:37:13 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Doug Thayer 8f54209ef6 Bug 1651165 - Rename idle service r=Gijs,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83413
2020-07-20 16:06:59 +00:00
Simon Giesecke fea9dab7f2 Bug 1651714 - Reduce expensive includes for TabMessageUtils.h. r=smaug
With these changes, on my Linux analysis with ClangBuildAnalyzer, the
top two expensive headers, DOMTypes.h and TabMessageUtils.h are no longer
among the 30 most expensive headers.

Differential Revision: https://phabricator.services.mozilla.com/D82935
2020-07-15 13:24:20 +00:00
Frederik Braun a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Andrea Marchesini 93c5659e4a Bug 1644896 - Reintroduce an EnsureReadCompleted() in PermissionManager, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D83465
2020-07-14 07:36:14 +00:00
Andrea Marchesini 5a7b4e2136 Bug 1644896 - Add the shutdown blocker during the PermissionManager::initDB, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D83360
2020-07-14 07:23:57 +00:00
Andrea Marchesini 2aa62ff0f3 Bug 1644896 - Destroy PermissionManager on shutdown, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D82211
2020-07-13 20:18:40 +00:00
Dorel Luca e0ac748fab Backed out 2 changesets (bug 1644896) for XPCshell failures on widget/headless/tests/test_headless.js. CLOSED TREE
Backed out changeset f501e7db25a8 (bug 1644896)
Backed out changeset 2d984add3abb (bug 1644896)
2020-07-13 23:11:40 +03:00
Andrea Marchesini c14aa7655d Bug 1644896 - Add the shutdown blocker during the PermissionManager::initDB, r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D83360
2020-07-13 17:48:30 +00:00
Andrea Marchesini 8a5c2d57b1 Bug 1644896 - Destroy PermissionManager on shutdown, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D82211
2020-07-13 17:48:20 +00:00
Bogdan Tara 51562a8355 Backed out changeset 73b12096811d (bug 1644896) for mochitest crashes CLOSED TREE 2020-07-13 12:32:28 +03:00
Andrea Marchesini 6955bc5543 Bug 1644896 - Destroy PermissionManager on shutdown, r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D82211
2020-07-13 08:23:27 +00:00
Kris Maglione 9d78661f88 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Kris Maglione 6a39211860 Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
2020-07-09 21:42:25 +00:00
Csoregi Natalia b355fcc4bf Backed out 6 changesets (bug 1464542) for xpcshell failures on test_Services.js. CLOSED TREE
Backed out changeset b50af9005851 (bug 1464542)
Backed out changeset 9d3a0ea2cf65 (bug 1464542)
Backed out changeset 71c3475fcbc2 (bug 1464542)
Backed out changeset 51ff93220a95 (bug 1464542)
Backed out changeset e84de1547c09 (bug 1464542)
Backed out changeset bbecc16d08eb (bug 1464542)
2020-07-09 23:19:26 +03:00
Kris Maglione d09458dc51 Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D81419
2020-07-09 17:59:16 +00:00
Simon Giesecke 61e4a0be9b Bug 1649729 - Get rid of MOZ_ACCESS_THREAD_BOUND macro. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81843
2020-07-01 13:13:23 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke e3c223da3e Bug 1648010 - Fix uses of NS_LITERAL_STRING with C string literals. r=geckoview-reviewers,agi,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80861
2020-07-01 08:34:12 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Andrea Marchesini 788cd2c41f Bug 1649404 - Enforce the reading completeness in any PermissionManager methods, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D81681
2020-06-30 18:34:51 +00:00
Andrea Marchesini 5b1b63de75 Bug 1648134 - Permission Manager does not save changes when scope is changed., r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D81292
2020-06-30 09:44:00 +00:00
Csoregi Natalia adaed940e7 Backed out changeset 34d09061d827 (bug 1648134) for failures on test_permmanager_remove_add_update.js. CLOSED TREE 2020-06-29 20:43:54 +03:00
Andrea Marchesini dc7bad122c Bug 1648134 - Permission Manager does not save changes when scope is changed., r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D81292
2020-06-29 14:37:19 +00:00
Tim Huang 1d1ef81356 Bug 1645997 - Use BrowsingContext to get the top-level window context in PermissionDelegateHandler.cpp r=baku
We used the Document::GetWindowContext() to get the window context
related to the doucment. But, this could return a nullptr if the
document is detached from the window or the docuemnt is destoried.

We move to use the BrowsingContext instead which won't return a nullptr
in these cases.

Differential Revision: https://phabricator.services.mozilla.com/D79897
2020-06-19 12:31:29 +00:00
Henri Sivonen d5b9be12ce Bug 1603712 - Remove intl.charset.detector.ng.enabled pref and resulting dead code. r=Gijs,fluent-reviewers,valentin,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D79101
2020-06-15 15:32:21 +00:00
Tim Huang f5adef2650 Bug 1587743 - Part 3: Using WindowContext to test delegated permissions. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D79134
2020-06-12 16:32:03 +00:00
Tim Huang 8422436b6c Bug 1587743 - Part 2: Removing mTopLevelPrincipal from the PermissionDelegateHandler. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D79133
2020-06-12 16:31:56 +00:00
Tim Huang eab7aa2b87 Bug 1587743 - Part 1: Pre-compute the delegated permissions for the top-level content and store it in the WindowContext. r=baku,nika
In order to delegate the permission to the top-level window, in this
patch, we pre-compute the permissions of the top-level context and set
them to the top-level WindowContext. So, the cross-origin iframe can
know the permission of the top-level window through the WindowContext.
Thus, the permission can be delegated in Fission.

Differential Revision: https://phabricator.services.mozilla.com/D79132
2020-06-12 16:31:49 +00:00
Haik Aftandilian b1f63ced7e Bug 1632845 - Firefox gets stuck when quit from the dock if the user cancels quitting from a beforeunload prompt r=Gijs,spohl,necko-reviewers,geckoview-reviewers,dragana,agi
Return NSTerminateCancel from applicationShouldTerminate when the user chooses to "Stay on Page".

Differential Revision: https://phabricator.services.mozilla.com/D78839
2020-06-09 18:20:36 +00:00
Dimi Lee 53b848ce2f Bug 1644073 - Remove storageAccessAPI permission from preload list r=baku
We add storageAccessAPI permission to perload list in Bug 1499442.

In the recent ETP fission works, we have ensured that the user interaction
permission check can only happen either in the parent process or in the
content processes that load principal to check. This means we don't need
to preload it anymore.

Differential Revision: https://phabricator.services.mozilla.com/D78639
2020-06-08 11:24:05 +00:00