Bug 1455674 part 9. Remove nsIDOMElement use from nsIFocusManager. r=qdot
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user