• Home
  • Raw
  • Download

Lines Matching +full:source +full:- +full:highlight

1 //===- SourceCoverageViewHTML.cpp - A html code coverage view -------------===//
5 // This file is distributed under the University of Illinois Open Source
8 //===----------------------------------------------------------------------===//
12 //===----------------------------------------------------------------------===//
26 "<meta name='viewport' content='width=device-width,initial-scale=1'>"
27 "<meta charset='UTF-8'>";
34 background-color: #FFD0D0;
37 background-color: cyan;
40 background-color: black;
44 background-color: #98FFA6;
48 background-color: #F998FF;
52 font-family: -apple-system, sans-serif;
55 margin-top: 0px !important;
56 margin-bottom: 0px !important;
58 .source-name-title {
60 border-bottom: 1px solid #dbdbdb;
61 background-color: #eee;
65 margin-left: auto;
66 margin-right: auto;
68 border-radius: 3px;
70 .expansion-view {
71 background-color: rgba(0, 0, 0, 0);
72 margin-left: 0px;
73 margin-top: 5px;
74 margin-right: 5px;
75 margin-bottom: 5px;
77 border-radius: 3px;
80 border-collapse: collapse;
82 .line-number {
83 text-align: right;
86 .covered-line {
87 text-align: right;
90 .uncovered-line {
91 text-align: right;
97 background-color: #b3e6ff;
98 text-decoration: none;
100 .tooltip span.tooltip-content {
103 margin-left: -50px;
107 line-height: 30px;
108 text-align: center;
110 border-radius: 6px;
112 .tooltip span.tooltip-content:after {
117 margin-left: -8px;
119 border-top: 8px solid #000000;
120 border-right: 8px solid transparent;
121 border-left: 8px solid transparent;
123 :hover.tooltip span.tooltip-content {
128 z-index: 999;
131 vertical-align: top;
133 border-collapse: collapse;
134 border-right: solid 1px #eee;
135 border-left: solid 1px #eee;
137 td:first-child {
138 border-left: none;
140 td:last-child {
141 border-right: none;
153 const char *BeginSourceNameDiv = "<div class='source-name-title'>";
165 const char *BeginExpansionDiv = "<div class='expansion-view'>";
275 // If this view has sub-views, renderLine() cannot close the view's cell. in renderLineSuffix()
276 // Take care of it here, after all sub-views have been rendered. in renderLineSuffix()
283 // The table-based output makes view dividers unnecessary. in renderViewDivider()
291 // Steps for handling text-escaping, highlighting, and tooltip creation: in renderLine()
307 Snip(LCol - 1, Segments.empty() ? 0 : (Segments.front()->Col - 1)); in renderLine()
310 assert(LCol == Segments[I - 1]->Col && "Snippet start position is wrong"); in renderLine()
311 Snip(LCol - 1, Segments[I]->Col - LCol); in renderLine()
315 Snip(LCol - 1, Line.size() + 1 - LCol); in renderLine()
323 // 3. Use \p WrappedSegment to set the highlight for snippets 0 and 1. Use in renderLine()
324 // segment 1 to set the highlight for snippet 2, segment 2 to set the in renderLine()
325 // highlight for snippet 3, and so on. in renderLine()
328 auto Highlight = [&](const std::string &Snippet) { in renderLine() local
333 return S && S->HasCount && S->Count == 0; in renderLine()
339 Snippets[0] = Highlight(Snippets[0]); in renderLine()
340 Snippets[1] = Highlight(Snippets[1]); in renderLine()
345 if (CurSeg->Col == ExpansionCol) in renderLine()
353 Snippets[I + 1] = Highlight(Snippets[I + 1]); in renderLine()
357 // sub-line region count tooltips if needed. in renderLine()
362 if (S->HasCount && S->IsRegionEntry) in renderLine()
371 if (!CurSeg->IsRegionEntry || !CurSeg->HasCount) in renderLine()
375 tag("div", Snippets[I + 1] + tag("span", formatCount(CurSeg->Count), in renderLine()
376 "tooltip-content"), in renderLine()
387 // If there are no sub-views left to attach to this cell, end the cell. in renderLine()
388 // Otherwise, end it after the sub-views are rendered (renderLineSuffix()). in renderLine()
399 (Line.ExecutionCount > 0) ? "covered-line" : "uncovered-line"; in renderLineCoverageColumn()
405 OS << tag("td", tag("pre", utostr(uint64_t(LineNo))), "line-number"); in renderLineNumberColumn()
411 // Region markers are rendered in-line using tooltips. in renderRegionMarkers()
425 ESV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/false, in renderExpansionView()
434 ISV.View->print(OS, /*WholeFile=*/false, /*ShowSourceName=*/true, ViewDepth); in renderInstantiationView()