mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 08:45:46 +00:00
Bug 1386468 - Only register SelectionChangeListener for plaintext controls when dom.select_events.textcontrols.enabled is turned on; r=mystor
This commit is contained in:
parent
68b377c1ce
commit
064dd8f2a2
@ -728,8 +728,13 @@ nsFrameSelection::Init(nsIPresShell *aShell, nsIContent *aLimiter)
|
||||
}
|
||||
}
|
||||
|
||||
bool plaintextControl = (aLimiter != nullptr);
|
||||
bool initSelectEvents = plaintextControl ?
|
||||
sSelectionEventsOnTextControlsEnabled :
|
||||
sSelectionEventsEnabled;
|
||||
|
||||
nsIDocument* doc = aShell->GetDocument();
|
||||
if (sSelectionEventsEnabled ||
|
||||
if (initSelectEvents ||
|
||||
(doc && nsContentUtils::IsSystemPrincipal(doc->NodePrincipal()))) {
|
||||
int8_t index = GetIndexFromSelectionType(SelectionType::eNormal);
|
||||
if (mDomSelections[index]) {
|
||||
|
Loading…
Reference in New Issue
Block a user