SkString baselineAbsPath = get_absolute_path(currentRecord->fBaselinePath);
SkString testAbsPath = get_absolute_path(currentRecord->fTestPath);
+ // strip off directory structure and find the common part of the filename
+ SkString baseName = SkOSPath::SkBasename(baselineAbsPath.c_str());
+ SkString testName = SkOSPath::SkBasename(testAbsPath.c_str());
+ for (size_t x = 0; x < baseName.size(); ++x) {
+ if (baseName[x] != testName[x]) {
+ baseName.insertUnichar(x, '\n');
+ break;
+ }
+ }
+
+ stream.writeText(" \"commonName\": \"");
+ stream.writeText(baseName.c_str());
+ stream.writeText("\",\n");
+
stream.writeText(" \"baselinePath\": \"");
stream.writeText(baselineAbsPath.c_str());
stream.writeText("\",\n");
<thead>
<tr>
<td ng-show="isDynamic">Rebaseline?</td>
+ <td>Name</td>
<td>Expected Image</td>
<td>Actual Image</td>
<td>Results</td>
ng-click="selectedRebaseline($index, $event)"
ng-class="{lastselected: lastSelectedIndex == $index}" />
</td>
+ <td class="common-name">{{ record.commonName }}</td>
<td>
<swap-img left-src="{{ record.baselinePath }}"
right-src="{{ record.testPath }}"
}
table {
- width:100%;
+ width: auto;
border-collapse: collapse;
border-spacing: 0;
padding: 8px;
td {
border-top: 1px solid #DDD;
- padding: 8px;
+ padding: 16px;
}
thead > tr > td {
border: none;
background: -webkit-linear-gradient(top, #96c56f 0%,#a9db80 100%);
}
+.common-name {
+ vertical-align: top;
+}
+
+
.gm-image {
border: 1px dotted black;
}