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

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

Issue 2769843003: DevTools: split text_utils out of common module (Closed)
Patch Set: rebaseline Created 3 years, 9 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @implements {Bindings.DebuggerSourceMapping} 5 * @implements {Bindings.DebuggerSourceMapping}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Sources.FormatterScriptMapping = class { 8 Sources.FormatterScriptMapping = class {
9 /** 9 /**
10 * @param {!SDK.DebuggerModel} debuggerModel 10 * @param {!SDK.DebuggerModel} debuggerModel
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 /** @type {!Sources.FormatterScriptMapping} */ (this._scriptMappingB yDebuggerModel.get(debuggerModels[i])); 379 /** @type {!Sources.FormatterScriptMapping} */ (this._scriptMappingB yDebuggerModel.get(debuggerModels[i]));
380 Bindings.debuggerWorkspaceBinding.setSourceMapping(debuggerModels[i], fo rmattedUISourceCode, scriptMapping); 380 Bindings.debuggerWorkspaceBinding.setSourceMapping(debuggerModels[i], fo rmattedUISourceCode, scriptMapping);
381 } 381 }
382 382
383 for (var decoration of uiSourceCode.allDecorations()) { 383 for (var decoration of uiSourceCode.allDecorations()) {
384 var range = decoration.range(); 384 var range = decoration.range();
385 var startLocation = formatterMapping.originalToFormatted(range.startLine , range.startColumn); 385 var startLocation = formatterMapping.originalToFormatted(range.startLine , range.startColumn);
386 var endLocation = formatterMapping.originalToFormatted(range.endLine, ra nge.endColumn); 386 var endLocation = formatterMapping.originalToFormatted(range.endLine, ra nge.endColumn);
387 387
388 formattedUISourceCode.addDecoration( 388 formattedUISourceCode.addDecoration(
389 new Common.TextRange(startLocation[0], startLocation[1], endLocation [0], endLocation[1]), 389 new TextUtils.TextRange(startLocation[0], startLocation[1], endLocat ion[0], endLocation[1]),
390 /** @type {string} */ (decoration.type()), decoration.data()); 390 /** @type {string} */ (decoration.type()), decoration.data());
391 } 391 }
392 392
393 this._showIfNeeded(uiSourceCode, formattedUISourceCode, formatterMapping); 393 this._showIfNeeded(uiSourceCode, formattedUISourceCode, formatterMapping);
394 } 394 }
395 } 395 }
396 }; 396 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698