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

214 Коммитов

Автор SHA1 Сообщение Дата
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
Gijs Kruitbosch 0cfd62dcbc Bug 1658202 - move writes from onDataAvailable away from the main thread, r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D88730
2020-09-01 07:18:38 +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
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 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
Simon Giesecke 82dc9b2271 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 10:46:14 +00:00
Butkovits Atila e3dce68834 Backed out 3 changesets (bug 1643289, bug 1642949) for causing failure at test_headless_screenshot.html. CLOSED TREE
Backed out changeset 98c420f73380 (bug 1643289)
Backed out changeset 9447ea8910aa (bug 1643289)
Backed out changeset 0c827da9d847 (bug 1642949)
2020-06-10 10:07:23 +03:00
Simon Giesecke d419f0ff08 Bug 1642949 - Replace uses of RemoveElementAt by RemoveLastElement/PopLastElement where possible. r=necko-reviewers,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78027
2020-06-10 05:49:28 +00:00
Peter Van der Beken 1990918ebe Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-20 09:09:06 +00:00
Csoregi Natalia 517e830522 Backed out 4 changesets (bug 1629866, bug 1570255) for assertion failures on DocumentChannelChild.cpp. CLOSED TREE
Backed out changeset 214e4a11be0d (bug 1570255)
Backed out changeset db066dda1bb8 (bug 1570255)
Backed out changeset d9f75d88613e (bug 1570255)
Backed out changeset fe2d4790b73a (bug 1629866)
2020-05-13 18:30:42 +03:00
Peter Van der Beken e2a88c491c Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-13 14:24:55 +00:00
ssengupta cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Andreas Farre 6adf2b375d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-27 05:41:40 +00:00
Dorel Luca c2d429f9a0 Backed out 2 changesets (bug 1576188) for Build bustage in docshell/base/BrowsingContext.cpp. CLOSED TREE
Backed out changeset 7e5e86986811 (bug 1576188)
Backed out changeset b731cbad59a8 (bug 1576188)
2020-04-24 23:02:11 +03:00
Andreas Farre 55a186014d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-24 15:47:26 +00:00
Arthur Iakab c278cf13d3 Backed out 2 changesets (bug 1576188) for causing browser-chrome failures on browser_persist_cross_origin_iframe.js
CLOSED TREE

Backed out changeset d2c102f8d898 (bug 1576188)
Backed out changeset 9ddd9a63d178 (bug 1576188)
2020-04-23 19:38:58 +03:00
Andreas Farre 6a4f39685d Bug 1576188 - Handle save-as for cross process iframes. r=peterv
Depends on D70388

Differential Revision: https://phabricator.services.mozilla.com/D70389
2020-04-23 13:56:26 +00:00
Emilio Cobos Álvarez e511882ec8 Bug 1627536 - Avoid silly string copying in nsWebBrowserPersit. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D69747

--HG--
extra : moz-landing-system : lando
2020-04-06 15:37:49 +00:00
sonakshi b204bf50aa Bug 1551306 - Remove context parameter from nsIProgressEventSink.onProgress() and nsIProgressEventSink.onStatus() r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68235

--HG--
extra : moz-landing-system : lando
2020-03-29 19:18:56 +00:00
Cosmin Sabou 79929c6462 Backed out changeset ad4847d17298 (bug 1551306) for causing build bustages. CLOSED TREE 2020-03-27 20:24:17 +02:00
sonakshi 145046fde2 Bug 1551306 - Remove context parameter from nsIProgressEventSink.onProgress() and nsIProgressEventSink.onStatus() r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68235

--HG--
extra : moz-landing-system : lando
2020-03-27 17:57:10 +00:00
Mihai Alexandru Michis c1256a18a6 Backed out changeset d91e4acdd63c (bug 1551306) for causing bustages in request::InitBitsRequest
CLOSED TREE
2020-03-27 16:12:47 +02:00
sonakshi b5f7fb3be7 Bug 1551306 - Remove context parameter from nsIProgressEventSink.onProgress() and nsIProgressEventSink.onStatus() r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D68235

--HG--
extra : moz-landing-system : lando
2020-03-27 14:05:02 +00:00
Simon Giesecke 29f7669a77 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/webbrowserpersist. r=smaug
Depends on D66031

Differential Revision: https://phabricator.services.mozilla.com/D66032

--HG--
extra : moz-landing-system : lando
2020-03-09 14:57:23 +00:00
Tim Huang 04d44bae12 Bug 1616570 - Part 1: Rename CookieSettings to CookieJarSettings. r=Ehsan
Given that we are going to add ContentBlockingAllowList in
CookieSettings, so CookieSettings will be responsible for more stuff than the
cookie behavior and cookie permission. We should use a proper name to
reflect the purpose of it. The name 'CookieSettings' is misleading that
this is only for cookie related stuff. So, we decide to rename
'CookieSettins' to 'CookieJarSettings' which serves better meaning here.

Differential Revision: https://phabricator.services.mozilla.com/D63935

--HG--
rename : netwerk/cookie/CookieSettings.cpp => netwerk/cookie/CookieJarSettings.cpp
rename : netwerk/cookie/nsICookieSettings.idl => netwerk/cookie/nsICookieJarSettings.idl
extra : moz-landing-system : lando
2020-03-04 08:59:08 +00:00
Marco Bonardo 636a4b4b19 Bug 1612403 - File extensions are duplicated for file inputs with custom 'accept'. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D63071

--HG--
extra : moz-landing-system : lando
2020-02-21 08:30:30 +00:00
Simon Giesecke b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli 91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Gijs Kruitbosch 0606b71ddb Bug 1526731 - pass content policy to webbrowserpersist to improve image request headers, r=smaug,johannh
Differential Revision: https://phabricator.services.mozilla.com/D60567

--HG--
extra : moz-landing-system : lando
2020-01-23 08:36:00 +00:00
Eric Rahm 78ee6675cf Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59042

--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Emilio Cobos Álvarez b2fe832c7b Bug 1603313 - Remove some silly patterns. r=bzbarsky
foo ? true : false

or:

  foo ? false : true

Have always a nicer way to be written.

Differential Revision: https://phabricator.services.mozilla.com/D56842

--HG--
extra : moz-landing-system : lando
2019-12-14 05:05:01 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Emilio Cobos Álvarez 3c12d374bc Bug 1600362 - Cleanup IntersectionObserver. r=smaug
Initially this was going to be a simple cleanup: Remove some useless namespaces
here and there and so on, remove `using` statements from the header and so on.

But unfortunately, DOMIntersectionObserver.h (which is included in Element.h,
unnecessarily) ended up exposing `Element` unnamespaced to a lot of code, so I
had to fix that.

Differential Revision: https://phabricator.services.mozilla.com/D55316

--HG--
extra : moz-landing-system : lando
2019-11-29 20:39:36 +00:00