Fossil SCM
Fix display of timeline graph in IE8, broken by commit [e412f97999]
Commit
5885241f52c6182e92368b19d0da892bb61f9a01
Parent
c06e296b4069e27…
2 files changed
+3
-3
+3
-3
+3
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -649,13 +649,13 @@ | ||
| 649 | 649 | cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n"); |
| 650 | 650 | } |
| 651 | 651 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 652 | 652 | graph_free(pGraph); |
| 653 | 653 | @ var canvasDiv = gebi("canvas"); |
| 654 | - @ var canvasStyle = window.getComputedStyle(canvasDiv,null); | |
| 655 | - @ var lineColor = canvasStyle.getPropertyValue('color') || 'black'; | |
| 656 | - @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white'; | |
| 654 | + @ var canvasStyle = window.getComputedStyle && window.getComputedStyle(canvasDiv,null); | |
| 655 | + @ var lineColor = (canvasStyle && canvasStyle.getPropertyValue('color')) || 'black'; | |
| 656 | + @ var bgColor = (canvasStyle && canvasStyle.getPropertyValue('background-color')) || 'white'; | |
| 657 | 657 | @ if( bgColor=='transparent' ) bgColor = 'white'; |
| 658 | 658 | @ var boxColor = lineColor; |
| 659 | 659 | @ function drawBox(color,x0,y0,x1,y1){ |
| 660 | 660 | @ var n = document.createElement("div"); |
| 661 | 661 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 662 | 662 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -649,13 +649,13 @@ | |
| 649 | cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n"); |
| 650 | } |
| 651 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 652 | graph_free(pGraph); |
| 653 | @ var canvasDiv = gebi("canvas"); |
| 654 | @ var canvasStyle = window.getComputedStyle(canvasDiv,null); |
| 655 | @ var lineColor = canvasStyle.getPropertyValue('color') || 'black'; |
| 656 | @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white'; |
| 657 | @ if( bgColor=='transparent' ) bgColor = 'white'; |
| 658 | @ var boxColor = lineColor; |
| 659 | @ function drawBox(color,x0,y0,x1,y1){ |
| 660 | @ var n = document.createElement("div"); |
| 661 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 662 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -649,13 +649,13 @@ | |
| 649 | cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n"); |
| 650 | } |
| 651 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 652 | graph_free(pGraph); |
| 653 | @ var canvasDiv = gebi("canvas"); |
| 654 | @ var canvasStyle = window.getComputedStyle && window.getComputedStyle(canvasDiv,null); |
| 655 | @ var lineColor = (canvasStyle && canvasStyle.getPropertyValue('color')) || 'black'; |
| 656 | @ var bgColor = (canvasStyle && canvasStyle.getPropertyValue('background-color')) || 'white'; |
| 657 | @ if( bgColor=='transparent' ) bgColor = 'white'; |
| 658 | @ var boxColor = lineColor; |
| 659 | @ function drawBox(color,x0,y0,x1,y1){ |
| 660 | @ var n = document.createElement("div"); |
| 661 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 662 |
+3
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -649,13 +649,13 @@ | ||
| 649 | 649 | cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n"); |
| 650 | 650 | } |
| 651 | 651 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 652 | 652 | graph_free(pGraph); |
| 653 | 653 | @ var canvasDiv = gebi("canvas"); |
| 654 | - @ var canvasStyle = window.getComputedStyle(canvasDiv,null); | |
| 655 | - @ var lineColor = canvasStyle.getPropertyValue('color') || 'black'; | |
| 656 | - @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white'; | |
| 654 | + @ var canvasStyle = window.getComputedStyle && window.getComputedStyle(canvasDiv,null); | |
| 655 | + @ var lineColor = (canvasStyle && canvasStyle.getPropertyValue('color')) || 'black'; | |
| 656 | + @ var bgColor = (canvasStyle && canvasStyle.getPropertyValue('background-color')) || 'white'; | |
| 657 | 657 | @ if( bgColor=='transparent' ) bgColor = 'white'; |
| 658 | 658 | @ var boxColor = lineColor; |
| 659 | 659 | @ function drawBox(color,x0,y0,x1,y1){ |
| 660 | 660 | @ var n = document.createElement("div"); |
| 661 | 661 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 662 | 662 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -649,13 +649,13 @@ | |
| 649 | cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n"); |
| 650 | } |
| 651 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 652 | graph_free(pGraph); |
| 653 | @ var canvasDiv = gebi("canvas"); |
| 654 | @ var canvasStyle = window.getComputedStyle(canvasDiv,null); |
| 655 | @ var lineColor = canvasStyle.getPropertyValue('color') || 'black'; |
| 656 | @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white'; |
| 657 | @ if( bgColor=='transparent' ) bgColor = 'white'; |
| 658 | @ var boxColor = lineColor; |
| 659 | @ function drawBox(color,x0,y0,x1,y1){ |
| 660 | @ var n = document.createElement("div"); |
| 661 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 662 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -649,13 +649,13 @@ | |
| 649 | cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n"); |
| 650 | } |
| 651 | cgi_printf("var nrail = %d\n", pGraph->mxRail+1); |
| 652 | graph_free(pGraph); |
| 653 | @ var canvasDiv = gebi("canvas"); |
| 654 | @ var canvasStyle = window.getComputedStyle && window.getComputedStyle(canvasDiv,null); |
| 655 | @ var lineColor = (canvasStyle && canvasStyle.getPropertyValue('color')) || 'black'; |
| 656 | @ var bgColor = (canvasStyle && canvasStyle.getPropertyValue('background-color')) || 'white'; |
| 657 | @ if( bgColor=='transparent' ) bgColor = 'white'; |
| 658 | @ var boxColor = lineColor; |
| 659 | @ function drawBox(color,x0,y0,x1,y1){ |
| 660 | @ var n = document.createElement("div"); |
| 661 | @ if( x0>x1 ){ var t=x0; x0=x1; x1=t; } |
| 662 |