mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1068838 - Add chrome-only method for setting an <input>'s file list. r=sicking
This commit is contained in:
parent
878e2e5f26
commit
40793e84d3
@ -2328,6 +2328,16 @@ HTMLInputElement::MozGetFileNameArray(uint32_t* aLength, char16_t*** aFileNames)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLInputElement::MozSetFileArray(const Sequence<OwningNonNull<File>>& aFiles)
|
||||
{
|
||||
nsTArray<nsRefPtr<File>> files;
|
||||
for (uint32_t i = 0; i < aFiles.Length(); ++i) {
|
||||
files.AppendElement(aFiles[i]);
|
||||
}
|
||||
SetFiles(files, true);
|
||||
}
|
||||
|
||||
void
|
||||
HTMLInputElement::MozSetFileNameArray(const Sequence< nsString >& aFileNames)
|
||||
{
|
||||
|
@ -716,6 +716,7 @@ public:
|
||||
void MozGetFileNameArray(nsTArray< nsString >& aFileNames);
|
||||
|
||||
void MozSetFileNameArray(const Sequence< nsString >& aFileNames);
|
||||
void MozSetFileArray(const Sequence<OwningNonNull<File>>& aFiles);
|
||||
|
||||
HTMLInputElement* GetOwnerNumberControl();
|
||||
|
||||
|
@ -154,6 +154,9 @@ partial interface HTMLInputElement {
|
||||
[ChromeOnly]
|
||||
void mozSetFileNameArray(sequence<DOMString> fileNames);
|
||||
|
||||
[ChromeOnly]
|
||||
void mozSetFileArray(sequence<File> files);
|
||||
|
||||
// Number controls (<input type=number>) have an anonymous text control
|
||||
// (<input type=text>) in the anonymous shadow tree that they contain. On
|
||||
// such an anonymous text control this property provides access to the
|
||||
|
Loading…
Reference in New Issue
Block a user