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

Unified Diff: gm/rebaseline_server/static/live-loader.js

Issue 489183002: rebaseline_server: add download link for SKP diff patchfile (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gm/rebaseline_server/static/live-view.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/static/live-loader.js
diff --git a/gm/rebaseline_server/static/live-loader.js b/gm/rebaseline_server/static/live-loader.js
index 30d05061be6fa9dd4ab9b2a7a9e9d375de66553d..ab15aee41a984c782481f3a68e09d96579b7b4a7 100644
--- a/gm/rebaseline_server/static/live-loader.js
+++ b/gm/rebaseline_server/static/live-loader.js
@@ -8,6 +8,12 @@ var Loader = angular.module(
['ConstantsModule']
);
+// This configuration is needed to allow downloads of the diff patch.
+// See https://github.com/angular/angular.js/issues/3889
+Loader.config(['$compileProvider', function($compileProvider) {
+ $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|file|blob):/);
+}]);
+
Loader.directive(
'resultsUpdatedCallbackDirective',
['$timeout',
@@ -841,6 +847,8 @@ Loader.controller(
data: modificationData
}).success(function(data, status, headers, config) {
$scope.diffResults = data;
+ var blob = new Blob([$scope.diffResults], {type: 'text/plain'});
+ $scope.diffResultsBlobUrl = window.URL.createObjectURL(blob);
$scope.submitPending = false;
}).error(function(data, status, headers, config) {
alert("There was an error submitting your baselines.\n\n" +
« no previous file with comments | « no previous file | gm/rebaseline_server/static/live-view.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698