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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 /** | 69 /** |
70 * @param {WebInspector.Event} event | 70 * @param {WebInspector.Event} event |
71 */ | 71 */ |
72 _styleSheetChanged: function(event) | 72 _styleSheetChanged: function(event) |
73 { | 73 { |
74 var isAddingRevision = this._isAddingRevision; | 74 var isAddingRevision = this._isAddingRevision; |
75 delete this._isAddingRevision; | 75 delete this._isAddingRevision; |
76 | 76 |
77 if (isAddingRevision) | 77 if (isAddingRevision) |
78 return; | 78 return; |
79 this._cssModel.resourceBinding().requestResourceURLForStyleSheetId(event
.data.styleSheetId, callback.bind(this)); | 79 var url = this._cssModel.resourceBinding().resourceURLForStyleSheetId(ev
ent.data.styleSheetId); |
80 | 80 if (!url) |
81 function callback(url) | 81 return; |
82 { | 82 this._cssModel.setSourceMapping(url, null); |
83 if (!url) | |
84 return; | |
85 this._cssModel.setSourceMapping(url, null); | |
86 } | |
87 }, | 83 }, |
88 | 84 |
89 /** | 85 /** |
90 * @param {WebInspector.Event} event | 86 * @param {WebInspector.Event} event |
91 */ | 87 */ |
92 _fileSaveFinished: function(event) | 88 _fileSaveFinished: function(event) |
93 { | 89 { |
94 // FIXME: add support for FileMapping. | 90 // FIXME: add support for FileMapping. |
95 var sassURL = /** @type {string} */ (event.data); | 91 var sassURL = /** @type {string} */ (event.data); |
96 function callback() | 92 function callback() |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 return false; | 276 return false; |
281 }, | 277 }, |
282 | 278 |
283 _reset: function() | 279 _reset: function() |
284 { | 280 { |
285 this._sourceMapByURL = {}; | 281 this._sourceMapByURL = {}; |
286 this._sourceMapByStyleSheetURL = {}; | 282 this._sourceMapByStyleSheetURL = {}; |
287 this._populate(); | 283 this._populate(); |
288 } | 284 } |
289 } | 285 } |
OLD | NEW |