Closed
Bug 1487591
Opened 7 years ago
Closed 7 years ago
Make Selection treat AccessibleCaretEventHub as concrete class rather than nsISelectionListener
Categories
(Core :: DOM: Selection, enhancement)
Core
DOM: Selection
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
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 only when it's enabled and the Selection needs to notify it of selection change.
Assignee | ||
Comment 1•7 years ago
|
||
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 and
make it in cycle collection, 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.
Assignee | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment on attachment 9005541 [details]
Bug 1487591 - Make Selection treat AccessibleCaretEventHub as concrete class rather than nsISelectionListener
Olli Pettay [:smaug] has approved the revision.
Attachment #9005541 -
Flags: review+
Assignee | ||
Comment 4•7 years ago
|
||
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/bdbd39b2251d
Make Selection treat AccessibleCaretEventHub as concrete class rather than nsISelectionListener r=smaug
Comment 6•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in
before you can comment on or make changes to this bug.
Description
•