Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: Source/devtools/front_end/SASSSourceMapping.js

Issue 14320027: DevTools: Track CSSStyleSheetHeaders in the front-end real time (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for trybots (with [Slow]) Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/CSSStyleModel.js ('k') | Source/devtools/front_end/StylesSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698