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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/Runtime.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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 | « no previous file | third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.js » ('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 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 } 74 }
75 75
76 /** 76 /**
77 * http://tools.ietf.org/html/rfc3986#section-5.2.4 77 * http://tools.ietf.org/html/rfc3986#section-5.2.4
78 * @param {string} path 78 * @param {string} path
79 * @return {string} 79 * @return {string}
80 */ 80 */
81 function normalizePath(path) 81 function normalizePath(path)
82 { 82 {
83 if (path.indexOf("..") === -1 && path.indexOf('.') === -1) 83 if (path.indexOf("..") === -1 && path.indexOf(".") === -1)
84 return path; 84 return path;
85 85
86 var normalizedSegments = []; 86 var normalizedSegments = [];
87 var segments = path.split("/"); 87 var segments = path.split("/");
88 for (var i = 0; i < segments.length; i++) { 88 for (var i = 0; i < segments.length; i++) {
89 var segment = segments[i]; 89 var segment = segments[i];
90 if (segment === ".") 90 if (segment === ".")
91 continue; 91 continue;
92 else if (segment === "..") 92 else if (segment === "..")
93 normalizedSegments.pop(); 93 normalizedSegments.pop();
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 { 1107 {
1108 var sourceURL = window.location.href; 1108 var sourceURL = window.location.href;
1109 if (window.location.search) 1109 if (window.location.search)
1110 sourceURL = sourceURL.replace(window.location.search, ""); 1110 sourceURL = sourceURL.replace(window.location.search, "");
1111 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path; 1111 sourceURL = sourceURL.substring(0, sourceURL.lastIndexOf("/") + 1) + path;
1112 return "\n/*# sourceURL=" + sourceURL + " */"; 1112 return "\n/*# sourceURL=" + sourceURL + " */";
1113 } 1113 }
1114 1114
1115 /** @type {!Runtime} */ 1115 /** @type {!Runtime} */
1116 var runtime; 1116 var runtime;
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/accessibility/AccessibilityNodeView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698