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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/SASSSourceMapping.js

Issue 2349343002: DevTools: introduce persistence/ module (Closed)
Patch Set: reupload Created 4 years, 3 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()) {
58 if (!this._networkMapping.hasMappingForNetworkURL(sassURL)) { 58 var contentProvider = sourceMap.sourceContentProvider(sassURL, WebIn spector.resourceTypes.SourceMapStyleSheet);
59 var contentProvider = sourceMap.sourceContentProvider(sassURL, W ebInspector.resourceTypes.SourceMapStyleSheet); 59 this._networkProject.addFile(contentProvider, WebInspector.ResourceT reeFrame.fromStyleSheet(header));
60 this._networkProject.addFile(contentProvider, WebInspector.Resou rceTreeFrame.fromStyleSheet(header));
61 }
62 } 60 }
63 WebInspector.cssWorkspaceBinding.updateLocations(header); 61 WebInspector.cssWorkspaceBinding.updateLocations(header);
64 }, 62 },
65 63
66 /** 64 /**
67 * @param {!WebInspector.Event} event 65 * @param {!WebInspector.Event} event
68 */ 66 */
69 _sourceMapDetached: function(event) 67 _sourceMapDetached: function(event)
70 { 68 {
71 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */(event.data ); 69 var header = /** @type {!WebInspector.CSSStyleSheetHeader} */(event.data );
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (!uiSourceCode) 112 if (!uiSourceCode)
115 return null; 113 return null;
116 return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.source ColumnNumber); 114 return uiSourceCode.uiLocation(entry.sourceLineNumber || 0, entry.source ColumnNumber);
117 }, 115 },
118 116
119 dispose: function() 117 dispose: function()
120 { 118 {
121 WebInspector.EventTarget.removeEventListeners(this._eventListeners); 119 WebInspector.EventTarget.removeEventListeners(this._eventListeners);
122 } 120 }
123 } 121 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698