Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | 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. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
9eb45752950bce70c2475b67536fb3e4 |
User & Date: | drh 2011-09-01 17:04:34.939 |
Context
2011-09-01
| ||
17:45 | Merging the unwanted two trunk leaves. ... (check-in: a22c3817 user: viriketo tags: trunk) | |
17:04 | 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. ... (check-in: 9eb45752 user: drh tags: trunk) | |
14:31 | substantive improvement to sha1 speed (especially on x86) ... (check-in: f2ede7da user: ron tags: trunk) | |
Changes
Changes to src/timeline.c.
︙ | ︙ | |||
549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | } if( cSep=='[' ) cgi_printf("["); cgi_printf("]}%s", pRow->pNext ? ",\n" : "];\n"); } cgi_printf("var nrail = %d\n", pGraph->mxRail+1); graph_free(pGraph); @ var canvasDiv = document.getElementById("canvas"); @ var realCanvas = null; @ function drawBox(color,x0,y0,x1,y1){ @ var n = document.createElement("div"); @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; } @ var w = x1-x0+1; @ var h = y1-y0+1; @ n.style.position = "absolute"; | > > | 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 | } if( cSep=='[' ) cgi_printf("["); cgi_printf("]}%s", pRow->pNext ? ",\n" : "];\n"); } cgi_printf("var nrail = %d\n", pGraph->mxRail+1); graph_free(pGraph); @ var canvasDiv = document.getElementById("canvas"); #if 0 @ var realCanvas = null; #endif @ function drawBox(color,x0,y0,x1,y1){ @ var n = document.createElement("div"); @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; } @ var w = x1-x0+1; @ var h = y1-y0+1; @ n.style.position = "absolute"; |
︙ | ︙ | |||
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | @ var left = absoluteX("m"+rowinfo[0].id) - absoluteX("canvas") + 15; @ var width = nrail*20; @ for(var i in rowinfo){ @ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY; @ rowinfo[i].x = left + rowinfo[i].r*20; @ } @ var btm = absoluteY("grbtm") + 10 - canvasY; @ if( btm<32768 ){ @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+ @ 'style="position:absolute;left:'+(left-5)+'px;"' + @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>'; @ realCanvas = document.getElementById('timeline-canvas'); @ }else{ @ realCanvas = 0; @ } @ var context; @ if( realCanvas && realCanvas.getContext @ && (context = realCanvas.getContext('2d'))) { @ drawBox = function(color,x0,y0,x1,y1) { @ if( y0>32767 || y1>32767 ) return; @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; } @ if(isNaN(x0) || isNaN(y0) || isNaN(x1) || isNaN(y1)) return; @ context.fillStyle = color; @ context.fillRect(x0-left+5,y0,x1-x0+1,y1-y0+1); @ }; @ } @ for(var i in rowinfo){ @ drawNode(rowinfo[i], left, btm); @ } @ } @ var lastId = "m"+rowinfo[rowinfo.length-1].id; @ var lastY = 0; @ function checkHeight(){ | > > | 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 | @ var left = absoluteX("m"+rowinfo[0].id) - absoluteX("canvas") + 15; @ var width = nrail*20; @ for(var i in rowinfo){ @ rowinfo[i].y = absoluteY("m"+rowinfo[i].id) + 10 - canvasY; @ rowinfo[i].x = left + rowinfo[i].r*20; @ } @ var btm = absoluteY("grbtm") + 10 - canvasY; #if 0 @ if( btm<32768 ){ @ canvasDiv.innerHTML = '<canvas id="timeline-canvas" '+ @ 'style="position:absolute;left:'+(left-5)+'px;"' + @ ' width="'+width+'" height="'+btm+'"><'+'/canvas>'; @ realCanvas = document.getElementById('timeline-canvas'); @ }else{ @ realCanvas = 0; @ } @ var context; @ if( realCanvas && realCanvas.getContext @ && (context = realCanvas.getContext('2d'))) { @ drawBox = function(color,x0,y0,x1,y1) { @ if( y0>32767 || y1>32767 ) return; @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } @ if( y0>y1 ){ var t=y0; y0=y1; y1=t; } @ if(isNaN(x0) || isNaN(y0) || isNaN(x1) || isNaN(y1)) return; @ context.fillStyle = color; @ context.fillRect(x0-left+5,y0,x1-x0+1,y1-y0+1); @ }; @ } #endif @ for(var i in rowinfo){ @ drawNode(rowinfo[i], left, btm); @ } @ } @ var lastId = "m"+rowinfo[rowinfo.length-1].id; @ var lastY = 0; @ function checkHeight(){ |
︙ | ︙ |