Changeset 187902 in webkit
- Timestamp:
- Aug 4, 2015, 3:48:42 PM (10 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r187900 r187902 1 2015-08-04 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: Existing text after completions do not have their completion style removed once hint is applied 4 https://bugs.webkit.org/show_bug.cgi?id=147536 5 6 Reviewed by Timothy Hatcher. 7 8 No longer applies a class to the text after the completion hint. 9 10 * UserInterface/Controllers/CodeMirrorCompletionController.css: 11 (.CodeMirror .CodeMirror-lines .completion-hint): 12 * UserInterface/Controllers/CodeMirrorCompletionController.js: 13 (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update): 14 (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint): 15 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker): 16 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update): 17 (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint): 18 1 19 2015-08-04 Matt Baker <mattbaker@apple.com> 2 20 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.css
r164543 r187902 25 25 26 26 .CodeMirror .CodeMirror-lines .completion-hint { 27 text-decoration: none !important; 27 28 opacity: 0.4; 28 29 } -
trunk/Source/WebInspectorUI/UserInterface/Controllers/CodeMirrorCompletionController.js
r187708 r187902 271 271 var from = {line: this._lineNumber, ch: this._startOffset}; 272 272 var cursor = {line: this._lineNumber, ch: this._endOffset}; 273 var to = {line: this._lineNumber, ch: this._startOffset + replacementText.length};274 273 var currentText = this._codeMirror.getRange(from, cursor); 275 274 276 275 this._createCompletionHintMarker(cursor, replacementText.replace(currentText, "")); 277 if (cursor.ch !== to.ch)278 this._codeMirror.markText(cursor, to, {className: WebInspector.CodeMirrorCompletionController.CompletionHintStyleClassName});279 276 } 280 277 … … 343 340 this._notifyCompletionsHiddenSoon(); 344 341 342 function clearMarker(marker) 343 { 344 if (!marker) 345 return; 346 347 var range = marker.find(); 348 if (range) 349 marker.clear(); 350 351 return null; 352 } 353 345 354 function update() 346 355 { 347 var range = this._completionHintMarker.find(); 348 if (range) 349 this._completionHintMarker.clear(); 350 351 this._completionHintMarker = null; 356 this._completionHintMarker = clearMarker(this._completionHintMarker); 352 357 353 358 if (dontRestorePrefix)
Note:
See TracChangeset
for help on using the changeset viewer.