mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 881386 - DeviceStorage: Add .default attribute to webidl. r=Ms2ger
This commit is contained in:
parent
373947830a
commit
52ef1132e8
@ -224,6 +224,8 @@ public:
|
||||
already_AddRefed<DOMRequest> UsedSpace(ErrorResult& aRv);
|
||||
already_AddRefed<DOMRequest> Available(ErrorResult& aRv);
|
||||
|
||||
bool Default();
|
||||
|
||||
// Uses XPCOM GetStorageName
|
||||
|
||||
static void CreateDeviceStorageFor(nsPIDOMWindow* aWin,
|
||||
|
@ -3043,11 +3043,18 @@ nsDOMDeviceStorage::GetRootDirectoryForFile(const nsAString& aName, nsIFile** aR
|
||||
return ds->mRootDirectory->Clone(aRootDirectory);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::GetDefault(bool* aDefault) {
|
||||
bool
|
||||
nsDOMDeviceStorage::Default()
|
||||
{
|
||||
nsString defaultStorageName;
|
||||
GetWritableStorageName(mStorageType, defaultStorageName);
|
||||
*aDefault = mStorageName.Equals(defaultStorageName);
|
||||
return mStorageName.Equals(defaultStorageName);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::GetDefault(bool* aDefault)
|
||||
{
|
||||
*aDefault = Default();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -44,4 +44,8 @@ interface DeviceStorage : EventTarget {
|
||||
// Note that the storageName is just a name (like sdcard), and doesn't
|
||||
// include any path information.
|
||||
readonly attribute DOMString storageName;
|
||||
|
||||
// Determines if this storage area is the one which will be used by default
|
||||
// for storing new files.
|
||||
readonly attribute boolean default;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user