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

Side by Side Diff: gm/rebaseline_server/static/live-loader.js

Issue 471033003: Fixing broken images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed overly long lines Created 6 years, 4 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
« no previous file with comments | « gm/rebaseline_server/static/constants.js ('k') | gm/rebaseline_server/static/live-view.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Loader: 2 * Loader:
3 * Reads GM result reports written out by results.py, and imports 3 * Reads GM result reports written out by results.py, and imports
4 * them into $scope.extraColumnHeaders and $scope.imagePairs . 4 * them into $scope.extraColumnHeaders and $scope.imagePairs .
5 */ 5 */
6 var Loader = angular.module( 6 var Loader = angular.module(
7 'Loader', 7 'Loader',
8 ['ConstantsModule'] 8 ['ConstantsModule']
9 ); 9 );
10 10
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 * 1033 *
1034 * @param brightnessString (string): 0-255, 0 is completely black 1034 * @param brightnessString (string): 0-255, 0 is completely black
1035 * 1035 *
1036 * TODO(epoger): It might be nice to tint the color when it's not completely 1036 * TODO(epoger): It might be nice to tint the color when it's not completely
1037 * black or completely white. 1037 * black or completely white.
1038 */ 1038 */
1039 $scope.brightnessStringToHexColor = function(brightnessString) { 1039 $scope.brightnessStringToHexColor = function(brightnessString) {
1040 var v = parseInt(brightnessString); 1040 var v = parseInt(brightnessString);
1041 return $scope.hexColorString(v, v, v); 1041 return $scope.hexColorString(v, v, v);
1042 }; 1042 };
1043
1044 /**
1045 * Returns the last path component of image diff URL for a given ImagePair.
1046 *
1047 * Depending on which diff this is (whitediffs, pixeldiffs, etc.) this
1048 * will be relative to different base URLs.
1049 *
1050 * We must keep this function in sync with _get_difference_locator() in
1051 * ../imagediffdb.py
1052 *
1053 * @param imagePair: ImagePair to generate image diff URL for
1054 */
1055 // TODO (stephana): this is a temporary fix. A fix is in the works
1056 // to get rid of this function and include the URL in the data
1057 // sent from the backend.
1058
1059 $scope.getImageDiffRelativeUrl = function(imagePair) {
1060 var before =
1061 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_A_URL] + "_png-vs-" +
1062 imagePair[constants.KEY__IMAGEPAIRS__IMAGE_B_URL] + "_png";
1063 return before.replace(/[^\w\-]/g, "_") + ".png";
1064 };
1065
1066 } 1043 }
1067 ); 1044 );
OLDNEW
« no previous file with comments | « gm/rebaseline_server/static/constants.js ('k') | gm/rebaseline_server/static/live-view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698