Bug 1268410 - Change the default value of "layout.accessiblecaret.timeout_ms" to 0. draft
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 28 Apr 2016 20:21:23 +0800
changeset 357282 dd2b9f656992582b2904f70e99ac426120924ef3
parent 357178 2a8c6a01d6062b7d9d4e5cdb562f791bcde048f7
child 519616 670644dcf33dbd436897d4b43e912b99788dedbe
push id16749
push usertlin@mozilla.com
push dateThu, 28 Apr 2016 12:29:17 +0000
bugs1268410
milestone49.0a1
Bug 1268410 - Change the default value of "layout.accessiblecaret.timeout_ms" to 0. That is, the single caret in cursor mode will always persist on all platforms as on Firefox Android. MozReview-Commit-ID: 5MTCf1n2dF3
b2g/app/b2g.js
mobile/android/app/mobile.js
modules/libpref/init/all.js
--- a/b2g/app/b2g.js
+++ b/b2g/app/b2g.js
@@ -1048,16 +1048,19 @@ pref("dom.apps.reviewer_paths", "/review
 
 // New implementation to unify touch-caret and selection-carets.
 pref("layout.accessiblecaret.enabled", true);
 
 // Show the selection bars at the two ends of the selection highlight. Required
 // by the spec in bug 921965.
 pref("layout.accessiblecaret.bar.enabled", true);
 
+// Hide the caret in cursor mode after 3 seconds.
+pref("layout.accessiblecaret.timeout_ms", 3000);
+
 // APZ on real devices supports long tap events.
 #ifdef MOZ_WIDGET_GONK
 pref("layout.accessiblecaret.use_long_tap_injector", false);
 #endif
 
 // Hide carets and text selection dialog during scrolling.
 pref("layout.accessiblecaret.always_show_when_scrolling", false);
 
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -917,19 +917,16 @@ pref("layout.accessiblecaret.enabled", t
 // AccessibleCaret CSS for the Android L style assets.
 pref("layout.accessiblecaret.width", "22.0");
 pref("layout.accessiblecaret.height", "22.0");
 pref("layout.accessiblecaret.margin-left", "-11.5");
 
 // Android needs to show the caret when long tapping on an empty content.
 pref("layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content", true);
 
-// Android needs persistent carets and actionbar. Turn off the caret timeout.
-pref("layout.accessiblecaret.timeout_ms", 0);
-
 // Android generates long tap (mouse) events.
 pref("layout.accessiblecaret.use_long_tap_injector", false);
 
 // Androids carets are always tilt to match the text selection guideline.
 pref("layout.accessiblecaret.always_tilt", true);
 
 // Selection change notifications generated by Javascript changes
 // update active AccessibleCarets / UI interactions.
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4999,17 +4999,17 @@ pref("layout.accessiblecaret.bar.width",
 // Show no selection bars at the two ends of the selection highlight.
 pref("layout.accessiblecaret.bar.enabled", false);
 
 // Show the caret when long tapping on an empty content.
 pref("layout.accessiblecaret.caret_shown_when_long_tapping_on_empty_content", false);
 
 // Timeout in milliseconds to hide the accessiblecaret under cursor mode while
 // no one touches it. Set the value to 0 to disable this feature.
-pref("layout.accessiblecaret.timeout_ms", 3000);
+pref("layout.accessiblecaret.timeout_ms", 0);
 
 // Simulate long tap to select words on the platforms where APZ is not enabled
 // or long tap events does not fired by APZ.
 pref("layout.accessiblecaret.use_long_tap_injector", true);
 
 // By default, carets become tilt only when they are overlapping.
 pref("layout.accessiblecaret.always_tilt", false);