| 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 66322da1b841a29893cb01938aa0948f89d46763..f6365f10f5c838c8951466702f3fbf18d987e331 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/CSSSourceFrame.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/CSSSourceFrame.js
|
| @@ -112,7 +112,7 @@ WebInspector.CSSSourceFrame.prototype = {
|
|
|
| var colorRegex = /[\s:;,(){}]((?:rgb|hsl)a?\([^)]+\)|#[0-9a-f]{8}|#[0-9a-f]{6}|#[0-9a-f]{3,4}|[a-z]+)(?=[\s;,(){}])/gi;
|
| for (var lineNumber = startLine; lineNumber <= endLine; lineNumber++) {
|
| - var line = this.textEditor.line(lineNumber).substring(0, WebInspector.CSSSourceFrame.maxSwatchProcessingLength) + "\n";
|
| + var line = "\n" + this.textEditor.line(lineNumber).substring(0, WebInspector.CSSSourceFrame.maxSwatchProcessingLength) + "\n";
|
| var match;
|
| while ((match = colorRegex.exec(line)) !== null) {
|
| if (match.length < 2)
|
| @@ -120,7 +120,7 @@ WebInspector.CSSSourceFrame.prototype = {
|
| var colorText = match[1];
|
| var color = WebInspector.Color.parse(colorText);
|
| if (color)
|
| - colorPositions.push(new WebInspector.CSSSourceFrame.ColorPosition(color, lineNumber, match.index + 1, colorText.length));
|
| + colorPositions.push(new WebInspector.CSSSourceFrame.ColorPosition(color, lineNumber, match.index, colorText.length));
|
| }
|
| }
|
|
|
|
|