Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 this._historyManager.push(entry); | 115 this._historyManager.push(entry); |
| 116 }, | 116 }, |
| 117 | 117 |
| 118 /** | 118 /** |
| 119 * @param {!WebInspector.UISourceCode} uiSourceCode | 119 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 120 */ | 120 */ |
| 121 removeHistoryForSourceCode: function(uiSourceCode) | 121 removeHistoryForSourceCode: function(uiSourceCode) |
| 122 { | 122 { |
| 123 function filterOut(entry) | 123 function filterOut(entry) |
| 124 { | 124 { |
| 125 return entry._projectId === uiSourceCode.project().id() && entry._pa th === uiSourceCode.path(); | 125 return entry._projectId === uiSourceCode.project().id() && entry._pa th === uiSourceCode.url(); |
| 126 } | 126 } |
| 127 | 127 |
| 128 this._historyManager.filterOut(filterOut); | 128 this._historyManager.filterOut(filterOut); |
| 129 }, | 129 }, |
| 130 } | 130 } |
| 131 | 131 |
| 132 | 132 |
| 133 /** | 133 /** |
| 134 * @constructor | 134 * @constructor |
| 135 * @implements {WebInspector.HistoryEntry} | 135 * @implements {WebInspector.HistoryEntry} |
| 136 * @param {!WebInspector.SourcesView} sourcesView | 136 * @param {!WebInspector.SourcesView} sourcesView |
| 137 * @param {!WebInspector.EditingLocationHistoryManager} editingLocationManager | 137 * @param {!WebInspector.EditingLocationHistoryManager} editingLocationManager |
| 138 * @param {!WebInspector.SourceFrame} sourceFrame | 138 * @param {!WebInspector.SourceFrame} sourceFrame |
| 139 * @param {!WebInspector.TextRange} selection | 139 * @param {!WebInspector.TextRange} selection |
| 140 */ | 140 */ |
| 141 WebInspector.EditingLocationHistoryEntry = function(sourcesView, editingLocation Manager, sourceFrame, selection) | 141 WebInspector.EditingLocationHistoryEntry = function(sourcesView, editingLocation Manager, sourceFrame, selection) |
| 142 { | 142 { |
| 143 this._sourcesView = sourcesView; | 143 this._sourcesView = sourcesView; |
| 144 this._editingLocationManager = editingLocationManager; | 144 this._editingLocationManager = editingLocationManager; |
| 145 var uiSourceCode = sourceFrame.uiSourceCode(); | 145 var uiSourceCode = sourceFrame.uiSourceCode(); |
| 146 this._projectId = uiSourceCode.project().id(); | 146 this._projectId = uiSourceCode.project().id(); |
| 147 this._path = uiSourceCode.path(); | 147 this._path = uiSourceCode.url(); |
|
dgozman
2016/01/08 20:22:06
this._path -> this._url
| |
| 148 | 148 |
| 149 var position = this._positionFromSelection(selection); | 149 var position = this._positionFromSelection(selection); |
| 150 this._positionHandle = sourceFrame.textEditor.textEditorPositionHandle(posit ion.lineNumber, position.columnNumber); | 150 this._positionHandle = sourceFrame.textEditor.textEditorPositionHandle(posit ion.lineNumber, position.columnNumber); |
| 151 } | 151 } |
| 152 | 152 |
| 153 WebInspector.EditingLocationHistoryEntry.prototype = { | 153 WebInspector.EditingLocationHistoryEntry.prototype = { |
| 154 /** | 154 /** |
| 155 * @param {!WebInspector.HistoryEntry} entry | 155 * @param {!WebInspector.HistoryEntry} entry |
| 156 */ | 156 */ |
| 157 merge: function(entry) | 157 merge: function(entry) |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 { | 191 { |
| 192 var position = this._positionHandle.resolve(); | 192 var position = this._positionHandle.resolve(); |
| 193 var uiSourceCode = WebInspector.workspace.project(this._projectId).uiSou rceCode(this._path); | 193 var uiSourceCode = WebInspector.workspace.project(this._projectId).uiSou rceCode(this._path); |
| 194 if (!position || !uiSourceCode) | 194 if (!position || !uiSourceCode) |
| 195 return; | 195 return; |
| 196 | 196 |
| 197 this._editingLocationManager.updateCurrentState(); | 197 this._editingLocationManager.updateCurrentState(); |
| 198 this._sourcesView.showSourceLocation(uiSourceCode, position.lineNumber, position.columnNumber); | 198 this._sourcesView.showSourceLocation(uiSourceCode, position.lineNumber, position.columnNumber); |
| 199 } | 199 } |
| 200 } | 200 } |
| OLD | NEW |