mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 19:41:49 +00:00
![Masayuki Nakano](/assets/img/avatar_default.png)
Now, we have `nsFocusManager::GetFocusedElementStatic()` which returns focused element if the `nsFocusManager` instance is available. Therefore, if `nsFocusManager::GetFocusedElement()` users do not use other methods of `nsFocusManager`, they can use `nsFocusManager::GetFocusedElementStatic()` and make themselves simpler. Note that some callers return early if `nsFocusManager` is not available, but they do not return error and `nsFocusManager` instance is available in most time of the life time of the process. Therefore, we can simply stop using the early return. Differential Revision: https://phabricator.services.mozilla.com/D217527