Bug 1446515 - Remove nsIDOMFileList. r=bz

MozReview-Commit-ID: 4ab1e6NTcOB
This commit is contained in:
Adrian Wielgosik
2018-03-16 20:55:32 +01:00
parent bdefb3685b
commit 03284e63fb
17 changed files with 14 additions and 65 deletions

View File

@@ -25,7 +25,6 @@
#include "nsContentCreatorFunctions.h"
#include "nsContentUtils.h"
#include "mozilla/EventStates.h"
#include "nsIDOMFileList.h"
#include "nsTextNode.h"
using namespace mozilla;
@@ -342,7 +341,7 @@ nsFileControlFrame::DnDListener::HandleEvent(nsIDOMEvent* aEvent)
}
nsresult
nsFileControlFrame::DnDListener::GetBlobImplForWebkitDirectory(nsIDOMFileList* aFileList,
nsFileControlFrame::DnDListener::GetBlobImplForWebkitDirectory(FileList* aFileList,
BlobImpl** aBlobImpl)
{
*aBlobImpl = nullptr;
@@ -360,12 +359,11 @@ nsFileControlFrame::DnDListener::GetBlobImplForWebkitDirectory(nsIDOMFileList* a
return NS_ERROR_FAILURE;
}
FileList* files = static_cast<FileList*>(aFileList);
// webkitdirectory doesn't care about the length of the file list but
// only about the first item on it.
uint32_t len = files->Length();
uint32_t len = aFileList->Length();
if (len) {
File* file = files->Item(0);
File* file = aFileList->Item(0);
if (file) {
BlobImpl* impl = file->Impl();
if (impl && impl->IsDirectory()) {
@@ -406,7 +404,7 @@ nsFileControlFrame::DnDListener::CanDropTheseFiles(DataTransfer* aDataTransfer,
uint32_t listLength = 0;
if (fileList) {
fileList->GetLength(&listLength);
listLength = fileList->Length();
}
return listLength <= 1 || aSupportsMultiple;
}