Changeset 250618 in webkit
- Timestamp:
- Oct 2, 2019 11:49:53 AM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r250580 r250618 1 2019-10-02 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: REGRESSION(r250149): changing CSS via the Styles details sidebar panel doesn't update the associated resource 4 https://bugs.webkit.org/show_bug.cgi?id=202446 5 6 Reviewed by Joseph Pecoraro. 7 8 When updating the text of a `WI.CSSProperty` (or the selector of a `WI.CSSRule`) is updated, 9 Web Inspector will update the backend style sheet, which will notify the `WI.CSSManager` of 10 the change, without ever going through the associated `WI.SourceCode`. `WI.CSSManager` then 11 updates the content of the `WI.SourceCode` to reflect these changes, but at that point the 12 `WI.SourceCode` hadn't yet "moved" it's `currentRevision` forward of it's `originalRevision` 13 which means it would get overridden the first time the `WI.SourceCode` updates itself. 14 15 Modify `WI.SourceCode` such that every path to get the `currentRevision` ensures that it is 16 "moved" forward before the `WI.SourceCodeRevision` value is returned. 17 18 * UserInterface/Models/SourceCode.js: 19 (WI.SourceCode.prototype.get currentRevision): 20 (WI.SourceCode.prototype.get content): 21 (WI.SourceCode.prototype.revisionContentDidChange): 22 (WI.SourceCode.prototype._initializeCurrentRevisionIfNeeded): Added. 23 (WI.SourceCode.prototype._processContent): 24 1 25 2019-10-01 Devin Rousso <drousso@apple.com> 2 26 -
trunk/Source/WebInspectorUI/UserInterface/Models/SourceCode.js
r250149 r250618 67 67 get currentRevision() 68 68 { 69 this._initializeCurrentRevisionIfNeeded(); 69 70 return this._currentRevision; 70 71 } … … 87 88 get content() 88 89 { 89 return this. _currentRevision.content;90 return this.currentRevision.content; 90 91 } 91 92 … … 181 182 return; 182 183 183 if (revision !== this. _currentRevision)184 if (revision !== this.currentRevision) 184 185 return; 185 186 … … 220 221 221 222 // Private 223 224 _initializeCurrentRevisionIfNeeded() 225 { 226 if (this._currentRevision === this._originalRevision) 227 this.currentRevision = this._originalRevision.copy(); 228 } 222 229 223 230 _processContent(parameters) … … 238 245 this._ignoreRevisionContentDidChangeEvent = false; 239 246 240 if (this._currentRevision === this._originalRevision) 241 this.currentRevision = this._originalRevision.copy(); 247 this._initializeCurrentRevisionIfNeeded(); 242 248 243 249 // FIXME: Returning the content in this promise is misleading. It may not be current content
Note: See TracChangeset
for help on using the changeset viewer.