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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js

Issue 2535393004: DevTools: [SuggestBox] follow-up to migration icons to UI.Icon (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/suggestBox.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js b/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
index cc0c23eef54896677a93eb2867dc875a81af18fe..23cd78d8e052ac698921deabb084e643665b4fe9 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/SuggestBox.js
@@ -285,14 +285,16 @@ UI.SuggestBox = class {
element.classList.add('secondary');
element.tabIndex = -1;
var displayText = text.trimEnd(50 + query.length);
+
+ var suggestionText = element.createChild('span', 'suggestion-text');
var index = displayText.toLowerCase().indexOf(query.toLowerCase());
if (index > 0)
- element.createChild('span').textContent = displayText.substring(0, index);
+ suggestionText.createChild('span').textContent = displayText.substring(0, index);
if (index > -1)
- element.createChild('span', 'query').textContent = displayText.substring(index, index + query.length);
- element.createChild('span').textContent = displayText.substring(index > -1 ? index + query.length : 0);
+ suggestionText.createChild('span', 'query').textContent = displayText.substring(index, index + query.length);
+ suggestionText.createChild('span').textContent = displayText.substring(index > -1 ? index + query.length : 0);
+ suggestionText.createChild('span', 'spacer');
element.__fullValue = text;
- element.createChild('span', 'spacer');
element.addEventListener('mousedown', this._onItemMouseDown.bind(this), false);
return element;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/suggestBox.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698