Issue #2106 - Follow-up: Un-prefix DOM Attribute MozUserSelect

This commit is contained in:
Andy 2025-07-07 10:45:22 -07:00 • committed by roytam1
commit abb891ff26
7 changed files with 8 additions and 8 deletions

File diff suppressed because one or more lines are too long

View file

@ -54,11 +54,11 @@ function test()
.getInterface(Ci.nsIWebNavigation) .getInterface(Ci.nsIWebNavigation)
var docShell = webnav.QueryInterface(Ci.nsIDocShell); var docShell = webnav.QueryInterface(Ci.nsIDocShell);
var test2Inner = iframe2.contentDocument.getElementById('test2Inner'); var test2Inner = iframe2.contentDocument.getElementById('test2Inner');
test2Inner.style.MozUserSelect = 'text'; test2Inner.style.UserSelect = 'text';
docShell.doCommand("cmd_selectAll"); docShell.doCommand("cmd_selectAll");
var withoutUserSelect = snapshotWindow(iframe2.contentWindow); var withoutUserSelect = snapshotWindow(iframe2.contentWindow);
test2Inner.style.MozUserSelect = 'none'; test2Inner.style.UserSelect = 'none';
docShell.doCommand("cmd_selectAll"); docShell.doCommand("cmd_selectAll");
var withUserSelect = snapshotWindow(iframe2.contentWindow); var withUserSelect = snapshotWindow(iframe2.contentWindow);
ok(compareSnapshots(withoutUserSelect, withUserSelect, true)[0], 'Editable fields should ignore user select style'); ok(compareSnapshots(withoutUserSelect, withUserSelect, true)[0], 'Editable fields should ignore user select style');

File diff suppressed because one or more lines are too long

View file

@ -40,7 +40,7 @@ var sel = window.getSelection();
function enableSelection(id) { function enableSelection(id) {
var span = document.getElementById(id); var span = document.getElementById(id);
span.style.MozUserSelect = 'text'; span.style.UserSelect = 'text';
} }
function setupPrevSelection() { function setupPrevSelection() {

View file

@ -2238,7 +2238,7 @@ var gCSSProperties = {
invalid_values: [] invalid_values: []
}, },
"user-select": { "user-select": {
domProp: "MozUserSelect", domProp: "UserSelect",
inherited: false, inherited: false,
type: CSS_TYPE_LONGHAND, type: CSS_TYPE_LONGHAND,
initial_values: [ "auto" ], initial_values: [ "auto" ],

View file

@ -4096,7 +4096,7 @@ if(dojo.isIE || dojo.isOpera){
// selectable: // selectable:
node = d.byId(node); node = d.byId(node);
if(d.isMozilla){ if(d.isMozilla){
node.style.MozUserSelect = selectable ? "" : "none"; node.style.UserSelect = selectable ? "" : "none";
}else if(d.isKhtml){ }else if(d.isKhtml){
node.style.KhtmlUserSelect = selectable ? "auto" : "none"; node.style.KhtmlUserSelect = selectable ? "auto" : "none";
}else if(d.isIE){ }else if(d.isIE){

File diff suppressed because one or more lines are too long