зеркало из https://github.com/mozilla/pjs.git
Bug 700741 - Add and implement nsIFocusManager.elementIsFocusable r=Enn
This commit is contained in:
Родитель
80df1b13db
Коммит
e5edf0640e
|
@ -465,6 +465,19 @@ nsFocusManager::SetFocus(nsIDOMElement* aElement, PRUint32 aFlags)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFocusManager::ElementIsFocusable(nsIDOMElement* aElement, PRUint32 aFlags,
|
||||
bool* aIsFocusable)
|
||||
{
|
||||
NS_ENSURE_TRUE(aElement, NS_ERROR_INVALID_ARG);
|
||||
|
||||
nsCOMPtr<nsIContent> aContent = do_QueryInterface(aElement);
|
||||
|
||||
*aIsFocusable = CheckIfFocusable(aContent, aFlags) != nsnull;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsFocusManager::MoveFocus(nsIDOMWindow* aWindow, nsIDOMElement* aStartElement,
|
||||
PRUint32 aType, PRUint32 aFlags, nsIDOMElement** aElement)
|
||||
|
|
|
@ -166,6 +166,11 @@ interface nsIFocusManager : nsISupports
|
|||
*/
|
||||
void moveCaretToFocus(in nsIDOMWindow aWindow);
|
||||
|
||||
/***
|
||||
* Check if given element is focusable.
|
||||
*/
|
||||
boolean elementIsFocusable(in nsIDOMElement aElement, in unsigned long aFlags);
|
||||
|
||||
/*
|
||||
* Raise the window when switching focus
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче