Bug 1268410 - Change the default value of "layout.accessiblecaret.timeout_ms" to 0. r=mats
authorTing-Yu Lin <tlin@mozilla.com>
Thu, 28 Apr 2016 20:21:23 +0800
changeset 357700 4145291190269551381c2d07e06d7c92b85ccb45
parent 357699 e791431d1864b4609b43533fe7d4351e192a9e46
child 357701 e9799a1b6d300a49ec0e14b48d837be873d373ae
push id16816
push userbmo:gasolin@mozilla.com
push dateFri, 29 Apr 2016 03:33:20 +0000
reviewersmats
bugs1268410
milestone49.0a1
Bug 1268410 - Change the default value of "layout.accessiblecaret.timeout_ms" to 0. r=mats 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
@@ -996,16 +996,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
@@ -882,19 +882,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
@@ -5055,17 +5055,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);