mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 02:35:41 +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 |
||
---|---|---|
.. | ||
crashtests | ||
templates | ||
test | ||
moz.build | ||
nsForwardReference.h | ||
nsIController.idl | ||
nsIControllers.idl | ||
nsIXULDocument.h | ||
nsIXULOverlayProvider.idl | ||
nsXULCommandDispatcher.cpp | ||
nsXULCommandDispatcher.h | ||
nsXULContentSink.cpp | ||
nsXULContentSink.h | ||
nsXULControllers.cpp | ||
nsXULControllers.h | ||
nsXULElement.cpp | ||
nsXULElement.h | ||
nsXULPopupListener.cpp | ||
nsXULPopupListener.h | ||
nsXULPrototypeCache.cpp | ||
nsXULPrototypeCache.h | ||
nsXULPrototypeDocument.cpp | ||
nsXULPrototypeDocument.h | ||
XULDocument.cpp | ||
XULDocument.h |