Backed out changeset aa4ba2c25de7 (bug 599328) for test_bug426082.html failures on OSX

This commit is contained in:
Wes Kocher
2015-07-07 16:33:30 -07:00
parent d0802a9a53
commit 3a0254e885
2 changed files with 24 additions and 42 deletions

View File

@@ -169,14 +169,8 @@ HTMLLabelElement::PostHandleEvent(EventChainPostVisitor& aVisitor)
// be selected only when focused via a key or when the navigation
// flag is used and we want to select the text on label clicks as
// well.
// If the label has been clicked by the user, we also want to
// pass FLAG_BYMOUSE so that we get correct focus ring behavior,
// but we don't want to pass FLAG_BYMOUSE if this click event was
// caused by the user pressing an accesskey.
nsCOMPtr<nsIDOMElement> elem = do_QueryInterface(content);
bool byMouse = (mouseEvent->inputSource != nsIDOMMouseEvent::MOZ_SOURCE_KEYBOARD);
fm->SetFocus(elem, nsIFocusManager::FLAG_BYMOVEFOCUS |
(byMouse ? nsIFocusManager::FLAG_BYMOUSE : 0));
fm->SetFocus(elem, nsIFocusManager::FLAG_BYMOVEFOCUS);
}
}
// Dispatch a new click event to |content|