mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Bug 971628 - Avoid exceptions when entering invalid property names in the rule-view; r=miker
This commit is contained in:
parent
36b521c0b6
commit
525e1e83dd
@ -94,15 +94,6 @@ function test() {
|
||||
is(fragment.textContent, "#F06");
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "border-top-left-color",
|
||||
value: "rgba(14, 255, 20, .5)",
|
||||
test: fragment => {
|
||||
is(countAll(fragment), 1);
|
||||
is(countColors(fragment), 1);
|
||||
is(fragment.textContent, "rgba(14, 255, 20, .5)");
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "border",
|
||||
value: "80em dotted pink",
|
||||
|
@ -294,16 +294,12 @@ OutputParser.prototype = {
|
||||
let win = Services.appShell.hiddenDOMWindow;
|
||||
let doc = win.document;
|
||||
|
||||
name = name.replace(/-\w{1}/g, function(match) {
|
||||
return match.charAt(1).toUpperCase();
|
||||
});
|
||||
|
||||
value = value.replace("!important", "");
|
||||
|
||||
let div = doc.createElement("div");
|
||||
div.style[name] = value;
|
||||
div.style.setProperty(name, value);
|
||||
|
||||
return !!div.style[name];
|
||||
return !!div.style.getPropertyValue(name);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user