Web Inspector: REGRESSION: CSS Resource appears as empty after editing it via Styles...
authorjonowells@apple.com <jonowells@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Feb 2015 21:33:26 +0000 (21:33 +0000)
committerjonowells@apple.com <jonowells@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Feb 2015 21:33:26 +0000 (21:33 +0000)
commit69ba1bcb621664c097fbea05079c416a7c1322cd
tree29ab9ff8a1012e3a37d59c7fe2ef87e7455dac33
parentb14c3cb6a7d7010275451629e3fb61d505833624
Web Inspector: REGRESSION: CSS Resource appears as empty after editing it via Styles sidebar
https://bugs.webkit.org/show_bug.cgi?id=140586

Reviewed by Timothy Hatcher.

Update SourceCode#_processContent to properly handle the promise returned from CSSAgent so that the content
will properly update when a style has changed. Properly clear the existing _requestContentPromise on the
stylesheet so that the content will update correctly.

* UserInterface/Controllers/CSSStyleManager.js: Drive-by style updates.
(WebInspector.CSSStyleManager.prototype._fetchInfoForAllStyleSheets):
* UserInterface/Models/CSSStyleSheet.js: Drive-by inheritance style update.
(WebInspector.CSSStyleSheet.prototype.requestContentFromBackend): Remove unnecessary backend promise function call.
* UserInterface/Models/Resource.js: Drive-by removal of unused variable.
* UserInterface/Models/SourceCode.js:
(WebInspector.SourceCode.prototype.markContentAsStale): Clear _requestContentPromise.
(WebInspector.SourceCode.prototype._processContent): Handle `parameters.text` correctly.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@179755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/CSSStyleManager.js
Source/WebInspectorUI/UserInterface/Models/CSSStyleSheet.js
Source/WebInspectorUI/UserInterface/Models/Resource.js
Source/WebInspectorUI/UserInterface/Models/SourceCode.js