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

Unified Diff: ui/file_manager/gallery/js/image_editor/filter.js

Issue 571453002: Correct indentation, JSDoc, etc... to comply with closure linter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
Index: ui/file_manager/gallery/js/image_editor/filter.js
diff --git a/ui/file_manager/gallery/js/image_editor/filter.js b/ui/file_manager/gallery/js/image_editor/filter.js
index a1a95dc10c64e50231e8bebf4ef9f142ca696f19..d61b895c7065a23f6bfe4c8166253757c5b7b609 100644
--- a/ui/file_manager/gallery/js/image_editor/filter.js
+++ b/ui/file_manager/gallery/js/image_editor/filter.js
@@ -159,7 +159,7 @@ filter.mapPixels = function(rMap, gMap, bMap, dst, src, offsetX, offsetY) {
if (offsetX < 0 || offsetX + dstWidth > srcWidth ||
offsetY < 0 || offsetY + dstHeight > srcHeight)
- throw new Error('Invalid offset');
+ throw new Error('Invalid offset');
var dstIndex = 0;
for (var y = 0; y != dstHeight; y++) {
@@ -379,7 +379,7 @@ filter.colorMatrix3x3 = function(matrix, dst, src, offsetX, offsetY) {
if (offsetX < 0 || offsetX + dstWidth > srcWidth ||
offsetY < 0 || offsetY + dstHeight > srcHeight)
- throw new Error('Invalid offset');
+ throw new Error('Invalid offset');
// Javascript is not very good at inlining constants.
// We inline manually and assert that the constant is equal to the variable.
@@ -520,16 +520,16 @@ filter.sharpen = function(options) {
*/
filter.exposure = function(options) {
var pixelMap = filter.precompute(
- 255,
- function(value) {
- if (options.brightness > 0) {
- value *= (1 + options.brightness);
- } else {
- value += (0xFF - value) * options.brightness;
- }
- return 0x80 +
- (value - 0x80) * Math.tan((options.contrast + 1) * Math.PI / 4);
- });
+ 255,
+ function(value) {
+ if (options.brightness > 0) {
+ value *= (1 + options.brightness);
+ } else {
+ value += (0xFF - value) * options.brightness;
+ }
+ return 0x80 +
+ (value - 0x80) * Math.tan((options.contrast + 1) * Math.PI / 4);
+ });
return filter.mapPixels.bind(null, pixelMap, pixelMap, pixelMap);
};
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/exif_encoder.js ('k') | ui/file_manager/gallery/js/image_editor/image_adjust.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698