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

40 Коммитов

Автор SHA1 Сообщение Дата
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
Carsten "Tomcat" Book de28b5128f Backed out changeset b5e8cd00d7ef (bug 1238515) for Android Test failures
--HG--
extra : rebase_source : d7883a0923a22c676f26946ab8950a9bf01490a9
2016-01-12 14:15:08 +01:00
Andrea Marchesini 923de404a2 Bug 1238515 - nsIFilePicker methods should clearly say when they return directories and files, r=smaug 2016-01-12 10:23:13 +00:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Jonathan Watt d2ceb3fc28 Bug 1202964 - Use the correct nsIFilePicker API for directory picking in HTMLInputElement::nsFilePickerShownCallback::Done. r=baku 2015-08-18 10:30:19 +01:00
Jonathan Watt b7bcad9074 Bug 1164310, part 4 - Implement the new HTMLInputElement API including the new Promise returning GetFilesAndDirectories. r=baku 2015-07-10 18:55:52 +01:00
Andrea Marchesini 3aa189b5ff Bug 1163388 - patch 2 - get rid of nsIDOMFile, r=ehsan
--HG--
rename : dom/base/nsIDOMFile.idl => dom/base/nsIDOMBlob.idl
2015-05-18 14:52:26 +01:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Ehsan Akhgari 390eaebf41 Bug 1117044 - Mark virtual overridden functions as MOZ_OVERRIDE in widget; r=roc 2015-01-02 09:02:51 -05:00
Mason Chang 8180f9229c Bug 1085696. Part 1 Move widget/xpwidget to /widget. r=roc
--HG--
rename : widget/xpwidgets/ContentHelper.cpp => widget/ContentHelper.cpp
rename : widget/xpwidgets/ContentHelper.h => widget/ContentHelper.h
rename : widget/xpwidgets/GfxDriverInfo.cpp => widget/GfxDriverInfo.cpp
rename : widget/xpwidgets/GfxDriverInfo.h => widget/GfxDriverInfo.h
rename : widget/xpwidgets/GfxInfoBase.cpp => widget/GfxInfoBase.cpp
rename : widget/xpwidgets/GfxInfoBase.h => widget/GfxInfoBase.h
rename : widget/xpwidgets/GfxInfoCollector.cpp => widget/GfxInfoCollector.cpp
rename : widget/xpwidgets/GfxInfoCollector.h => widget/GfxInfoCollector.h
rename : widget/xpwidgets/GfxInfoWebGL.cpp => widget/GfxInfoWebGL.cpp
rename : widget/xpwidgets/GfxInfoWebGL.h => widget/GfxInfoWebGL.h
rename : widget/xpwidgets/GfxInfoX11.cpp => widget/GfxInfoX11.cpp
rename : widget/xpwidgets/GfxInfoX11.h => widget/GfxInfoX11.h
rename : widget/xpwidgets/InputData.cpp => widget/InputData.cpp
rename : widget/xpwidgets/PuppetWidget.cpp => widget/PuppetWidget.cpp
rename : widget/xpwidgets/PuppetWidget.h => widget/PuppetWidget.h
rename : widget/xpwidgets/ScreenProxy.cpp => widget/ScreenProxy.cpp
rename : widget/xpwidgets/ScreenProxy.h => widget/ScreenProxy.h
rename : widget/shared/SharedWidgetUtils.cpp => widget/SharedWidgetUtils.cpp
rename : widget/xpwidgets/WidgetUtils.cpp => widget/WidgetUtils.cpp
rename : widget/xpwidgets/nsAppShellSingleton.h => widget/nsAppShellSingleton.h
rename : widget/xpwidgets/nsBaseAppShell.cpp => widget/nsBaseAppShell.cpp
rename : widget/xpwidgets/nsBaseAppShell.h => widget/nsBaseAppShell.h
rename : widget/xpwidgets/nsBaseClipboard.cpp => widget/nsBaseClipboard.cpp
rename : widget/xpwidgets/nsBaseClipboard.h => widget/nsBaseClipboard.h
rename : widget/xpwidgets/nsBaseDragService.cpp => widget/nsBaseDragService.cpp
rename : widget/xpwidgets/nsBaseDragService.h => widget/nsBaseDragService.h
rename : widget/xpwidgets/nsBaseFilePicker.cpp => widget/nsBaseFilePicker.cpp
rename : widget/xpwidgets/nsBaseFilePicker.h => widget/nsBaseFilePicker.h
rename : widget/xpwidgets/nsBaseScreen.cpp => widget/nsBaseScreen.cpp
rename : widget/xpwidgets/nsBaseScreen.h => widget/nsBaseScreen.h
rename : widget/xpwidgets/nsBaseWidget.cpp => widget/nsBaseWidget.cpp
rename : widget/xpwidgets/nsBaseWidget.h => widget/nsBaseWidget.h
rename : widget/xpwidgets/nsClipboardHelper.cpp => widget/nsClipboardHelper.cpp
rename : widget/xpwidgets/nsClipboardHelper.h => widget/nsClipboardHelper.h
rename : widget/xpwidgets/nsClipboardProxy.cpp => widget/nsClipboardProxy.cpp
rename : widget/xpwidgets/nsClipboardProxy.h => widget/nsClipboardProxy.h
rename : widget/xpwidgets/nsColorPickerProxy.cpp => widget/nsColorPickerProxy.cpp
rename : widget/xpwidgets/nsColorPickerProxy.h => widget/nsColorPickerProxy.h
rename : widget/xpwidgets/nsContentProcessWidgetFactory.cpp => widget/nsContentProcessWidgetFactory.cpp
rename : widget/xpwidgets/nsFilePickerProxy.cpp => widget/nsFilePickerProxy.cpp
rename : widget/xpwidgets/nsFilePickerProxy.h => widget/nsFilePickerProxy.h
rename : widget/xpwidgets/nsHTMLFormatConverter.cpp => widget/nsHTMLFormatConverter.cpp
rename : widget/xpwidgets/nsHTMLFormatConverter.h => widget/nsHTMLFormatConverter.h
rename : widget/xpwidgets/nsIWidgetListener.cpp => widget/nsIWidgetListener.cpp
rename : widget/xpwidgets/nsIdleService.cpp => widget/nsIdleService.cpp
rename : widget/xpwidgets/nsIdleService.h => widget/nsIdleService.h
rename : widget/xpwidgets/nsNativeTheme.cpp => widget/nsNativeTheme.cpp
rename : widget/xpwidgets/nsNativeTheme.h => widget/nsNativeTheme.h
rename : widget/xpwidgets/nsPrimitiveHelpers.cpp => widget/nsPrimitiveHelpers.cpp
rename : widget/xpwidgets/nsPrimitiveHelpers.h => widget/nsPrimitiveHelpers.h
rename : widget/xpwidgets/nsPrintOptionsImpl.cpp => widget/nsPrintOptionsImpl.cpp
rename : widget/xpwidgets/nsPrintOptionsImpl.h => widget/nsPrintOptionsImpl.h
rename : widget/xpwidgets/nsPrintSession.cpp => widget/nsPrintSession.cpp
rename : widget/xpwidgets/nsPrintSession.h => widget/nsPrintSession.h
rename : widget/xpwidgets/nsPrintSettingsImpl.cpp => widget/nsPrintSettingsImpl.cpp
rename : widget/xpwidgets/nsPrintSettingsImpl.h => widget/nsPrintSettingsImpl.h
rename : widget/xpwidgets/nsScreenManagerProxy.cpp => widget/nsScreenManagerProxy.cpp
rename : widget/xpwidgets/nsScreenManagerProxy.h => widget/nsScreenManagerProxy.h
rename : widget/xpwidgets/nsTransferable.cpp => widget/nsTransferable.cpp
rename : widget/xpwidgets/nsTransferable.h => widget/nsTransferable.h
rename : widget/xpwidgets/nsXPLookAndFeel.cpp => widget/nsXPLookAndFeel.cpp
rename : widget/xpwidgets/nsXPLookAndFeel.h => widget/nsXPLookAndFeel.h
2014-10-23 10:16:45 -07:00