Bug 1455674 part 9. Remove nsIDOMElement use from nsIFocusManager. r=qdot

This commit is contained in:
Boris Zbarsky
2018-04-26 23:35:19 -04:00
parent f4b24766fe
commit 268d2c0bc3
14 changed files with 52 additions and 85 deletions

View File

@@ -3283,7 +3283,7 @@ HTMLInputElement::Select()
}
}
nsIFocusManager* fm = nsFocusManager::GetFocusManager();
nsFocusManager* fm = nsFocusManager::GetFocusManager();
RefPtr<nsPresContext> presContext = GetPresContext(eForComposedDoc);
if (state == eInactiveWindow) {
@@ -3297,9 +3297,7 @@ HTMLInputElement::Select()
fm->SetFocus(this, nsIFocusManager::FLAG_NOSCROLL);
// ensure that the element is actually focused
nsCOMPtr<nsIDOMElement> focusedElement;
fm->GetFocusedElement(getter_AddRefs(focusedElement));
if (SameCOMIdentity(static_cast<nsIDOMNode*>(this), focusedElement)) {
if (this == fm->GetFocusedElement()) {
// Now Select all the text!
SelectAll(presContext);
}