Changeset 179755 in webkit
- Timestamp:
- Feb 6, 2015 1:33:26 PM (9 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r179713 r179755 1 2015-02-06 Jono Wells <jonowells@apple.com> 2 3 Web Inspector: REGRESSION: CSS Resource appears as empty after editing it via Styles sidebar 4 https://bugs.webkit.org/show_bug.cgi?id=140586 5 6 Reviewed by Timothy Hatcher. 7 8 Update SourceCode#_processContent to properly handle the promise returned from CSSAgent so that the content 9 will properly update when a style has changed. Properly clear the existing _requestContentPromise on the 10 stylesheet so that the content will update correctly. 11 12 * UserInterface/Controllers/CSSStyleManager.js: Drive-by style updates. 13 (WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets): 14 * UserInterface/Models/CSSStyleSheet.js: Drive-by inheritance style update. 15 (WebInspector.CSSStyleSheet.prototype.requestContentFromBackend): Remove unnecessary backend promise function call. 16 * UserInterface/Models/Resource.js: Drive-by removal of unused variable. 17 * UserInterface/Models/SourceCode.js: 18 (WebInspector.SourceCode.prototype.markContentAsStale): Clear _requestContentPromise. 19 (WebInspector.SourceCode.prototype._processContent): Handle `parameters.text` correctly. 20 1 21 2015-02-04 Jono Wells <jonowells@apple.com> 2 22 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js
r177791 r179755 51 51 WebInspector.CSSStyleManager.prototype = { 52 52 constructor: WebInspector.CSSStyleManager, 53 __proto__: WebInspector.Object.prototype, 53 54 54 55 // Public … … 253 254 } 254 255 255 for (var i = 0; i < styleSheets.length; ++i) { 256 var styleSheetInfo = styleSheets[i]; 257 256 for (var styleSheetInfo of styleSheets) { 258 257 // COMPATIBILITY (iOS 6): The info did not have 'frameId', so make parentFrame null in that case. 259 258 var parentFrame = "frameId" in styleSheetInfo ? WebInspector.frameResourceManager.frameForIdentifier(styleSheetInfo.frameId) : null; … … 367 366 } 368 367 }; 369 370 WebInspector.CSSStyleManager.prototype.__proto__ = WebInspector.Object.prototype; -
trunk/Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js
r177791 r179755 50 50 WebInspector.CSSStyleSheet.prototype = { 51 51 constructor: WebInspector.CSSStyleSheet, 52 __proto__: WebInspector.SourceCode.prototype, 52 53 53 54 // Public … … 130 131 } 131 132 132 return CSSAgent.getStyleSheetText .promise(this._id);133 return CSSAgent.getStyleSheetText(this._id); 133 134 }, 134 135 … … 145 146 } 146 147 }; 147 148 WebInspector.CSSStyleSheet.prototype.__proto__ = WebInspector.SourceCode.prototype; -
trunk/Source/WebInspectorUI/UserInterface/Models/Resource.js
r179713 r179755 684 684 685 685 if (!this._finishThenRequestContentPromise) { 686 var listener = new WebInspector.EventListener(this, true);687 686 this._finishThenRequestContentPromise = new Promise(function (resolve, reject) { 688 687 this.addEventListener(WebInspector.Resource.Event.LoadingDidFinish, resolve); -
trunk/Source/WebInspectorUI/UserInterface/Models/SourceCode.js
r179713 r179755 176 176 markContentAsStale: function() 177 177 { 178 this._requestContentPromise = null; 178 179 this._contentReceived = false; 179 180 }, … … 190 191 _processContent: function(parameters) 191 192 { 192 // Different backend APIs return one of `content, `body`, or `scriptSource`.193 var content = parameters.content || parameters.body || parameters. scriptSource;193 // Different backend APIs return one of `content, `body`, `text`, or `scriptSource`. 194 var content = parameters.content || parameters.body || parameters.text || parameters.scriptSource; 194 195 var error = parameters.error; 195 196 var base64Encoded = parameters.base64Encoded;
Note: See TracChangeset
for help on using the changeset viewer.