XForms bug 299766 - Implement accesskey support. r=aaronr,smaug a=mkaply

This commit is contained in:
doronr%us.ibm.com 2005-07-07 19:59:49 +00:00
Родитель 618577564a
Коммит 531c5dbe80
3 изменённых файлов: 28 добавлений и 1 удалений

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

@ -61,6 +61,7 @@ nsIAtom *nsXFormsAtoms::incremental;
nsIAtom *nsXFormsAtoms::clazz;
nsIAtom *nsXFormsAtoms::deferredBindListProperty;
nsIAtom *nsXFormsAtoms::readyForBindProperty;
nsIAtom *nsXFormsAtoms::accesskey;
const nsStaticAtom nsXFormsAtoms::Atoms_info[] = {
{ "src", &nsXFormsAtoms::src },
@ -84,7 +85,8 @@ const nsStaticAtom nsXFormsAtoms::Atoms_info[] = {
{ "incremental", &nsXFormsAtoms::incremental },
{ "class", &nsXFormsAtoms::clazz },
{ "DeferredBindListProperty", &nsXFormsAtoms::deferredBindListProperty },
{ "ReadyForBindProperty", &nsXFormsAtoms::readyForBindProperty }
{ "ReadyForBindProperty", &nsXFormsAtoms::readyForBindProperty },
{ "accesskey", &nsXFormsAtoms::accesskey }
};
void

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

@ -69,6 +69,7 @@ class nsXFormsAtoms
static NS_HIDDEN_(nsIAtom *) clazz;
static NS_HIDDEN_(nsIAtom *) deferredBindListProperty;
static NS_HIDDEN_(nsIAtom *) readyForBindProperty;
static NS_HIDDEN_(nsIAtom *) accesskey;
static NS_HIDDEN_(void) InitAtoms();

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

@ -85,6 +85,8 @@ public:
// nsIXTFElement overrides
NS_IMETHOD OnDestroyed();
NS_IMETHOD AttributeSet(nsIAtom *aName, const nsAString &aValue);
NS_IMETHOD AttributeRemoved(nsIAtom *aName);
// nsIXFormsControl
NS_IMETHOD Refresh();
@ -164,6 +166,28 @@ nsXFormsUploadElement::OnCreated(nsIXTFXMLVisualWrapper *aWrapper)
return NS_OK;
}
NS_IMETHODIMP
nsXFormsUploadElement::AttributeSet(nsIAtom *aName, const nsAString &aValue)
{
if (aName == nsXFormsAtoms::accesskey) {
// accesskey
mInput->SetAttribute(NS_LITERAL_STRING("accesskey"), aValue);
}
return NS_OK;
}
NS_IMETHODIMP
nsXFormsUploadElement::AttributeRemoved(nsIAtom *aName)
{
if (aName == nsXFormsAtoms::accesskey) {
// accesskey
mInput->RemoveAttribute(NS_LITERAL_STRING("accesskey"));
}
return NS_OK;
}
// nsIXTFVisual
NS_IMETHODIMP