| Index: Source/devtools/front_end/StylesSourceMapping.js
|
| diff --git a/Source/devtools/front_end/StylesSourceMapping.js b/Source/devtools/front_end/StylesSourceMapping.js
|
| index fcbca2179b9adf87c0836f9f95d49ba4ebc5d236..7fe246d8c074bd854f48d24f4c304254ee1b11e0 100644
|
| --- a/Source/devtools/front_end/StylesSourceMapping.js
|
| +++ b/Source/devtools/front_end/StylesSourceMapping.js
|
| @@ -244,31 +244,13 @@ WebInspector.StyleContentBinding.prototype = {
|
| userCallback("No resource found: " + uiSourceCode.url);
|
| return;
|
| }
|
| -
|
| - this._cssModel.resourceBinding().requestStyleSheetIdForResource(resource, callback.bind(this));
|
|
|
| - /**
|
| - * @param {?CSSAgent.StyleSheetId} styleSheetId
|
| - */
|
| - function callback(styleSheetId)
|
| - {
|
| - if (!styleSheetId) {
|
| - userCallback("No stylesheet found: " + resource.frameId + ":" + resource.url);
|
| - return;
|
| - }
|
| -
|
| - this._innerSetContent(styleSheetId, content, majorChange, userCallback, null);
|
| + var styleSheetId = this._cssModel.resourceBinding().styleSheetIdForResource(resource);
|
| + if (!styleSheetId) {
|
| + userCallback("No stylesheet found: " + resource.frameId + ":" + resource.url);
|
| + return;
|
| }
|
| - },
|
|
|
| - /**
|
| - * @param {CSSAgent.StyleSheetId} styleSheetId
|
| - * @param {string} content
|
| - * @param {boolean} majorChange
|
| - * @param {function(?string)} userCallback
|
| - */
|
| - _innerSetContent: function(styleSheetId, content, majorChange, userCallback)
|
| - {
|
| this._isSettingContent = true;
|
| function callback(error)
|
| {
|
| @@ -307,24 +289,17 @@ WebInspector.StyleContentBinding.prototype = {
|
| */
|
| _innerStyleSheetChanged: function(styleSheetId, content)
|
| {
|
| - /**
|
| - * @param {?string} styleSheetURL
|
| - */
|
| - function callback(styleSheetURL)
|
| - {
|
| - if (typeof styleSheetURL !== "string")
|
| - return;
|
| -
|
| - var uiSourceCode = this._workspace.uiSourceCodeForURL(styleSheetURL);
|
| - if (!uiSourceCode)
|
| - return;
|
| + var styleSheetURL = this._cssModel.resourceBinding().resourceURLForStyleSheetId(styleSheetId);
|
| + if (typeof styleSheetURL !== "string")
|
| + return;
|
|
|
| - if (uiSourceCode.styleFile())
|
| - uiSourceCode.styleFile().addRevision(content);
|
| - }
|
| + var uiSourceCode = this._workspace.uiSourceCodeForURL(styleSheetURL)
|
| + if (!uiSourceCode)
|
| + return;
|
|
|
| - this._cssModel.resourceBinding().requestResourceURLForStyleSheetId(styleSheetId, callback.bind(this));
|
| - },
|
| + if (uiSourceCode.styleFile())
|
| + uiSourceCode.styleFile().addRevision(content);
|
| + }
|
| }
|
|
|
| /**
|
|
|