Finish fixing bug 279378 -- land part of patch for it that never quite made it

to the tree.  r=aaronlev, sr=bryner
This commit is contained in:
bzbarsky%mit.edu 2005-11-16 22:17:58 +00:00
Родитель 10f25e9b72
Коммит 8e00aebaa2
1 изменённых файлов: 17 добавлений и 2 удалений

Просмотреть файл

@ -84,8 +84,7 @@ public:
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
// Let applet decide whether it wants focus from mouse clicks
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull)
{ if (aTabIndex) GetTabIndex(aTabIndex); return PR_TRUE; }
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
@ -310,3 +309,19 @@ nsHTMLAppletElement::IntrinsicState() const
{
return nsGenericHTMLElement::IntrinsicState() | ObjectState();
}
PRBool
nsHTMLAppletElement::IsFocusable(PRInt32 *aTabIndex)
{
if (Type() == eType_Plugin) {
// Has plugin content (java): let the plugin decide what to do in terms of
// internal focus from mouse clicks
if (aTabIndex) {
GetTabIndex(aTabIndex);
}
return PR_TRUE;
}
return nsGenericHTMLElement::IsFocusable(aTabIndex);
}