gecko-dev/docshell
Masayuki Nakano 9c349ade9b Bug 1487591 - Make Selection treat AccessibleCaretEventHub as concrete class rather than nsISelectionListener r=smaug
AccessibleCaretEventHub is an nsISelectionListener of Selection whose type is
"normal".  This is added only when nsFrameSelection::Init() is called and
accessible caret is enabled.  Additionally, nsFrameSelection::Init() is
always called immediately after creating nsFrameSelection.

Therefore, when AccessibleCaretEventHub is installed to Selection, this is
always second selection listener and won't be installed multiple times.  So,
Selection can store pointer of AccessibleCaretEventHub directly only when
it's enabled and the Selection needs to notify it of selection change.

This patch makes Selection stores AccessibleCaretEventHub with RefPtr, then,
makes Selection::NotifySelectionListeners() call its OnSelectionChange()
immediately after AutoCopyListener.

Unfortunately, this patch includes making of MOZ_CAN_RUN_SCRIPT_BOUNDARY and
MOZ_CAN_RUN_SCRIPT a lot since some methods of AccessibleCaretEventHub are
marked as MOZ_CAN_RUN_SCRIPT and including AccessibleCaretEventHub.h into
Selection.h causes compile the compile errors.

Differential Revision: https://phabricator.services.mozilla.com/D4733

--HG--
extra : moz-landing-system : lando
2018-08-31 21:19:44 +00:00
..
base Bug 1487591 - Make Selection treat AccessibleCaretEventHub as concrete class rather than nsISelectionListener r=smaug 2018-08-31 21:19:44 +00:00
build Bug 1487333 - Remove nsIExternalSharingAppService. r=jchen 2018-08-30 18:54:24 +10:00
resources/content Bug 1438243 - Improve the UI for pages blocked by policy r=Felipe 2018-02-22 15:41:12 -08:00
shistory Bug 1487541 - Keep mRequestedIndex in bounds in PurgeHistory(). r=me 2018-08-31 16:25:32 +10:00
test Bug 1481238 - Add tests for BrowsingContext. r=peterv 2018-08-28 02:41:00 +03:00
moz.build Bug 1350496 - add BUG_COMPONENT to docshell/* files. r=overholt 2017-04-09 05:43:52 -04:00