Simplify CSS for diff line numbers Line numbers in diffs had been specified in data-attributes and CSS to avoid including them in pasteboard selections. However, we have since moved to a different system that avoids including non diff content in selections, and this CSS needlessly complicates style application. With this change, diff line numbers show content, and the relevant CSS is simplified. This provides a small, but measurable diff render performance improvement. Change-Id: Iad062553be533ead1dd29eaaacd5af8867249a16
diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html index 59acafe..e0868f9 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html +++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.html
@@ -81,10 +81,6 @@ .diff-row.target-row.target-side-right .lineNum.right, .diff-row.target-row.unified .lineNum { background-color: #BBDEFB; - } - .diff-row.target-row.target-side-left .lineNum.left:before, - .diff-row.target-row.target-side-right .lineNum.right:before, - .diff-row.target-row.unified .lineNum:before { color: #000; } .blank, @@ -105,22 +101,20 @@ vertical-align: top; white-space: pre; } - .contextLineNum:before, - .lineNum:before { - box-sizing: border-box; - display: inline-block; + .contextLineNum, + .lineNum { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + color: #666; - content: attr(data-value); padding: 0 .5em; text-align: right; - width: 100%; } - .canComment .lineNum[data-value] { + .canComment .lineNum { cursor: pointer; } - .canComment .lineNum[data-value="FILE"]:before { - content: 'File'; - } .content { overflow: hidden; /* Set max and min width since setting width on table cells still