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

59 Коммитов

Автор SHA1 Сообщение Дата
Ray Kraesig 051f1ddc72 Bug 1858225 - [9/9] remove async-to-sync code from Windows build r=win-reviewers,mhowell
This is no longer needed on Windows, so #ifdef it out.

Differential Revision: https://phabricator.services.mozilla.com/D193741
2023-12-01 05:03:21 +00:00
Cosmin Sabou c3f8e90d2c Backed out 11 changesets (bug 1858225) for causing build bustages on nsFilePicker.cpp. CLOSED TREE
Backed out changeset 808f68da4438 (bug 1858225)
Backed out changeset e6f456e40dda (bug 1858225)
Backed out changeset d1efbf517c7e (bug 1858225)
Backed out changeset 61c8a62b47c5 (bug 1858225)
Backed out changeset 9b1f0d37b74b (bug 1858225)
Backed out changeset f57ac4a387f2 (bug 1858225)
Backed out changeset 9b2c6eaf137e (bug 1858225)
Backed out changeset 6aacb8fde7e1 (bug 1858225)
Backed out changeset 2eb38cba55d6 (bug 1858225)
Backed out changeset c31dfa5f9be5 (bug 1858225)
Backed out changeset 82b7b851c429 (bug 1858225)
2023-12-01 00:18:29 +02:00
Ray Kraesig 402c2dcacb Bug 1858225 - [9/9] remove async-to-sync code from Windows build r=win-reviewers,mhowell
This is no longer needed on Windows, so #ifdef it out.

Differential Revision: https://phabricator.services.mozilla.com/D193741
2023-11-30 19:59:18 +00:00
Mike Conley 88ab9ee914 Bug 1852839 - Part 1: Add nsIFilePicker.isModeSupported method. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D188131
2023-09-19 19:44:50 +00:00
Cosmin Sabou 787c9b77e5 Backed out 2 changesets (bug 1852839) for causing build bustages on nsFilePicker.cpp. CLOSED TREE
Backed out changeset ac93fddded79 (bug 1852839)
Backed out changeset 6235d3df9ecf (bug 1852839)
2023-09-19 21:36:34 +03:00
Mike Conley 31ed4f9d8f Bug 1852839 - Part 1: Add nsIFilePicker.isModeSupported method. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D188131
2023-09-19 17:57:39 +00:00
Calixte 6d1866ff5f Bug 1844530 - Add an option to filter pdf files in the file chooser r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D184092
2023-07-21 06:59:05 +00:00
Ray Kraesig 4c1e9764aa Bug 1838244 - [1/1] Resolve special directory paths in the parent process r=gstoll
Avoid (one instance of) loading `shell32.dll` in the content process by
delaying the resolution of special-directory names to paths until
they're passed up into the client process.

Differential Revision: https://phabricator.services.mozilla.com/D180988
2023-06-15 20:04:06 +00:00
Ray Kraesig 7b51dc72b7 Bug 1816740 [5/6] - convert nsIFilePicker::capture* to a proper enum r=ipc-reviewers,karlt,mstange,handyman,nika
Convert the various capture* constants in nsIFilePicker into a proper
enum, and perform validation when passing it across IPC.

Additionally, unlike the previous two enums, reduce the size of
CaptureTarget to 8 bits. This is a workaround for its use with
nsAttrValue, which at present very specifically requires that parseable
enums' values fit within an `int16_t` -- and a `uint16_t` does not.

Differential Revision: https://phabricator.services.mozilla.com/D169854
2023-02-22 21:05:24 +00:00
Ray Kraesig fa4832237d Bug 1816740 [4/6] - convert nsIFilePicker::mode* into a proper enum r=ipc-reviewers,karlt,mstange,handyman,nika
Convert the various mode* constants in nsIFilePicker into a proper
enum, and perform validation when passing it across IPC.

Differential Revision: https://phabricator.services.mozilla.com/D169853
2023-02-22 21:05:24 +00:00
Ray Kraesig 8ff42fa236 Bug 1816740 [3/6] - convert nsIFilePicker::result* into a proper enum r=ipc-reviewers,karlt,mstange,handyman,nika
Convert the various result* constants in nsIFilePicker into a proper
enum, and perform validation when passing it across IPC.

Differential Revision: https://phabricator.services.mozilla.com/D169852
2023-02-22 21:05:23 +00:00
Alexis Beingessner 07f2f659c6 Bug 1686616 - make StringBundle use Components instead of Services. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D105531
2021-02-18 13:26:32 +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 cb0734d274 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in widget. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D66012

--HG--
extra : moz-landing-system : lando
2020-03-16 10:56:57 +00:00
Bogdan Tara c60fd3fdd2 Backed out 4 changesets (bug 1613985) for causing build bustages CLOSED TREE
Backed out changeset fba0caac746c (bug 1613985)
Backed out changeset 8605d7a19107 (bug 1613985)
Backed out changeset 41e858fbf235 (bug 1613985)
Backed out changeset 847433cf1e0a (bug 1613985)
2020-03-16 12:41:41 +02:00
Simon Giesecke 2d961c08ab Bug 1613985 - Use default for equivalent-to-default constructors/destructors in widget. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D66012

--HG--
extra : moz-landing-system : lando
2020-03-16 09:14:12 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ 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/D55444

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Andrea Marchesini 410cb724a7 Bug 1585284 - Force global in Blob CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49629

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:19 +00:00
Andrea Marchesini 6797e45278 Bug 1585284 - Use nsIGlobalObject in any Blob/File CTOR, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49392

--HG--
extra : moz-landing-system : lando
2019-10-21 05:33:33 +00:00
Dylan Roeh 1e945a8dd6 Bug 1553603 - Support "capture" attribute in Gecko and expose in GV. r=geckoview-reviewers,smaug,snorp,agi
Differential Revision: https://phabricator.services.mozilla.com/D38746

--HG--
extra : moz-landing-system : lando
2019-07-30 18:13:05 +00:00
Boris Zbarsky 86cc26b364 Bug 1543564 part 3. Get rid of pointless nsPIDOMWindowOuter::GetOuterWindow method. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D27028

--HG--
extra : moz-landing-system : lando
2019-04-11 14:14:15 +00:00
Dylan Roeh 44dab4cd06 Bug 1514364 - Add appendRawFilter to nsIFilePicker to expose actual accept filters to GV for onFilePrompt. r=snorp, smaug 2019-01-24 10:21:05 -06:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrew McCreight ea6021b769 Bug 1494127 - Fix trivial calls to do_QueryInterface that return an nsresult r=smaug
Calls to do_QueryInterface to a base class can be replaced by a static
cast, which is faster.

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

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:43 +00:00
Kris Maglione 2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

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

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Kris Maglione 65c28aa0ad Bug 1484496: Part 2 - Add common base class for all nsISimpleEnumerator implementations. r=froydnj
In order to allow JS callers to use nsISimpleEnumerator instances with the JS
iteration protocol, we'll need to additional methods to every instance. Since
we currently have a large number of unrelated implementations, it would be
best if they could share the same implementation for the JS portion of the
protocol.

This patch adds a stub nsSimpleEnumerator base class, and updates all existing
implementations to inherit from it. A follow-up will add a new base interface
to this class, and implement the additional functionality required for JS
iteration.

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

--HG--
extra : rebase_source : ad66d7b266856d5a750c772e4710679fab9434b1
extra : histedit_source : a83ebffbf2f0b191ba7de9007f73def6b9a955b8
2018-08-18 14:22:47 -07:00
Kris Maglione d92e63a9a9 Bug 1463299: Add RefPtr::forget special case for ambiguous nsISupports casts. r=bz
When we use RefPtr with nsISupports sub-classes, it's usually because the type
cannot be unambiguously cast to nsISupports. We already have a ToSupports
generic function to resolve ambiguity in these cases, so we may as well use
it here.

MozReview-Commit-ID: FaHhPKAPn6j

--HG--
extra : rebase_source : dd8f3707bdebedfe559aed0caf2c3b0c49163735
extra : histedit_source : 9805787a169329b9c739dfa456cfe6a61a22b7d7
2018-05-21 17:23:10 -07:00
Kris Maglione 8134b33e89 Bug 1462964: Remove obsolete nsIDOMBlob interface. r=bz
MozReview-Commit-ID: 2HIlaSrvfBe

--HG--
extra : rebase_source : 944a6244dbfe1f0a37dd34a041d1329624a86f93
extra : histedit_source : d7859be664fed00f8504e40969480d3af3d674e7%2C4456b502db338bd06823654306e47c2583101396
2018-05-21 17:32:44 -07:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Masatoshi Kimura 5b97708fef Bug 1387800 - Remove [deprecated] nsIFilePicker.show(). r=qdot
MozReview-Commit-ID: 81ZkeYdSPVW

--HG--
extra : rebase_source : 2f30565b8d5986ef6265027562f9842d0db2688e
2017-08-06 13:15:31 +09:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Nicholas Nethercote c86dc10505 Bug 1380227 - Avoid many UTF16toUTF8 and UTF8toUTF16 conversions in nsStringBundle. r=emk.
Most of the names passed to nsIStringBundle::{Get,Format}StringFromUTF8Name
have one of the two following forms:

- a 16-bit C string literal, which is then converted to an 8-bit string in
  order for the lookup to occur;

- an 8-bit C string literal converted to a 16-bit string, which is then
  converted back to an 8-bit string in order for the lookup to occur.

This patch introduces and uses alternative methods that can take an 8-bit C
string literal, which requires changing some signatures in other methods and
functions. It replaces all C++ uses of the old methods.

The patch also changes the existing {Get,Format}StringFromName() methods so
they take an AUTF8String argument for the name instead of a wstring, because
that's nicer for JS code.

Even though there is a method for C++ code and a different one for JS code,
|binaryname| is used so that the existing method names can be used for the
common case in both languages.

The change reduces the number of NS_ConvertUTF8toUTF16 and
NS_ConvertUTF16toUTF8 conversions while running Speedometer v2 from ~270,000 to
~160,000. (Most of these conversions involved the string
"deprecatedReferrerDirective" in nsCSPParser.cpp.)

--HG--
extra : rebase_source : 3bee57a501035f76a81230d95186f8c3f460ff8e
2017-07-12 15:13:37 +10:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Andrea Marchesini 8beb8af7d4 Bug 1357846 - Introducing nsIFilePicker.displaySpecialDirectory, r=smaug
nsIFilePicker.displaySpecialDirectory is a string that can be set to TmpD,
Desk, or any other special directory value. The real value of this directory
will be read in the parent process.
2017-04-26 18:20:19 +02:00
Olli Pettay f684a31ad3 Bug 1295914, improve the label of the button of folder picker, r=baku,mstange,karlt,jimm
--HG--
extra : rebase_source : 17d97b01d1e7d27b37369f46a6ea8854f9384f54
2016-08-24 02:07:21 +03:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Andrea Marchesini 8e22a11655 Bug 1263992 - patch 1 - Remove DirectoryType enum, r=smaug 2016-04-18 03:32:30 -04:00
Andrea Marchesini 18858bf144 Bug 1173320 - patch 1/8 - Implement Directory object as string and not as BlobImpl, r=smaug 2016-03-20 11:56:10 +01:00
Phil Ringnalda b47ec4d2bd Backed out 8 changesets (bug 1173320) for adding dom/filesystem/tests/test_basic.html without making it work on Android
Backed out changeset 7e3a105b9160 (bug 1173320)
Backed out changeset 094819fbb07f (bug 1173320)
Backed out changeset 23b0e55ff1db (bug 1173320)
Backed out changeset 8bf8e2fcedad (bug 1173320)
Backed out changeset 3de390c6f47f (bug 1173320)
Backed out changeset fb298010e12e (bug 1173320)
Backed out changeset f1a965c2f796 (bug 1173320)
Backed out changeset 176128ba757f (bug 1173320)
2016-03-19 19:44:22 -07:00
Andrea Marchesini 232e5767b0 Bug 1173320 - patch 1/8 - Implement Directory object as string and not as BlobImpl, r=smaug 2016-03-19 22:29:46 +01:00
Kyle Huey c5bea100e9 Bug 1245927: Innerize before creating DOM files from the file picker. r=baku
--HG--
extra : rebase_source : 080eb739e77af64d2325e986657cf22b9c85a5b6
2016-02-05 10:12:25 -08:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Andrea Marchesini d4b954e4fa Bug 1238515 - nsIFilePicker methods should clearly say when they return directories and files, r=smaug 2016-01-12 19:18:15 +00:00