зеркало из https://github.com/mozilla/pjs.git
Bug 310626. Flash text input broken. r+sr=bryner
This commit is contained in:
Родитель
1a71034b18
Коммит
0a101a5f7f
|
@ -83,6 +83,9 @@ public:
|
||||||
// Have to override tabindex for <embed> to act right
|
// Have to override tabindex for <embed> to act right
|
||||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||||
NS_IMETHOD SetTabIndex(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 nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
|
||||||
nsIContent* aBindingParent,
|
nsIContent* aBindingParent,
|
||||||
|
|
|
@ -84,6 +84,7 @@ public:
|
||||||
nsIAtom* aPrefix, const nsAString& aValue,
|
nsIAtom* aPrefix, const nsAString& aValue,
|
||||||
PRBool aNotify);
|
PRBool aNotify);
|
||||||
|
|
||||||
|
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
|
||||||
|
|
||||||
// Overriden nsIFormControl methods
|
// Overriden nsIFormControl methods
|
||||||
NS_IMETHOD_(PRInt32) GetType() const { return NS_FORM_OBJECT; }
|
NS_IMETHOD_(PRInt32) GetType() const { return NS_FORM_OBJECT; }
|
||||||
|
@ -180,6 +181,8 @@ nsHTMLObjectElement::GetForm(nsIDOMHTMLFormElement** aForm)
|
||||||
return nsGenericHTMLFormElement::GetForm(aForm);
|
return nsGenericHTMLFormElement::GetForm(aForm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nsIContent
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsHTMLObjectElement::BindToTree(nsIDocument* aDocument,
|
nsHTMLObjectElement::BindToTree(nsIDocument* aDocument,
|
||||||
nsIContent* aParent,
|
nsIContent* aParent,
|
||||||
|
@ -236,6 +239,21 @@ nsHTMLObjectElement::SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
|
||||||
aValue, aNotify);
|
aValue, aNotify);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRBool nsHTMLObjectElement::IsFocusable(PRInt32 *aTabIndex)
|
||||||
|
{
|
||||||
|
if (aTabIndex) {
|
||||||
|
GetTabIndex(aTabIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Type() == eType_Plugin) {
|
||||||
|
// Has plugin content: let the plugin decide what to do in terms of
|
||||||
|
// internal focus from mouse clicks
|
||||||
|
return PR_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return HasAttr(kNameSpaceID_None, nsHTMLAtoms::tabindex);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// nsIFormControl
|
// nsIFormControl
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,9 @@ public:
|
||||||
// Have to override tabindex for <embed> to act right
|
// Have to override tabindex for <embed> to act right
|
||||||
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
|
||||||
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
|
||||||
|
// Let plugin decide whether it wants focus from mouse clicks
|
||||||
|
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull)
|
||||||
|
{ if (aTabIndex) GetTabIndex(aTabIndex); return PR_TRUE; }
|
||||||
|
|
||||||
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
|
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
|
||||||
const nsAString& aValue,
|
const nsAString& aValue,
|
||||||
|
|
|
@ -73,6 +73,11 @@ public:
|
||||||
|
|
||||||
// nsIDOMHTMLObjectElement
|
// nsIDOMHTMLObjectElement
|
||||||
NS_DECL_NSIDOMHTMLOBJECTELEMENT
|
NS_DECL_NSIDOMHTMLOBJECTELEMENT
|
||||||
|
|
||||||
|
// nsIContent
|
||||||
|
// Let plugin decide whether it wants focus from mouse clicks
|
||||||
|
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull)
|
||||||
|
{ if (aTabIndex) GetTabIndex(aTabIndex); return PR_TRUE; }
|
||||||
|
|
||||||
// Overriden nsIFormControl methods
|
// Overriden nsIFormControl methods
|
||||||
NS_IMETHOD_(PRInt32) GetType()
|
NS_IMETHOD_(PRInt32) GetType()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче