mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
4ce89d8f61
With previous change, KeyboardEvent is dispatched even when invisible window has focus. However, nsRootWindow::GetControllerForCommand() returns controller for focused window even when the window is invisible because it uses nsFocusManager::GetFocusedDescendant() to retrieve focused window. Perhaps, we can assume that users won't expect to do something with invisible window when they type some keys. Then, nsRootWindow::GetControllerForCommand() should return controller for visible ancestor window if focused window is invisible. This patch makes nsFocusManager::GetFocusedDescendant() can return only visible descendants. However, it already has a bool argument. Therefore, it should have a flag instead of adding new flag. Most changes of this patch is replacing its callers. Then, nsRootWindow::GetControllerForCommand() and nsRootWindow::GetControllers() should have a bool flag if it should return controller(s) for visible window. This patch adds a bool flag for it. Fortunately, the interface isn't scriptable. Finally, this patch makes nsXBLPrototypeHandler::DispatchXBLCommand() and EventStateManager::DoContentCommandEvent() retrieve controller for visible window since they are always handles user input. MozReview-Commit-ID: GygttTHuKRm --HG-- extra : rebase_source : 1341273c4606298cb9b890b9312d9f5c8a75d144 |
||
---|---|---|
.. | ||
moz.build | ||
nsBaseCommandController.cpp | ||
nsBaseCommandController.h | ||
nsCommandGroup.cpp | ||
nsCommandGroup.h | ||
nsCommandManager.cpp | ||
nsCommandManager.h | ||
nsCommandParams.cpp | ||
nsCommandParams.h | ||
nsControllerCommandTable.cpp | ||
nsControllerCommandTable.h | ||
nsICommandManager.idl | ||
nsICommandParams.idl | ||
nsIControllerCommand.idl | ||
nsIControllerCommandTable.idl | ||
nsIControllerContext.idl | ||
nsPICommandUpdater.idl |