| 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 26 matching lines...) Expand all Loading... |
| 37 WebInspector.SASSSourceMapping = function(cssModel, networkMapping, networkProje
ct) | 37 WebInspector.SASSSourceMapping = function(cssModel, networkMapping, networkProje
ct) |
| 38 { | 38 { |
| 39 this._cssModel = cssModel; | 39 this._cssModel = cssModel; |
| 40 this._networkProject = networkProject; | 40 this._networkProject = networkProject; |
| 41 this._networkMapping = networkMapping; | 41 this._networkMapping = networkMapping; |
| 42 this._eventListeners = [ | 42 this._eventListeners = [ |
| 43 this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapAt
tached, this._sourceMapAttached, this), | 43 this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapAt
tached, this._sourceMapAttached, this), |
| 44 this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapDe
tached, this._sourceMapDetached, this), | 44 this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapDe
tached, this._sourceMapDetached, this), |
| 45 this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapCh
anged, this._sourceMapChanged, this) | 45 this._cssModel.addEventListener(WebInspector.CSSModel.Events.SourceMapCh
anged, this._sourceMapChanged, this) |
| 46 ]; | 46 ]; |
| 47 } | 47 }; |
| 48 | 48 |
| 49 WebInspector.SASSSourceMapping.prototype = { | 49 WebInspector.SASSSourceMapping.prototype = { |
| 50 /** | 50 /** |
| 51 * @param {!WebInspector.Event} event | 51 * @param {!WebInspector.Event} event |
| 52 */ | 52 */ |
| 53 _sourceMapAttached: function(event) | 53 _sourceMapAttached: function(event) |
| 54 { | 54 { |
| 55 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */ (event.dat
a); | 55 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */ (event.dat
a); |
| 56 var sourceMap = this._cssModel.sourceMapForHeader(header); | 56 var sourceMap = this._cssModel.sourceMapForHeader(header); |
| 57 for (var sassURL of sourceMap.sourceURLs()) { | 57 for (var sassURL of sourceMap.sourceURLs()) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 var uiSourceCode = this._networkMapping.uiSourceCodeForStyleURL(entry.so
urceURL, rawLocation.header()); | 113 var uiSourceCode = this._networkMapping.uiSourceCodeForStyleURL(entry.so
urceURL, rawLocation.header()); |
| 114 if (!uiSourceCode) | 114 if (!uiSourceCode) |
| 115 return null; | 115 return null; |
| 116 return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.source
ColumnNumber); | 116 return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.source
ColumnNumber); |
| 117 }, | 117 }, |
| 118 | 118 |
| 119 dispose: function() | 119 dispose: function() |
| 120 { | 120 { |
| 121 WebInspector.EventTarget.removeEventListeners(this._eventListeners); | 121 WebInspector.EventTarget.removeEventListeners(this._eventListeners); |
| 122 } | 122 } |
| 123 } | 123 }; |
| OLD | NEW |