mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
It does not make sense to copy masked password with mask characters. Therefore, we should allow users to copy/cut in password fields only when selected range is in unmasked range. Note that for web-compat, copy/cut are always enabled in HTML/XHTML document in content. Therefore this patch changes the behavior only in chrome's password fields. Additionally, only the test uses `nsIEditor.canDelete()`. Therefore, this removes it and make the test use `nsIDocShell.isCommandEnabled()` instead. Unfortunately, `nsIEditor.canCopy()` and `nsIEditor.canCut()` are used by BlueGriffon, therefore, we cannot get rid of them for now. Differential Revision: https://phabricator.services.mozilla.com/D38999