Bug 316715 should enable IME on applet and embed elements r+sr=roc

This commit is contained in:
masayuki%d-toybox.com 2005-11-17 03:36:38 +00:00
Родитель 6d8768e821
Коммит be13856823
2 изменённых файлов: 21 добавлений и 1 удалений

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

@ -85,6 +85,7 @@ public:
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
// Let applet decide whether it wants focus from mouse clicks
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
virtual PRUint32 GetDesiredIMEState();
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
nsIContent* aBindingParent,
@ -325,3 +326,12 @@ nsHTMLAppletElement::IsFocusable(PRInt32 *aTabIndex)
return nsGenericHTMLElement::IsFocusable(aTabIndex);
}
PRUint32
nsHTMLAppletElement::GetDesiredIMEState()
{
if (nsObjectLoadingContent::Type() == eType_Plugin)
return nsIContent::IME_STATUS_ENABLE;
return nsIContent::GetDesiredIMEState();
}

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

@ -131,7 +131,8 @@ public:
NS_IMETHOD GetTabIndex(PRInt32* aTabIndex);
NS_IMETHOD SetTabIndex(PRInt32 aTabIndex);
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
virtual PRUint32 GetDesiredIMEState();
virtual PRBool ParseAttribute(nsIAtom* aAttribute,
const nsAString& aValue,
nsAttrValue& aResult);
@ -604,3 +605,12 @@ nsHTMLSharedElement::IsFocusable(PRInt32 *aTabIndex)
return nsGenericHTMLElement::IsFocusable(aTabIndex);
}
PRUint32
nsHTMLSharedElement::GetDesiredIMEState()
{
if (mNodeInfo->Equals(nsHTMLAtoms::embed) &&
nsObjectLoadingContent::Type() == eType_Plugin)
return nsIContent::IME_STATUS_ENABLE;
return nsIContent::GetDesiredIMEState();
}