Bug 1664411 - Factor out a condition to unconditionally enable clipboard events in some documents. r=masayuki
This patch shouldn't introduce any behavior change. Differential Revision: https://phabricator.services.mozilla.com/D89834
This commit is contained in:
@@ -664,10 +664,7 @@ nsresult TextEditor::PasteTransferableAsAction(nsITransferable* aTransferable,
|
||||
}
|
||||
|
||||
bool TextEditor::CanPaste(int32_t aClipboardType) const {
|
||||
// Always enable the paste command when inside of a HTML or XHTML document,
|
||||
// but if the document is chrome, let it control it.
|
||||
RefPtr<Document> doc = GetDocument();
|
||||
if (doc && doc->IsHTMLOrXHTML() && !nsContentUtils::IsChromeDoc(doc)) {
|
||||
if (AreClipboardCommandsUnconditionallyEnabled()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user