Bug 1240917 - Do not show caret in empty input on Fennec. r=roc
Per request in
bug 1240917 comment 15, we decided not to show caret when
single press on an empty input. This effectively reverts the work in
Bug
1230582.
--- a/layout/base/AccessibleCaretManager.cpp
+++ b/layout/base/AccessibleCaretManager.cpp
@@ -260,20 +260,17 @@ AccessibleCaretManager::UpdateCaretsForC
switch (result) {
case PositionChangedResult::NotChanged:
// Do nothing
break;
case PositionChangedResult::Changed:
switch (aHint) {
case UpdateCaretsHint::Default:
- // On Fennec, always show accessiblecaret even if the input is empty
- // to make ActionBar visible.
- if (sCaretsExtendedVisibility ||
- HasNonEmptyTextContent(GetEditingHostForFrame(frame))) {
+ if (HasNonEmptyTextContent(GetEditingHostForFrame(frame))) {
mFirstCaret->SetAppearance(Appearance::Normal);
} else {
mFirstCaret->SetAppearance(Appearance::NormalNotShown);
}
break;
case UpdateCaretsHint::RespectOldAppearance:
// Do nothing to prevent the appearance of the caret being
--- a/layout/base/AccessibleCaretManager.h
+++ b/layout/base/AccessibleCaretManager.h
@@ -247,18 +247,17 @@ protected:
// AppUnit.h.
static const int32_t kBoundaryAppUnits = 61;
// Preference to show selection bars at the two ends in selection mode. The
// selection bar is always disabled in cursor mode.
static bool sSelectionBarEnabled;
// Android specific visibility extensions correct compatibility issues
- // with caret-drag, tapping into empty inputs, and ActionBar visiblity
- // during page scroll.
+ // with caret-drag and ActionBar visibility during page scroll.
static bool sCaretsExtendedVisibility;
// By default, javascript content selection changes closes AccessibleCarets and
// UI interactions. Optionally, we can try to maintain the active UI, keeping
// carets and ActionBar available.
static bool sCaretsScriptUpdates;
// AccessibleCaret pref for haptic feedback behaviour on longPress.