Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Side by Side Diff: experimental/skpdiff/viewer.html

Issue 18925004: modularize the display of diffs for skpdiff (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: swapimg -> swapImg Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « experimental/skpdiff/diff_viewer.js ('k') | experimental/skpdiff/viewer_style.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <!-- This whole page uses the module -->
3 <html ng-app="diff_viewer">
3 <head> 4 <head>
4 <script type="text/javascript" 5 <script type="text/javascript"
5 src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.m in.js"></script> 6 src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.m in.js"></script>
6 <script type="text/javascript" src="skpdiff_output.json"></script> 7 <script type="text/javascript" src="skpdiff_output.json"></script>
7 <script type="text/javascript" src="diff_viewer.js"></script> 8 <script type="text/javascript" src="diff_viewer.js"></script>
8 <link rel="stylesheet" type="text/css" href="viewer_style.css"> 9 <link rel="stylesheet" type="text/css" href="viewer_style.css">
9 <title>SkPDiff</title> 10 <title>SkPDiff</title>
10 </head> 11 </head>
11 <body> 12 <body>
12 <div ng-app ng-controller="DiffViewController"> 13 <!--
14 All templates are being included with the main page to avoid using AJAX, w hich would force
15 us to use a webserver.
16 -->
17 <script type="text/ng-template" id="/diff_list.html">
18 <!-- Give a choice of how to order the differs -->
13 <div style="margin:8px"> 19 <div style="margin:8px">
14 Show me the worst by metric: 20 Show me the worst by metric:
15 <button ng-repeat="differ in differs" ng-click="setSortIndex($index)"> 21 <button ng-repeat="differ in differs" ng-click="setSortIndex($index)">
16 <span class="result-{{ $index }}" style="padding-left:12px;">&nbsp;</s pan> 22 <span class="result-{{ $index }}" style="padding-left:12px;">&nbsp;</s pan>
17 {{ differ.title }} 23 {{ differ.title }}
18 </button> 24 </button>
19 </div> 25 </div>
26 <!-- Begin list of differences -->
20 <table> 27 <table>
21 <thead> 28 <thead>
22 <tr> 29 <tr>
23 <td>Baseline Image</td> 30 <td>Baseline Image</td>
24 <td>Actual Image</td> 31 <td>Actual Image</td>
25 <td>Results</td> 32 <td>Results</td>
26 </tr> 33 </tr>
27 </thead> 34 </thead>
28 <tbody> 35 <tbody>
36 <!--
37 Loops through every record and crates a row for it. This sorts based on the whichever
38 metric the user chose, and places a limit on the max number of recor ds to show.
39 -->
29 <tr ng-repeat="record in records | orderBy:sortingDiffer | limitTo:500 "> 40 <tr ng-repeat="record in records | orderBy:sortingDiffer | limitTo:500 ">
30 <td><img src="{{ record.baselinePath }}" class="gm-image baseline-im age" /></td> 41 <td><swap-img left-src="{{ record.baselinePath }}"
31 <td><img src="{{ record.testPath }}" class="gm-image test-image" />< /td> 42 right-src="{{ record.testPath }}"
43 side="left"
44 class="gm-image left-image" /></td>
45 <td><swap-img left-src="{{ record.baselinePath }}"
46 right-src="{{ record.testPath }}"
47 side="right"
48 class="gm-image right-image" /></td>
32 <td> 49 <td>
33 <div ng-repeat="diff in record.diffs" 50 <div ng-repeat="diff in record.diffs"
34 ng-mouseover="highlight(diff.differName)" 51 ng-mouseover="highlight(diff.differName)"
35 class="result result-{{$index}}"> 52 class="result result-{{$index}}">
36 <span class="result-button">{{ diff.result }}</span> 53 <span class="result-button">{{ diff.result }}</span>
37 </div> 54 </div>
38 </td> 55 </td>
39 </tr> 56 </tr>
40 </tbody> 57 </tbody>
41 </table> 58 </table>
42 </div> 59 </script>
60 <!-- Whatever template is used is rendered in the following div -->
61 <div ng-view></div>
43 </body> 62 </body>
44 </html> 63 </html>
OLDNEW
« no previous file with comments | « experimental/skpdiff/diff_viewer.js ('k') | experimental/skpdiff/viewer_style.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698