mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 700741 - Add and implement nsIFocusManager.elementIsFocusable r=Enn
This commit is contained in:
parent
8f0353652d
commit
5256c20b37
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user