Bug 338087 Tinderbox 'L' popups are broken in Firefox trunk due to misuse of DOM Range

patch by Olli.Pettay@gmail.com r=timeless


git-svn-id: svn://10.0.0.236/trunk@200415 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org 2006-06-20 06:28:37 +00:00
parent e59d37db38
commit 7a444c8559
2 changed files with 5 additions and 16 deletions

View File

@ -10,12 +10,6 @@ if (document.body && document.body.addEventListener) {
}
setTimeout('location.reload()',900000);
function nodewrite(n,t) {
var r = document.createRange();
r.setStart(n,0);
n.appendChild(r.createContextualFragment(t));
}
function closepopup() {
var p = document.getElementById("popup");
if (p && p.parentNode) {
@ -90,7 +84,7 @@ function comment(d,commentid,logfile) {
}
closepopup()
l = document.createElement("div");
nodewrite(l,comments[commentid]);
l.innerHTML = comments[commentid];
l.setAttribute("id", "popup");
l.style.position = "absolute";
l.className = "comment";
@ -132,10 +126,10 @@ function log(e,buildindex,logfile) {
}
closepopup();
var l = document.createElement("div");
nodewrite(l,"<B>" + builds[buildindex] + "</B><BR>"
l.innerHTML = "<B>" + builds[buildindex] + "</B><BR>"
+ "<A HREF=" + logurl + ">View Brief Log</A><BR>"
+ "<A HREF=" + logurl + "&fulltext=1"+">View Full Log</A><BR>"
+ "<A HREF=" + commenturl + ">Add a Comment</A><BR>");
+ "<A HREF=" + commenturl + ">Add a Comment</A><BR>";
l.setAttribute("id", "popup");
l.className = "log";
t.parentNode.appendChild(l);

View File

@ -720,11 +720,6 @@ sub print_javascript {
if (document.body && document.body.addEventListener) {
document.body.addEventListener("click",maybeclosepopup,false);
}
function nodewrite(n,t) {
var r = document.createRange();
r.setStart(n,0);
n.appendChild(r.createContextualFragment(t));
}
function closepopup() {
var p = document.getElementById("popup");
if (p && p.parentNode) {
@ -828,7 +823,7 @@ sub print_javascript {
}
closepopup()
l = document.createElement("div");
nodewrite(l,notes[noteid]);
l.innerHTML = notes[noteid];
l.setAttribute("id", "popup");
l.style.position = "absolute";
l.className = "note";
@ -884,7 +879,7 @@ sub print_javascript {
}
closepopup();
var l = document.createElement("div");
nodewrite(l,blurb + "<BR>");
l.innerHTML = blurb + "<BR>";
l.setAttribute("id", "popup");
l.className = "log";
t.parentNode.appendChild(l);