gecko-dev/layout/printing
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
..
crashtests Bug 1382327 - (reftest) Rename reftest-print to reftest-paged. r=dbaron 2017-07-26 22:53:46 -07:00
ipc Bug 1359490 - add an event loop spinning abstraction function; r=gerald 2017-05-15 09:34:19 -04:00
moz.build
nsIPrintProgress.idl
nsIPrintProgressParams.idl
nsIPrintStatusFeedback.idl
nsPagePrintTimer.cpp Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm 2017-07-26 16:13:35 +08:00
nsPagePrintTimer.h Bug 1354443 part.2 nsPrintEngine::Disconnect() should clear mPrintObj r=dholbert 2017-04-27 17:17:20 +09:00
nsPrintData.cpp Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron. 2017-08-04 14:40:52 +10:00
nsPrintData.h Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron. 2017-08-04 14:40:52 +10:00
nsPrintEngine.cpp Bug 1369072 - part3: nsXBLPrototypeHandler::DispatchXBLCommand() should use controller of visible window r=smaug 2017-09-07 22:54:49 +09:00
nsPrintEngine.h Bug 1354443 part.1-1 Make nsPrintData refcountable r=dholbert 2017-05-09 17:08:20 +09:00
nsPrintObject.cpp Bug 1342994 Part 2 - Use UniquePtr to replace explicit new/delete and non-owing pointers in printing APIs. r=dholbert 2017-03-06 16:28:20 +08:00
nsPrintObject.h Bug 1342994 Part 2 - Use UniquePtr to replace explicit new/delete and non-owing pointers in printing APIs. r=dholbert 2017-03-06 16:28:20 +08:00
nsPrintPreviewListener.cpp Bug 1378712 - Remove all trailing whitespaces r=Ehsan 2017-07-06 14:00:35 +02:00
nsPrintPreviewListener.h
PrintTranslator.cpp Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel 2017-06-30 14:09:05 -04:00
PrintTranslator.h Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel 2017-06-30 14:09:05 -04:00