зеркало из https://github.com/mozilla/pjs.git
Bug 297286 (Changing Color breaks 'Set as desktop background') - Fire colorpicker and preferences events in the right context object. r=mconnor, a=asa
This commit is contained in:
Родитель
53a5b9538a
Коммит
e91ac43262
|
@ -111,7 +111,7 @@
|
|||
<setter><![CDATA[
|
||||
if (!val)
|
||||
return val;
|
||||
uppercaseVal = val.toUpperCase();
|
||||
var uppercaseVal = val.toUpperCase();
|
||||
// Translate standard HTML color strings:
|
||||
if (uppercaseVal[0] != "#") {
|
||||
switch (val) {
|
||||
|
@ -215,7 +215,8 @@
|
|||
event.initEvent(aEventName, false, true);
|
||||
var cancel = !aTarget.dispatchEvent(event);
|
||||
if (aTarget.hasAttribute("on" + aEventName)) {
|
||||
var rv = (new Function ("event", aTarget.getAttribute("on" + aEventName)))(event);
|
||||
var fn = new Function ("event", aTarget.getAttribute("on" + aEventName));
|
||||
var rv = fn.call(aTarget, event);
|
||||
if (rv == false)
|
||||
cancel = true;
|
||||
}
|
||||
|
@ -485,7 +486,8 @@
|
|||
event.initEvent(aEventName, false, true);
|
||||
var cancel = !aTarget.dispatchEvent(event);
|
||||
if (aTarget.hasAttribute("on" + aEventName)) {
|
||||
var rv = (new Function ("event", aTarget.getAttribute("on" + aEventName)))(event);
|
||||
var fn = new Function ("event", aTarget.getAttribute("on" + aEventName));
|
||||
var rv = fn.call(aTarget, event);
|
||||
if (rv == false)
|
||||
cancel = true;
|
||||
}
|
||||
|
|
|
@ -610,7 +610,8 @@
|
|||
event.initEvent(aEventName, false, true);
|
||||
var cancel = !aTarget.dispatchEvent(event);
|
||||
if (aTarget.hasAttribute("on" + aEventName)) {
|
||||
var rv = (new Function ("event", aTarget.getAttribute("on" + aEventName)))(event);
|
||||
var fn = new Function ("event", aTarget.getAttribute("on" + aEventName));
|
||||
var rv = fn.call(aTarget, event);
|
||||
if (rv == false)
|
||||
cancel = true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче