gecko-dev/dom/xbl
Masayuki Nakano 4ce89d8f61 Bug 1369072 - part3: nsXBLPrototypeHandler::DispatchXBLCommand() should use controller of visible window r=smaug
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
2017-09-07 22:54:49 +09:00
..
builtin
crashtests Bug 1341102 - Re-enable some crashtests. r=me 2017-07-24 18:35:19 -07:00
test Bug 1373513 - Part 2: Revert Bug 1364367. r=ckerschb 2017-07-12 11:00:27 +08:00
moz.build Bug 1351783 part 6 - Create and send KeyboardMap to APZCTreeManager. r=kats 2017-06-05 18:35:32 -05:00
nsBindingManager.cpp Bug 1382078 Part 4 - Avoid unneeded restyle when XBL styleset is utilized by different PresContext. r=emilio 2017-09-04 17:57:00 +08:00
nsBindingManager.h Bug 1382078 Part 3 - Support media changes for XBL stylesheets. r=emilio 2017-09-02 15:25:45 +08:00
nsXBLBinding.cpp Bug 1393790 part 1 - Remove JS_STUBGETTER and JS_STUBSETTER. r=jorendorff 2017-08-28 10:39:57 +02:00
nsXBLBinding.h Bug 1386865 part 1 - Have GetServoStyleSet return non-const ServoStyleSet. r=TYLin 2017-08-03 16:58:23 +10:00
nsXBLContentSink.cpp Bug 1381253 - Remove redundant control flow declarations rs=ehsan 2017-07-15 19:03:04 +02:00
nsXBLContentSink.h
nsXBLDocumentInfo.cpp Bug 1389300 - Inherit style backend into NS_NewDOMDocument. r=smaug,r=heycam 2017-08-15 19:10:43 -07:00
nsXBLDocumentInfo.h
nsXBLEventHandler.cpp
nsXBLEventHandler.h
nsXBLMaybeCompiled.h
nsXBLProtoImpl.cpp Bug 1393790 part 1 - Remove JS_STUBGETTER and JS_STUBSETTER. r=jorendorff 2017-08-28 10:39:57 +02:00
nsXBLProtoImpl.h
nsXBLProtoImplField.cpp Bug 1394835 part 1 - Spit JS_DefineProperty* APIs in separate data/accessor overloads. r=evilpie,bz 2017-08-30 15:35:06 +02:00
nsXBLProtoImplField.h
nsXBLProtoImplMember.h
nsXBLProtoImplMethod.cpp Bug 1390106 - Stop using versioned scripts in dom. r=mrbkap 2017-08-14 20:42:55 +09:00
nsXBLProtoImplMethod.h
nsXBLProtoImplProperty.cpp Bug 1394835 part 1 - Spit JS_DefineProperty* APIs in separate data/accessor overloads. r=evilpie,bz 2017-08-30 15:35:06 +02:00
nsXBLProtoImplProperty.h
nsXBLPrototypeBinding.cpp Bug 1382078 Part 3 - Support media changes for XBL stylesheets. r=emilio 2017-09-02 15:25:45 +08:00
nsXBLPrototypeBinding.h Bug 1382078 Part 3 - Support media changes for XBL stylesheets. r=emilio 2017-09-02 15:25:45 +08:00
nsXBLPrototypeHandler.cpp Bug 1369072 - part3: nsXBLPrototypeHandler::DispatchXBLCommand() should use controller of visible window r=smaug 2017-09-07 22:54:49 +09:00
nsXBLPrototypeHandler.h
nsXBLPrototypeResources.cpp Bug 1396700 - Add a method to ServoStyleSet for creating XBL style set. r=xidorn 2017-09-01 16:45:39 +08:00
nsXBLPrototypeResources.h Bug 1386865 part 1 - Have GetServoStyleSet return non-const ServoStyleSet. r=TYLin 2017-08-03 16:58:23 +10:00
nsXBLResourceLoader.cpp Bug 1354989 - Avoid pivoting via UTF-16 when loading CSS in the Stylo mode. r=jdm,SimonSapin 2017-08-29 16:01:42 +03:00
nsXBLResourceLoader.h
nsXBLSerialize.cpp
nsXBLSerialize.h
nsXBLService.cpp Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm. 2017-08-17 15:29:03 +10:00
nsXBLService.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
nsXBLWindowKeyHandler.cpp Bug 1387406 - part5: nsXBLWindowKeyHandler should treat editor as HTMLEditor r=smaug 2017-08-07 15:08:02 +09:00
nsXBLWindowKeyHandler.h Bug 1351783 part 19 - Rename Keyboard.h to KeyboardMap.h. r=masayuki 2017-06-15 18:06:00 -04:00
XBLChildrenElement.cpp Bug 1390660, part 1 - Clean up some uses of the table-to-map segue. r=peterv 2017-08-16 13:37:20 -07:00
XBLChildrenElement.h