Merge mozilla-central to mozilla-inbound
This commit is contained in:
@@ -1747,23 +1747,7 @@ HTMLInputElement::GetValueInternal(nsAString& aValue) const
|
||||
|
||||
case VALUE_MODE_FILENAME:
|
||||
if (nsContentUtils::LegacyIsCallerChromeOrNativeCode()) {
|
||||
#ifndef MOZ_CHILD_PERMISSIONS
|
||||
aValue.Assign(mFirstFilePath);
|
||||
#else
|
||||
// XXX We'd love to assert that this can't happen, but some mochitests
|
||||
// use SpecialPowers to circumvent our more sane security model.
|
||||
if (!mFilesOrDirectories.IsEmpty()) {
|
||||
ErrorResult rv;
|
||||
GetDOMFileOrDirectoryPath(mFilesOrDirectories[0], aValue, rv);
|
||||
if (NS_WARN_IF(rv.Failed())) {
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
else {
|
||||
aValue.Truncate();
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
// Just return the leaf name
|
||||
if (mFilesOrDirectories.IsEmpty()) {
|
||||
@@ -2938,7 +2922,6 @@ HTMLInputElement::AfterSetFilesOrDirectories(bool aSetValueChanged)
|
||||
formControlFrame->SetFormProperty(nsGkAtoms::value, readableValue);
|
||||
}
|
||||
|
||||
#ifndef MOZ_CHILD_PERMISSIONS
|
||||
// Grab the full path here for any chrome callers who access our .value via a
|
||||
// CPOW. This path won't be called from a CPOW meaning the potential sync IPC
|
||||
// call under GetMozFullPath won't be rejected for not being urgent.
|
||||
@@ -2953,7 +2936,6 @@ HTMLInputElement::AfterSetFilesOrDirectories(bool aSetValueChanged)
|
||||
rv.SuppressException();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
UpdateFileList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user