Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1407)

Unified Diff: Source/devtools/front_end/elements/StylesSidebarPane.js

Issue 376803002: [DevTools] Color values should be case insensitive while suggestions should be case aware (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/elements/StylesSidebarPane.js
diff --git a/Source/devtools/front_end/elements/StylesSidebarPane.js b/Source/devtools/front_end/elements/StylesSidebarPane.js
index 0b12ff060bcda5b2c9bc497d827a5e2e095a8643..5601853789064bfe3c2043ceb2db9bce0b0a7976 100644
--- a/Source/devtools/front_end/elements/StylesSidebarPane.js
+++ b/Source/devtools/front_end/elements/StylesSidebarPane.js
@@ -2296,7 +2296,10 @@ WebInspector.StylePropertyTreeElementBase.prototype = {
}
var colorValueElement = document.createElement("span");
- colorValueElement.textContent = color.toString(format);
+ if (format === WebInspector.Color.Format.Original)
+ colorValueElement.textContent = text;
+ else
+ colorValueElement.textContent = color.toString(format);
/**
* @param {string} curFormat
@@ -3322,6 +3325,11 @@ WebInspector.StylesSidebarPane.CSSPropertyPrompt.prototype = {
}
var results = this._cssCompletions.startsWith(prefix);
+ var userEnteredText = wordRange.toString().replace("-", "");
+ if (userEnteredText && (userEnteredText === userEnteredText.toUpperCase())) {
+ for (var i = 0; i < results.length; ++i)
+ results[i] = results[i].toUpperCase();
+ }
var selectedIndex = this._cssCompletions.mostUsedOf(results);
completionsReadyCallback(results, selectedIndex);
},
« no previous file with comments | « LayoutTests/inspector/elements/styles/style-autocomplete.html ('k') | Source/devtools/front_end/sdk/CSSMetadata.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698