summaryrefslogtreecommitdiffstats
path: root/dom/html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/html')
-rw-r--r--dom/html/HTMLInputElement.cpp2
-rw-r--r--dom/html/HTMLMediaElement.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/dom/html/HTMLInputElement.cpp b/dom/html/HTMLInputElement.cpp
index 86d03d8f5..557e673e1 100644
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -866,7 +866,7 @@ HTMLInputElement::InitFilePicker(FilePickerType aType)
mode = static_cast<int16_t>(nsIFilePicker::modeOpen);
}
- nsresult rv = filePicker->Init(win, title, mode);
+ nsresult rv = filePicker->Init(win, title, mode, /*aRequireInteraction = */ true);
NS_ENSURE_SUCCESS(rv, rv);
if (!okButtonLabel.IsEmpty()) {
diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
index 0828208f6..1ff1fd7a4 100644
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -4614,8 +4614,12 @@ void HTMLMediaElement::DecodeError(const MediaResult& aError)
}
} else if (mReadyState == nsIDOMHTMLMediaElement::HAVE_NOTHING) {
NoSupportedMediaSourceError(aError.Description());
- } else {
+ } else if (IsCORSSameOrigin()) {
Error(MEDIA_ERR_DECODE, aError.Description());
+ } else {
+ nsAutoCString eMessage;
+ eMessage.AssignLiteral("Failed to decode media");
+ Error(MEDIA_ERR_DECODE, eMessage);
}
}