Fossil SCM
Disable the use of <canvas> for rendering the graph. The canvas is busted in recent versions of Firefox. And canvas is mostly busted by design anyhow, since apparently it can not be taller than 32768 pixels, and Fossil graphs frequently need to be taller than that.
Commit
9eb45752950bce70c2475b67536fb3e427c0032d
Parent
f2ede7da6d70851…
1 file changed
+4
+4
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -551,11 +551,13 @@ | ||
| 551 | 551 | cgi_printf("]}%s", pRow->pNext ? ",\n" : "];\n"); |
| 552 | 552 | } |
| 553 | 553 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 554 | 554 | graph_free(pGraph); |
| 555 | 555 | @ var canvasDiv = document.getElementById("canvas"); |
| 556 | +#if 0 | |
| 556 | 557 | @ var realCanvas = null; |
| 558 | +#endif | |
| 557 | 559 | @ function drawBox(color,x0,y0,x1,y1){ |
| 558 | 560 | @ var n = document.createElement("div"); |
| 559 | 561 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 560 | 562 | @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; } |
| 561 | 563 | @ var w = x1-x0+1; |
| @@ -680,10 +682,11 @@ | ||
| 680 | 682 | @ for(var i in rowinfo){ |
| 681 | 683 | @ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY; |
| 682 | 684 | @ rowinfo[i].x = left + rowinfo[i].r*20; |
| 683 | 685 | @ } |
| 684 | 686 | @ var btm = absoluteY("grbtm") + 10 - canvasY; |
| 687 | +#if 0 | |
| 685 | 688 | @ if( btm<32768 ){ |
| 686 | 689 | @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+ |
| 687 | 690 | @ 'style="position:absolute;left:'+(left-5)+'px;"' + |
| 688 | 691 | @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>'; |
| 689 | 692 | @ realCanvas = document.getElementById('timeline-canvas'); |
| @@ -700,10 +703,11 @@ | ||
| 700 | 703 | @ if(isNaN(x0) || isNaN(y0) || isNaN(x1) || isNaN(y1)) return; |
| 701 | 704 | @ context.fillStyle = color; |
| 702 | 705 | @ context.fillRect(x0-left+5,y0,x1-x0+1,y1-y0+1); |
| 703 | 706 | @ }; |
| 704 | 707 | @ } |
| 708 | +#endif | |
| 705 | 709 | @ for(var i in rowinfo){ |
| 706 | 710 | @ drawNode(rowinfo[i], left, btm); |
| 707 | 711 | @ } |
| 708 | 712 | @ } |
| 709 | 713 | @ var lastId = "m"+rowinfo[rowinfo.length-1].id; |
| 710 | 714 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -551,11 +551,13 @@ | |
| 551 | cgi_printf("]}%s", pRow->pNext ? ",\n" : "];\n"); |
| 552 | } |
| 553 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 554 | graph_free(pGraph); |
| 555 | @ var canvasDiv = document.getElementById("canvas"); |
| 556 | @ var realCanvas = null; |
| 557 | @ function drawBox(color,x0,y0,x1,y1){ |
| 558 | @ var n = document.createElement("div"); |
| 559 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 560 | @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; } |
| 561 | @ var w = x1-x0+1; |
| @@ -680,10 +682,11 @@ | |
| 680 | @ for(var i in rowinfo){ |
| 681 | @ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY; |
| 682 | @ rowinfo[i].x = left + rowinfo[i].r*20; |
| 683 | @ } |
| 684 | @ var btm = absoluteY("grbtm") + 10 - canvasY; |
| 685 | @ if( btm<32768 ){ |
| 686 | @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+ |
| 687 | @ 'style="position:absolute;left:'+(left-5)+'px;"' + |
| 688 | @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>'; |
| 689 | @ realCanvas = document.getElementById('timeline-canvas'); |
| @@ -700,10 +703,11 @@ | |
| 700 | @ if(isNaN(x0) || isNaN(y0) || isNaN(x1) || isNaN(y1)) return; |
| 701 | @ context.fillStyle = color; |
| 702 | @ context.fillRect(x0-left+5,y0,x1-x0+1,y1-y0+1); |
| 703 | @ }; |
| 704 | @ } |
| 705 | @ for(var i in rowinfo){ |
| 706 | @ drawNode(rowinfo[i], left, btm); |
| 707 | @ } |
| 708 | @ } |
| 709 | @ var lastId = "m"+rowinfo[rowinfo.length-1].id; |
| 710 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -551,11 +551,13 @@ | |
| 551 | cgi_printf("]}%s", pRow->pNext ? ",\n" : "];\n"); |
| 552 | } |
| 553 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 554 | graph_free(pGraph); |
| 555 | @ var canvasDiv = document.getElementById("canvas"); |
| 556 | #if 0 |
| 557 | @ var realCanvas = null; |
| 558 | #endif |
| 559 | @ function drawBox(color,x0,y0,x1,y1){ |
| 560 | @ var n = document.createElement("div"); |
| 561 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 562 | @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; } |
| 563 | @ var w = x1-x0+1; |
| @@ -680,10 +682,11 @@ | |
| 682 | @ for(var i in rowinfo){ |
| 683 | @ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY; |
| 684 | @ rowinfo[i].x = left + rowinfo[i].r*20; |
| 685 | @ } |
| 686 | @ var btm = absoluteY("grbtm") + 10 - canvasY; |
| 687 | #if 0 |
| 688 | @ if( btm<32768 ){ |
| 689 | @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+ |
| 690 | @ 'style="position:absolute;left:'+(left-5)+'px;"' + |
| 691 | @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>'; |
| 692 | @ realCanvas = document.getElementById('timeline-canvas'); |
| @@ -700,10 +703,11 @@ | |
| 703 | @ if(isNaN(x0) || isNaN(y0) || isNaN(x1) || isNaN(y1)) return; |
| 704 | @ context.fillStyle = color; |
| 705 | @ context.fillRect(x0-left+5,y0,x1-x0+1,y1-y0+1); |
| 706 | @ }; |
| 707 | @ } |
| 708 | #endif |
| 709 | @ for(var i in rowinfo){ |
| 710 | @ drawNode(rowinfo[i], left, btm); |
| 711 | @ } |
| 712 | @ } |
| 713 | @ var lastId = "m"+rowinfo[rowinfo.length-1].id; |
| 714 |