211 {
212
216
218 outputPath.append("index.html");
219
221
222
223
224
225 bool isPathAbsolute = false;
226
228 isPathAbsolute = true;
229 }
230#ifdef SK_BUILD_FOR_WIN
231
232
233 if (outputDir.
size() > 1 &&
':' == outputDir[1]) {
234 isPathAbsolute = true;
235 }
236#endif
237
239 if (!isPathAbsolute) {
244 }
245 }
246 }
247
248 outputStream.writeText(
249 "<html>\n<head>\n"
250 "<script type=\"text/javascript\">\n"
251 "function generateCheckedList() {\n"
252 " const boxes = document.querySelectorAll('input[type=checkbox]:checked');\n"
253 " let fileCmdLineString = '';\n"
254 " let fileMultiLineString = '';\n"
255 " for (let i = 0; i < boxes.length; i++) {\n"
256 " fileMultiLineString += boxes[i].name + '<br>';\n"
257 " fileCmdLineString += boxes[i].name + ' ';\n"
258 " }\n"
259 " const checkedList = document.querySelector('#checkedList');\n"
260 " checkedList.innerHTML = fileCmdLineString + '<br><br>' + fileMultiLineString;\n"
261 "}\n"
262 "</script>\n</head>\n<body>\n");
264 baseDir, comparisonDir);
266 for (
i = 0;
i < differences.
size();
i++) {
268
270
273 continue;
274
279 continue;
280 default:
281 SkDEBUGFAIL(
"encountered DiffRecord with unknown result type");
282 continue;
283 }
284 }
285 outputStream.writeText(
286 "</table>\n"
287 "<input type=\"button\" "
288 "onclick=\"generateCheckedList()\" "
289 "value=\"Create Rebaseline List\">\n"
290 "<div id=\"checkedList\"></div>\n"
291 "</body>\n</html>\n");
292 outputStream.flush();
293}
#define SkDEBUGFAIL(message)
void append(const char text[])
static void print_diff_row(SkFILEWStream *stream, const DiffRecord &diff, const SkString &relativePath)
static void print_table_header(SkFILEWStream *stream, const int matchCount, const int colorThreshold, const RecordArray &differences, const SkString &baseDir, const SkString &comparisonDir)
Result fResult
Which category of diff result.
@ kCouldNotCompare_Result
@ kDifferentPixels_Result