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

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

Issue 2551233002: DevTools: show filesystem file by default (Closed)
Patch Set: nit Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 * @return {boolean} 289 * @return {boolean}
290 */ 290 */
291 _isDiverged() { 291 _isDiverged() {
292 if (this._uiSourceCode.isDirty()) 292 if (this._uiSourceCode.isDirty())
293 return true; 293 return true;
294 if (!this._script) 294 if (!this._script)
295 return false; 295 return false;
296 if (typeof this._scriptSource === 'undefined') 296 if (typeof this._scriptSource === 'undefined')
297 return false; 297 return false;
298 var workingCopy = this._uiSourceCode.workingCopy(); 298 var workingCopy = this._uiSourceCode.workingCopy();
299 if (!workingCopy)
300 return false;
299 301
300 // Match ignoring sourceURL. 302 // Match ignoring sourceURL.
301 if (!workingCopy.startsWith(this._scriptSource.trimRight())) 303 if (!workingCopy.startsWith(this._scriptSource.trimRight()))
302 return true; 304 return true;
303 var suffix = this._uiSourceCode.workingCopy().substr(this._scriptSource.leng th); 305 var suffix = this._uiSourceCode.workingCopy().substr(this._scriptSource.leng th);
304 return !!suffix.length && !suffix.match(SDK.Script.sourceURLRegex); 306 return !!suffix.length && !suffix.match(SDK.Script.sourceURLRegex);
305 } 307 }
306 308
307 /** 309 /**
308 * @param {!Common.Event} event 310 * @param {!Common.Event} event
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 hasSourceMapURL() { 441 hasSourceMapURL() {
440 return this._script && !!this._script.sourceMapURL; 442 return this._script && !!this._script.sourceMapURL;
441 } 443 }
442 }; 444 };
443 445
444 /** @enum {symbol} */ 446 /** @enum {symbol} */
445 Bindings.ResourceScriptFile.Events = { 447 Bindings.ResourceScriptFile.Events = {
446 DidMergeToVM: Symbol('DidMergeToVM'), 448 DidMergeToVM: Symbol('DidMergeToVM'),
447 DidDivergeFromVM: Symbol('DidDivergeFromVM'), 449 DidDivergeFromVM: Symbol('DidDivergeFromVM'),
448 }; 450 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698