зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1386468 - Only register SelectionChangeListener for plaintext controls when dom.select_events.textcontrols.enabled is turned on; r=mystor
This commit is contained in:
Родитель
68b377c1ce
Коммит
064dd8f2a2
|
@ -728,8 +728,13 @@ nsFrameSelection::Init(nsIPresShell *aShell, nsIContent *aLimiter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool plaintextControl = (aLimiter != nullptr);
|
||||||
|
bool initSelectEvents = plaintextControl ?
|
||||||
|
sSelectionEventsOnTextControlsEnabled :
|
||||||
|
sSelectionEventsEnabled;
|
||||||
|
|
||||||
nsIDocument* doc = aShell->GetDocument();
|
nsIDocument* doc = aShell->GetDocument();
|
||||||
if (sSelectionEventsEnabled ||
|
if (initSelectEvents ||
|
||||||
(doc && nsContentUtils::IsSystemPrincipal(doc->NodePrincipal()))) {
|
(doc && nsContentUtils::IsSystemPrincipal(doc->NodePrincipal()))) {
|
||||||
int8_t index = GetIndexFromSelectionType(SelectionType::eNormal);
|
int8_t index = GetIndexFromSelectionType(SelectionType::eNormal);
|
||||||
if (mDomSelections[index]) {
|
if (mDomSelections[index]) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче