Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Draw the diffstat bars as SVG
The bars were cells spanning up to 1000 columns of a nested table, which kept them free of inline styles under a strict CSP but broke the HTML table model, 18 errors on a commit page, and left Firefox's longest bar short of the full width. An SVG canvas sized by its attributes is just as safe under a CSP, validates, and draws every bar exactly to scale.
-rw-r--r--assets/cgit.css18
-rw-r--r--source/ui-diff.c25
-rwxr-xr-xtests/t0106-commit.sh6
3 files changed, 21 insertions, 28 deletions