mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +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 |
||
---|---|---|
.. | ||
builtin | ||
crashtests | ||
test | ||
moz.build | ||
nsBindingManager.cpp | ||
nsBindingManager.h | ||
nsXBLBinding.cpp | ||
nsXBLBinding.h | ||
nsXBLContentSink.cpp | ||
nsXBLContentSink.h | ||
nsXBLDocumentInfo.cpp | ||
nsXBLDocumentInfo.h | ||
nsXBLEventHandler.cpp | ||
nsXBLEventHandler.h | ||
nsXBLMaybeCompiled.h | ||
nsXBLProtoImpl.cpp | ||
nsXBLProtoImpl.h | ||
nsXBLProtoImplField.cpp | ||
nsXBLProtoImplField.h | ||
nsXBLProtoImplMember.h | ||
nsXBLProtoImplMethod.cpp | ||
nsXBLProtoImplMethod.h | ||
nsXBLProtoImplProperty.cpp | ||
nsXBLProtoImplProperty.h | ||
nsXBLPrototypeBinding.cpp | ||
nsXBLPrototypeBinding.h | ||
nsXBLPrototypeHandler.cpp | ||
nsXBLPrototypeHandler.h | ||
nsXBLPrototypeResources.cpp | ||
nsXBLPrototypeResources.h | ||
nsXBLResourceLoader.cpp | ||
nsXBLResourceLoader.h | ||
nsXBLSerialize.cpp | ||
nsXBLSerialize.h | ||
nsXBLService.cpp | ||
nsXBLService.h | ||
nsXBLWindowKeyHandler.cpp | ||
nsXBLWindowKeyHandler.h | ||
XBLChildrenElement.cpp | ||
XBLChildrenElement.h |