| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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()) { |
| 58 var contentProvider = sourceMap.sourceContentProvider(sassURL, WebIn
spector.resourceTypes.SourceMapStyleSheet); | 58 var contentProvider = sourceMap.sourceContentProvider(sassURL, WebIn
spector.resourceTypes.SourceMapStyleSheet); |
| 59 this._networkProject.addFile(contentProvider, WebInspector.ResourceT
reeFrame.fromStyleSheet(header)); | 59 var embeddedContent = sourceMap.embeddedContentByURL(sassURL); |
| 60 var embeddedContentLength = typeof embeddedContent === "string" ? em
beddedContent.length : null; |
| 61 this._networkProject.addFile(contentProvider, WebInspector.ResourceT
reeFrame.fromStyleSheet(header), false, embeddedContentLength); |
| 60 } | 62 } |
| 61 WebInspector.cssWorkspaceBinding.updateLocations(header); | 63 WebInspector.cssWorkspaceBinding.updateLocations(header); |
| 62 }, | 64 }, |
| 63 | 65 |
| 64 /** | 66 /** |
| 65 * @param {!WebInspector.Event} event | 67 * @param {!WebInspector.Event} event |
| 66 */ | 68 */ |
| 67 _sourceMapDetached: function(event) | 69 _sourceMapDetached: function(event) |
| 68 { | 70 { |
| 69 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */(event.data
); | 71 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */(event.data
); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 if (!uiSourceCode) | 114 if (!uiSourceCode) |
| 113 return null; | 115 return null; |
| 114 return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.source
ColumnNumber); | 116 return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.source
ColumnNumber); |
| 115 }, | 117 }, |
| 116 | 118 |
| 117 dispose: function() | 119 dispose: function() |
| 118 { | 120 { |
| 119 WebInspector.EventTarget.removeEventListeners(this._eventListeners); | 121 WebInspector.EventTarget.removeEventListeners(this._eventListeners); |
| 120 } | 122 } |
| 121 } | 123 } |
| OLD | NEW |