Commit Graph

249 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
2b0eae6061 Bug 1715134 - Make form control type an enum class. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D117087
2021-06-08 09:43:59 +00:00
Jens Stutte
f2f68509d3 Bug 1690326: Add mappings for ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL and remove error NS_ERROR_FILE_DISK_FULL in favor of existing NS_ERROR_FILE_NO_DEVICE_SPACE r=xpcom-reviewers,necko-reviewers,nika,valentin
Win32 errors ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL need a mapping.
NS_ERROR_FILE_DISK_FULL is duplicate to NS_ERROR_FILE_NO_DEVICE_SPACE
Drive by: RejectJSPromise lacked some NS_ERROR_* mappings

Differential Revision: https://phabricator.services.mozilla.com/D113974
2021-05-06 14:00:06 +00:00
Valentin Gosu
de35210ee3 Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-28 09:33:46 +00:00
Valentin Gosu
b6c4d8cd4d Bug 1574475 - Stop compiling FTP code r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111245
2021-04-28 09:33:45 +00:00
Narcis Beleuzu
33cc31099d Backed out 8 changesets (bug 1574475, bug 1699222) for build bustages on moz.build . CLOSED TREE
Backed out changeset 6c2c039872b3 (bug 1574475)
Backed out changeset 8a2a04743c5f (bug 1699222)
Backed out changeset 9437c60798d6 (bug 1574475)
Backed out changeset 7ef1884ac11b (bug 1574475)
Backed out changeset ec8c237d5298 (bug 1574475)
Backed out changeset 4a760b3f5d53 (bug 1574475)
Backed out changeset b229b0eea1e7 (bug 1574475)
Backed out changeset 03d34a2f10a6 (bug 1574475)
2021-04-22 18:10:59 +03:00
Valentin Gosu
db2d8bb0bc Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-22 13:41:34 +00:00
Valentin Gosu
a6cb0bf452 Bug 1574475 - Stop compiling FTP code r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111245
2021-04-22 13:41:32 +00:00
Tim Huang
5a8c1b586c Bug 1695050 - Part 8: Update the call-site of CookieJarSettings::Create() for WebBrowserPersist. r=smaug
This patch updates the call-site in WebBrowserPersist to pass the
correct enum according to if it is in the private browsing mode.

Differential Revision: https://phabricator.services.mozilla.com/D109051
2021-03-29 11:01:53 +00:00
Simon Giesecke
cc730d05dd Bug 1184468 - Use nsTHashtable::Keys where possible. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108588
2021-03-24 17:56:50 +00:00
Simon Giesecke
613e20d136 Bug 1184468 - Use nsBaseHashtable::Values. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D108587
2021-03-24 17:56:49 +00:00
Simon Giesecke
b9621d6376 Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag
Differential Revision: https://phabricator.services.mozilla.com/D108585
2021-03-17 15:49:46 +00:00
Simon Giesecke
be612ff84b Bug 1695864 - Remove redundant mURIMap iteration in nsWebBrowserPersist::SerializeNextFile. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D106885
2021-03-10 10:37:05 +00:00
Simon Giesecke
9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke
661e25bf09 Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
Simon Giesecke
57d2e18fa4 Bug 1692830 - Remove redundant nullptr checks after new in nsWebBrowserPersist.cpp. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105164
2021-02-15 16:37:52 +00:00
smolnar
1afbbe67e1 Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke
3c29a68440 Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Nika Layzell
63fd915bfb Bug 1689147 - Part 1: Add extended attribute syntax to IPDL, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D103366
2021-02-09 16:50:21 +00:00
Masatoshi Kimura
3424a95ee0 Bug 1682103 - Make nsContentPolicyType a CEnum type. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D99580
2020-12-16 11:36:47 +00:00
Andreas Farre
bc9d118342 Bug 1668682 - Don't try to save browsing contexts without window. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D98190
2020-12-01 10:11:11 +00:00
Simon Giesecke
5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Simon Giesecke
d3f2ef0d0c Bug 1660470 - Avoid including ReferrerInfoUtils.h from header files. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93558

Depends on D93557
2020-11-23 16:05:56 +00:00
Simon Giesecke
971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Tim Huang
7ec26df273 Bug 1641270 - Part 6: Pass CookieJarSettings to nsIWebBrowserPersist.saveURI() and nsIWebBrowserPersist.savePrivacyAwareURI(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D95616
2020-11-11 18:19:27 +00:00
Tim Huang
a2f2e35e51 Bug 1641270 - Part 2: Make WebBrowserPersistDocument aware of CookieJarSettings. r=smaug
In this patch, we add cookieJarSettings in WebBrowserPersistDocument.
This is needed if we want to use the correct cookieJarSettings when
download the page or URI.

Differential Revision: https://phabricator.services.mozilla.com/D95612
2020-11-11 11:14:00 +00:00
Mihai Alexandru Michis
4038013e6f Backed out 9 changesets (bug 1641270) for causing dt failures in browser_jsonview_save_json.js
CLOSED TREE

Backed out changeset 89a6dab92f1a (bug 1641270)
Backed out changeset 5f9c5af66b77 (bug 1641270)
Backed out changeset dfeb879f4131 (bug 1641270)
Backed out changeset 143728b1b1ab (bug 1641270)
Backed out changeset 265ae2953416 (bug 1641270)
Backed out changeset 55ea7810c160 (bug 1641270)
Backed out changeset 7bef9112f296 (bug 1641270)
Backed out changeset 2663dc1e9a3e (bug 1641270)
Backed out changeset fcba6dba3649 (bug 1641270)
2020-11-11 13:10:11 +02:00
Tim Huang
29e828489a Bug 1641270 - Part 6: Pass CookieJarSettings to nsIWebBrowserPersist.saveURI() and nsIWebBrowserPersist.savePrivacyAwareURI(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D95616
2020-11-10 20:43:03 +00:00
Tim Huang
cc4149ee76 Bug 1641270 - Part 2: Make WebBrowserPersistDocument aware of CookieJarSettings. r=smaug
In this patch, we add cookieJarSettings in WebBrowserPersistDocument.
This is needed if we want to use the correct cookieJarSettings when
download the page or URI.

Differential Revision: https://phabricator.services.mozilla.com/D95612
2020-11-10 20:36:22 +00:00
Andi-Bogdan Postelnicu
6121332b48 Bug 1626555 - Add dom/webbrowserpersist to the list of non-unified-build-compatible directories. r=sg
Depends on D96590

Differential Revision: https://phabricator.services.mozilla.com/D96593
2020-11-10 16:18:01 +00:00
Andreas Farre
1e4c7e1c01 Bug 1599616 - Don't try to save document when document actor has been destroyed. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D94733
2020-10-26 19:19:51 +00:00
Ricky Stewart
02a7b4ebdf Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
c0cea3b0fa Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca
1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
50762dacab Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Emilio Cobos Álvarez
0d0fd8f578 Bug 1668414 - Also handle <source srcset>. r=edgar
Thanks for asking me to add a test ;)

Using the image responsive selector works for scanning the srcset images, but
since we wouldn't rewrite the <source> uris the invalid urls would still have
preference.

Differential Revision: https://phabricator.services.mozilla.com/D92264
2020-10-05 13:44:48 +00:00
Emilio Cobos Álvarez
fcb066e784 Bug 1668414 - Handle srcset in WebBrowserPersist. r=edgar
Rewrite the srcset URIs appropriately...

This code was completely untested (modulo one test for forms...) I added a
generic reftest framework to compare original vs. persisted document, so that
testing changes to this code is easier next time.

Differential Revision: https://phabricator.services.mozilla.com/D92133
2020-10-05 13:11:37 +00:00
Noemi Erli
c5fb41cb91 Backed out 2 changesets (bug 1668414) for causing build bustages in WebBrowserPersistLocalDocument.cpp CLOSED TREE
Backed out changeset 94a576dd5f89 (bug 1668414)
Backed out changeset cef0f66ca3e7 (bug 1668414)
2020-10-05 15:51:57 +03:00
Emilio Cobos Álvarez
abf16513fe Bug 1668414 - Also handle <source srcset>. r=edgar
Thanks for asking me to add a test ;)

Using the image responsive selector works for scanning the srcset images, but
since we wouldn't rewrite the <source> uris the invalid urls would still have
preference.

Differential Revision: https://phabricator.services.mozilla.com/D92264
2020-10-05 09:45:19 +00:00
Emilio Cobos Álvarez
d52ce2e888 Bug 1668414 - Handle srcset in WebBrowserPersist. r=edgar
Rewrite the srcset URIs appropriately...

This code was completely untested (modulo one test for forms...) I added a
generic reftest framework to compare original vs. persisted document, so that
testing changes to this code is easier next time.

Differential Revision: https://phabricator.services.mozilla.com/D92133
2020-10-02 16:32:07 +00:00
Gijs Kruitbosch
652be82e93 Bug 1665299 - remove diagnostic assert for failing too often without reproducible steps, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91585
2020-09-28 13:47:06 +00:00
Gijs Kruitbosch
2a6d61ec20 Bug 1665299 - no-op when cancelling causes us to call EndDownload more than once in webbrowserpersist to avoid crashes, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D91083
2020-09-23 18:11:18 +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
Gijs Kruitbosch
90b9ab56dc Bug 1663499 - fix ending webbrowserpersist downloading so it only happens once, r=valentin
This fixes a few causes of firing EndDownload twice:

1. firing it from OnDataAvailable if the download was already canceled when the
   method was initially invoked, rather than if we are ourselves wanting to
   cancel the download because we encountered issues inside OnDataAvailable.
2. firing it from FinishDownload, dispatched from SerializeNextFile, after the
   download has already been ended elsewhere.
3. calling Cancel() multiple times.

It also adds some code to avoid the re-entrancy on the Promise code that the
bug was originally filed for, and a diagnostic assert to check if there are any
other cases of repeated EndDownload calling that we've missed.

As a driveby, it adds a few thread assertions to help with code clarity.

Differential Revision: https://phabricator.services.mozilla.com/D90186
2020-09-15 07:17:00 +00:00
Andreas Farre
b94d642e80 Bug 1662131 - Fix history getters for web browser persist. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D88979
2020-09-08 13:06:29 +00:00
Gijs Kruitbosch
58651be5dd Bug 1658202 - move flushes caused by closing the stream away from the main thread, r=valentin
Depends on D88730

Differential Revision: https://phabricator.services.mozilla.com/D88731
2020-09-02 23:15:21 +00:00
Gijs Kruitbosch
dd70279b17 Bug 1658202 - move writes from onDataAvailable away from the main thread, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D88730
2020-09-02 23:15:06 +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
Butkovits Atila
89f1fe4aaa Backed out 2 changesets (bug 1658202) for failures at test_DownloadLegacy.js. CLOSED TREE
Backed out changeset 577001cf12ad (bug 1658202)
Backed out changeset bc244bc15836 (bug 1658202)
2020-09-01 23:50:39 +03:00
Gijs Kruitbosch
a4f51cac34 Bug 1658202 - move flushes caused by closing the stream away from the main thread, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D88731
2020-09-01 00:14:26 +00:00