| Index: Source/devtools/front_end/StylesSourceMapping.js
|
| diff --git a/Source/devtools/front_end/StylesSourceMapping.js b/Source/devtools/front_end/StylesSourceMapping.js
|
| index 1ca9186dd055d7efce6b3cf2c8d4d14d3168fb25..c39f07cd2dbc79ad60d51d43c197a309dd6eac48 100644
|
| --- a/Source/devtools/front_end/StylesSourceMapping.js
|
| +++ b/Source/devtools/front_end/StylesSourceMapping.js
|
| @@ -207,6 +207,7 @@ WebInspector.StylesSourceMapping.prototype = {
|
| WebInspector.StyleFile = function(uiSourceCode)
|
| {
|
| this._uiSourceCode = uiSourceCode;
|
| + this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.FormattedChanged, this._formattedChanged, this);
|
| this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
|
| this._uiSourceCode.addEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
|
| }
|
| @@ -216,6 +217,11 @@ WebInspector.StyleFile.updateTimeout = 200;
|
| WebInspector.StyleFile.sourceURLRegex = /\n[\040\t]*\/\*#[\040\t]sourceURL=[\040\t]*([^\s]*)[\040\t]*\*\/[\040\t]*$/m;
|
|
|
| WebInspector.StyleFile.prototype = {
|
| + _formattedChanged: function()
|
| + {
|
| + WebInspector.styleContentBinding.styleContentFormattingChanged(this._uiSourceCode);
|
| + },
|
| +
|
| _workingCopyCommitted: function(event)
|
| {
|
| if (this._isAddingRevision)
|
| @@ -278,6 +284,7 @@ WebInspector.StyleFile.prototype = {
|
| {
|
| this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyCommitted, this._workingCopyCommitted, this);
|
| this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.WorkingCopyChanged, this._workingCopyChanged, this);
|
| + this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events.FormattedChanged, this._formattedChanged, this);
|
| }
|
| }
|
|
|
| @@ -295,6 +302,16 @@ WebInspector.StyleContentBinding = function(cssModel, workspace)
|
| WebInspector.StyleContentBinding.prototype = {
|
| /**
|
| * @param {WebInspector.UISourceCode} uiSourceCode
|
| + */
|
| + styleContentFormattingChanged: function(uiSourceCode)
|
| + {
|
| + var styleSheetIds = this._cssModel.styleSheetIdsForURL(uiSourceCode.url);
|
| + for (var i = 0; i < styleSheetIds.length; ++i)
|
| + this._cssModel.styleSheetHeaderForId(styleSheetIds[i]).updateLocations();
|
| + },
|
| +
|
| + /**
|
| + * @param {WebInspector.UISourceCode} uiSourceCode
|
| * @param {string} content
|
| * @param {boolean} majorChange
|
| * @param {function(?string)} userCallback
|
|
|