Fossil

Check-in [c06e296b40]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Use two arguments to getComputedStyle() for compatibility with very old versions of Firefox. Allow setting graph node background colors using "#canvas{ background-color: COLOR; }".
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c06e296b4069e2792a4cfa3b7d2672266e0537fd
User & Date: drh 2013-08-16 00:47:47.244
Context
2013-08-16
08:17
Fix display of timeline graph in IE8, broken by commit [e412f97999] ... (check-in: 5885241f52 user: jan.nijtmans tags: trunk)
07:28
Fix display of timeline graph in IE8, broken by commit [e412f97999] ... (Closed-Leaf check-in: ef5e74961a user: jan.nijtmans tags: fix-ie8)
03:25
Merge in all new development from trunk. ... (check-in: 535cba9158 user: andybradford tags: ssh-test-http)
00:47
Use two arguments to getComputedStyle() for compatibility with very old versions of Firefox. Allow setting graph node background colors using "#canvas{ background-color: COLOR; }". ... (check-in: c06e296b40 user: drh tags: trunk)
2013-08-15
22:45
Update the built-in SQLite to the latest 3.8.0 beta with the ORDER BY and GROUP BY name resolution fixes, in order to test SQLite. ... (check-in: b67b42fea8 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/graph.c.
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
  pRow->rid = rid;
  pRow->nParent = nParent;
  pRow->zBranch = persistBranchName(p, zBranch);
  if( zUuid==0 ) zUuid = "";
  sqlite3_snprintf(sizeof(pRow->zUuid), pRow->zUuid, "%s", zUuid);
  pRow->isLeaf = isLeaf;
  memset(pRow->aiRiser, -1, sizeof(pRow->aiRiser));
  if( zBgClr==0 || zBgClr[0]==0 ) zBgClr = "white";
  pRow->zBgClr = persistBranchName(p, zBgClr);
  memcpy(pRow->aParent, aParent, sizeof(aParent[0])*nParent);
  if( p->pFirst==0 ){
    p->pFirst = pRow;
  }else{
    p->pLast->pNext = pRow;
  }







|







196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
  pRow->rid = rid;
  pRow->nParent = nParent;
  pRow->zBranch = persistBranchName(p, zBranch);
  if( zUuid==0 ) zUuid = "";
  sqlite3_snprintf(sizeof(pRow->zUuid), pRow->zUuid, "%s", zUuid);
  pRow->isLeaf = isLeaf;
  memset(pRow->aiRiser, -1, sizeof(pRow->aiRiser));
  if( zBgClr==0 ) zBgClr = "";
  pRow->zBgClr = persistBranchName(p, zBgClr);
  memcpy(pRow->aParent, aParent, sizeof(aParent[0])*nParent);
  if( p->pFirst==0 ){
    p->pFirst = pRow;
  }else{
    p->pLast->pNext = pRow;
  }
Changes to src/timeline.c.
647
648
649
650
651
652
653
654
655


656
657
658
659
660
661
662
      }
      if( cSep=='[' ) cgi_printf("[");
      cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
    }
    cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
    graph_free(pGraph);
    @ var canvasDiv = gebi("canvas");
    @ var canvasStyle = window.getComputedStyle(canvasDiv);
    @ var lineColor = canvasStyle.getPropertyValue('color') || 'black';


    @ var boxColor = lineColor;
    @ 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;







|

>
>







647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
      }
      if( cSep=='[' ) cgi_printf("[");
      cgi_printf("],h:\"%s\"}%s", pRow->zUuid, pRow->pNext ? ",\n" : "];\n");
    }
    cgi_printf("var nrail = %d\n", pGraph->mxRail+1);
    graph_free(pGraph);
    @ var canvasDiv = gebi("canvas");
    @ var canvasStyle = window.getComputedStyle(canvasDiv,null);
    @ var lineColor = canvasStyle.getPropertyValue('color') || 'black';
    @ var bgColor = canvasStyle.getPropertyValue('background-color') || 'white';
    @ if( bgColor=='transparent' ) bgColor = 'white';
    @ var boxColor = lineColor;
    @ 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;
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
    @   }
    @ }
    @ function drawThinLine(x0,y0,x1,y1){
    @   drawBox(lineColor,x0,y0,x1,y1);
    @ }
    @ function drawNode(p, left, btm){
    @   drawBox(boxColor,p.x-5,p.y-5,p.x+6,p.y+6);
    @   drawBox(p.bg,p.x-4,p.y-4,p.x+5,p.y+5);
    @   if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5);
    @   if( p.f&1 ) drawBox(boxColor,p.x-1,p.y-1,p.x+2,p.y+2);
    if( !omitDescenders ){
      @   if( p.u==0 ) drawUpArrow(p.x, 0, p.y-5);
      @   if( p.d ) drawUpArrow(p.x, p.y+6, btm);
    }
    @   if( p.mo>0 ){







|







717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
    @   }
    @ }
    @ function drawThinLine(x0,y0,x1,y1){
    @   drawBox(lineColor,x0,y0,x1,y1);
    @ }
    @ function drawNode(p, left, btm){
    @   drawBox(boxColor,p.x-5,p.y-5,p.x+6,p.y+6);
    @   drawBox(p.bg||bgColor,p.x-4,p.y-4,p.x+5,p.y+5);
    @   if( p.u>0 ) drawUpArrow(p.x, rowinfo[p.u-1].y+6, p.y-5);
    @   if( p.f&1 ) drawBox(boxColor,p.x-1,p.y-1,p.x+2,p.y+2);
    if( !omitDescenders ){
      @   if( p.u==0 ) drawUpArrow(p.x, 0, p.y-5);
      @   if( p.d ) drawUpArrow(p.x, p.y+6, btm);
    }
    @   if( p.mo>0 ){