llvm.org GIT mirror llvm / 47a3615
[opt-viewer] Truncate long remark text in source view The table is changed to fixed layout[1] and the lines use ellipses if they would overflow their cell. [1] https://css-tricks.com/fixing-tables-long-strings/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318136 91177308-0d34-0410-b5e6-96231b3b80d8 Adam Nemet 1 year, 9 months ago
2 changed file(s) with 22 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
118118
119119
120120
121 ''', file=self.stream)
122
123 Line
124 Hotness
125 Optimization
126 Source
127 Inline Context
128 </tr>''', file=self.stream)
121 <table class="source">
122
123
124 Line
125 Hotness
126 Optimization
127 Source
128 Inline Context
129
130
131
129132 self.render_source_lines(self.source_stream, line_remarks)
130133
131134 print('''
135
132136
133137
134138 ''', file=self.stream)
0 .source {
1 table-layout: fixed;
2 width: 100%;
3 white-space: nowrap;
4 }
5 .source td {
6 white-space: nowrap;
7 overflow: hidden;
8 text-overflow: ellipsis;
9 }
10 .red {
111 background-color: #ffd0d0;
212 }