mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1092888 - Part 1: Remove preference for selection carets with non-editable fields support. r=roc
This commit is contained in:
parent
8664cddfe6
commit
8fde6b3f3e
@ -64,13 +64,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,
|
||||
@ -104,8 +97,6 @@ SelectionCarets::SelectionCarets(nsIPresShell* aPresShell)
|
||||
if (!addedPref) {
|
||||
Preferences::AddIntVarCache(&sSelectionCaretsInflateSize,
|
||||
"selectioncaret.inflatesize.threshold");
|
||||
Preferences::AddBoolVarCache(&kSupportNonEditableFields,
|
||||
"selectioncaret.noneditable");
|
||||
addedPref = true;
|
||||
}
|
||||
}
|
||||
@ -473,14 +464,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);
|
||||
@ -559,12 +542,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;
|
||||
}
|
||||
|
||||
bool selectable;
|
||||
ptFrame->IsSelectable(&selectable, nullptr);
|
||||
if (!selectable) {
|
||||
|
@ -4370,7 +4370,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.
|
||||
|
Loading…
Reference in New Issue
Block a user