Bug 1249201 Part 1 - Add "scroll" reason to CaretStateChangedEvent.
When the carets are scrolled by APZ, they will hide and dispatch a
"visibilitychange" reason. The floating toolbar (ActionBarHandler.js) on
Android listens to the event to update its visibility.
Now we want to show carets continuously when scrolling the page, so it
make no sense to dispatch a "visibilitychange" reason. However we still
need to notify the toolbar that the carets are scrolling by apz.
Therefore, we need a this new "scroll" reason. It will be dispatch in
AccessibleCaretManager::OnScrollStart() in Part 2.
MozReview-Commit-ID: F9znxHV3xCZ
--- a/dom/webidl/CaretStateChangedEvent.webidl
+++ b/dom/webidl/CaretStateChangedEvent.webidl
@@ -5,17 +5,18 @@
*/
enum CaretChangedReason {
"visibilitychange",
"updateposition",
"longpressonemptycontent",
"taponcaret",
"presscaret",
- "releasecaret"
+ "releasecaret",
+ "scroll"
};
dictionary CaretStateChangedEventInit : EventInit {
boolean collapsed = true;
DOMRectReadOnly? boundingClientRect = null;
CaretChangedReason reason = "visibilitychange";
boolean caretVisible = false;
boolean caretVisuallyVisible = false;