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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/DatabaseQueryView.js

Issue 2533213004: DevTools: migrate smallicons from resourcesPanel.css to UI.Icon (Closed)
Patch Set: Created 4 years, 1 month 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/resources/resourcesPanel.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/resources/DatabaseQueryView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/DatabaseQueryView.js b/third_party/WebKit/Source/devtools/front_end/resources/DatabaseQueryView.js
index b0a4b9c519956d5144dd1e2e95d4d2c8b02677ba..2d797d096f2af43db7afcd8b53e2861023858ed3 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/DatabaseQueryView.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/DatabaseQueryView.js
@@ -35,7 +35,9 @@ Resources.DatabaseQueryView = class extends UI.VBox {
this.element.classList.add('storage-view', 'query', 'monospace');
this.element.addEventListener('selectstart', this._selectStart.bind(this), false);
+ this._promptIcon = UI.Icon.create('smallicon-text-prompt', 'prompt-icon');
this._promptElement = createElement('div');
+ this._promptElement.appendChild(this._promptIcon);
this._promptElement.className = 'database-query-prompt';
this._promptElement.appendChild(createElement('br'));
this._promptElement.addEventListener('keydown', this._promptKeyDown.bind(this), true);
@@ -129,6 +131,7 @@ Resources.DatabaseQueryView = class extends UI.VBox {
return;
this._prompt.setText('');
+ this._promptElement.insertBefore(this._promptIcon, this._promptElement.firstChild);
this.database.executeSql(query, this._queryFinished.bind(this, query), this._queryError.bind(this, query));
}
@@ -168,14 +171,19 @@ Resources.DatabaseQueryView = class extends UI.VBox {
_appendErrorQueryResult(query, errorText) {
var resultElement = this._appendQueryResult(query);
resultElement.classList.add('error');
- resultElement.textContent = errorText;
+ resultElement.appendChild(UI.Icon.create('smallicon-error', 'prompt-icon'));
+ resultElement.createTextChild(errorText);
this._promptElement.scrollIntoView(false);
}
+ /**
+ * @param {string} query
+ */
_appendQueryResult(query) {
var element = createElement('div');
element.className = 'database-user-query';
+ element.appendChild(UI.Icon.create('smallicon-user-command', 'prompt-icon'));
this.element.insertBefore(element, this._proxyElement);
var commandTextElement = createElement('span');
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/resources/resourcesPanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698