Bug 735251 - make HTMLMediaElement unfocusable by mouse on OS X, r?bz
MozReview-Commit-ID: K4xknFdgPW0
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -2531,17 +2531,25 @@ void HTMLMediaElement::DoneCreatingEleme
bool HTMLMediaElement::IsHTMLFocusable(bool aWithMouse,
bool* aIsFocusable,
int32_t* aTabIndex)
{
if (nsGenericHTMLElement::IsHTMLFocusable(aWithMouse, aIsFocusable, aTabIndex)) {
return true;
}
+
+#ifdef XP_MACOSX
+ // NB: this deliberately does not check
+ // nsFocusManager::sMouseFocusesFormControl as this is not a form control.
+ *aIsFocusable = !aWithMouse;
+#else
*aIsFocusable = true;
+#endif
+
return false;
}
int32_t HTMLMediaElement::TabIndexDefault()
{
return 0;
}