| OLD | NEW |
| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 SDK.ResourceTreeModel.fromTarget(cssModel.target()) | 56 SDK.ResourceTreeModel.fromTarget(cssModel.target()) |
| 57 .addEventListener(SDK.ResourceTreeModel.Events.MainFrameNavigated, thi
s._unbindAllUISourceCodes, this) | 57 .addEventListener(SDK.ResourceTreeModel.Events.MainFrameNavigated, thi
s._unbindAllUISourceCodes, this) |
| 58 ]; | 58 ]; |
| 59 } | 59 } |
| 60 | 60 |
| 61 /** | 61 /** |
| 62 * @param {!SDK.CSSLocation} rawLocation | 62 * @param {!SDK.CSSLocation} rawLocation |
| 63 * @return {?Workspace.UILocation} | 63 * @return {?Workspace.UILocation} |
| 64 */ | 64 */ |
| 65 rawLocationToUILocation(rawLocation) { | 65 rawLocationToUILocation(rawLocation) { |
| 66 var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForStyleURL(this._wor
kspace, rawLocation.url, rawLocation.header()); | 66 var uiSourceCode = |
| 67 Bindings.NetworkProject.uiSourceCodeForStyleURL(this._workspace, rawLoca
tion.url, rawLocation.header()); |
| 67 if (!uiSourceCode) | 68 if (!uiSourceCode) |
| 68 return null; | 69 return null; |
| 69 var lineNumber = rawLocation.lineNumber; | 70 var lineNumber = rawLocation.lineNumber; |
| 70 var columnNumber = rawLocation.columnNumber; | 71 var columnNumber = rawLocation.columnNumber; |
| 71 var header = this._cssModel.styleSheetHeaderForId(rawLocation.styleSheetId); | 72 var header = this._cssModel.styleSheetHeaderForId(rawLocation.styleSheetId); |
| 72 if (header && header.isInline && header.hasSourceURL) { | 73 if (header && header.isInline && header.hasSourceURL) { |
| 73 lineNumber -= header.lineNumberInSource(0); | 74 lineNumber -= header.lineNumberInSource(0); |
| 74 columnNumber -= header.columnNumberInSource(lineNumber, 0); | 75 columnNumber -= header.columnNumberInSource(lineNumber, 0); |
| 75 } | 76 } |
| 76 return uiSourceCode.uiLocation(lineNumber, columnNumber); | 77 return uiSourceCode.uiLocation(lineNumber, columnNumber); |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 | 352 |
| 352 dispose() { | 353 dispose() { |
| 353 if (this._terminated) | 354 if (this._terminated) |
| 354 return; | 355 return; |
| 355 this._terminated = true; | 356 this._terminated = true; |
| 356 Common.EventTarget.removeEventListeners(this._eventListeners); | 357 Common.EventTarget.removeEventListeners(this._eventListeners); |
| 357 } | 358 } |
| 358 }; | 359 }; |
| 359 | 360 |
| 360 Bindings.StyleFile.updateTimeout = 200; | 361 Bindings.StyleFile.updateTimeout = 200; |
| OLD | NEW |