Bug 1092888 - Part 1: Remove preference for selection carets with non-editable fields support. r=roc

This commit is contained in:
Morris Tseng 2014-11-10 02:03:00 +01:00
parent 364fdddd4b
commit 5320508cc4
2 changed files with 0 additions and 24 deletions

View File

@ -63,13 +63,6 @@ static const char* kSelectionCaretsLogModuleName = "SelectionCarets";
static const int32_t kMoveStartTolerancePx = 5;
// Time for trigger scroll end event, in miliseconds.
static const int32_t kScrollEndTimerDelay = 300;
// Read from preference "selectioncaret.noneditable". Indicate whether support
// non-editable fields selection or not. We have stable state for editable
// fields selection now. And we don't want to break this stable state when
// enabling non-editable support. So I add a pref to control to support or
// not. Once non-editable fields support is stable. We should remove this
// pref.
static bool kSupportNonEditableFields = false;
NS_IMPL_ISUPPORTS(SelectionCarets,
nsIReflowObserver,
@ -103,8 +96,6 @@ SelectionCarets::SelectionCarets(nsIPresShell* aPresShell)
if (!addedPref) {
Preferences::AddIntVarCache(&sSelectionCaretsInflateSize,
"selectioncaret.inflatesize.threshold");
Preferences::AddBoolVarCache(&kSupportNonEditableFields,
"selectioncaret.noneditable");
addedPref = true;
}
}
@ -472,14 +463,6 @@ SelectionCarets::UpdateSelectionCarets()
return;
}
// If frame isn't editable and we don't support non-editable fields, bail
// out.
if (!kSupportNonEditableFields &&
(!startFrame->GetContent()->IsEditable() ||
!endFrame->GetContent()->IsEditable())) {
return;
}
// Check if startFrame is after endFrame.
if (nsLayoutUtils::CompareTreePosition(startFrame, endFrame) > 0) {
SetVisibility(false);
@ -558,12 +541,6 @@ SelectionCarets::SelectWord()
return NS_OK;
}
// If frame isn't editable and we don't support non-editable fields, bail
// out.
if (!kSupportNonEditableFields && !ptFrame->GetContent()->IsEditable()) {
return NS_OK;
}
nsPoint ptInFrame = mDownPoint;
nsLayoutUtils::TransformPoint(rootFrame, ptFrame, ptInFrame);

View File

@ -4363,7 +4363,6 @@ pref("touchcaret.expiration.time", 3000);
// Turn off selection caret by default
pref("selectioncaret.enabled", false);
pref("selectioncaret.noneditable", false);
// This will inflate size of selection caret frame when we checking if
// user click on selection caret or not. In app units.