Index: third_party/WebKit/Source/devtools/front_end/sources/CSSSourceFrame.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/CSSSourceFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/CSSSourceFrame.js |
index eed8305089dc0111298b341d1f0336bf5e72e543..9d07485c0f8827f00db0503b340b0e0683526d6d 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/CSSSourceFrame.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/CSSSourceFrame.js |
@@ -187,6 +187,7 @@ WebInspector.CSSSourceFrame.prototype = { |
} |
this._currentSwatch = swatch; |
this._currentColorPosition = colorPosition; |
+ this.textEditor.setSelection(WebInspector.TextRange.createFromLocation(colorPosition.textRange.startLine, colorPosition.textRange.startColumn)); |
this._spectrum = new WebInspector.Spectrum(); |
this._spectrum.setColor(swatch.color(), swatch.format()); |
this._spectrum.addEventListener(WebInspector.Spectrum.Events.SizeChanged, this._spectrumResized, this); |
@@ -210,7 +211,7 @@ WebInspector.CSSSourceFrame.prototype = { |
this._muteColorProcessing = true; |
var colorString = /** @type {string} */ (event.data); |
this._currentSwatch.setColorText(colorString); |
- this._textEditor.editRange(this._currentColorPosition.textRange, colorString); |
+ this._textEditor.editRange(this._currentColorPosition.textRange, colorString, "*color-text-changed"); |
lushnikov
2016/07/21 17:55:39
what is "*" in the beginning? Can me remove it unl
flandy
2016/07/21 18:00:52
The star is necessary as it is used by CodeMirror
flandy
2016/07/21 20:01:51
*change history event
|
this._currentColorPosition.color = WebInspector.Color.parse(colorString); |
this._currentColorPosition.textRange.endColumn = this._currentColorPosition.textRange.startColumn + colorString.length; |
}, |