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

Unified Diff: ui/keyboard/resources/elements/kb-key.js

Issue 252743002: Update Virtual Keybaord icons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Uprev. Created 6 years, 8 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
« no previous file with comments | « ui/keyboard/resources/elements/kb-key.html ('k') | ui/keyboard/resources/images/backspace.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/keyboard/resources/elements/kb-key.js
diff --git a/ui/keyboard/resources/elements/kb-key.js b/ui/keyboard/resources/elements/kb-key.js
index c58b190a54315dca549c486e6a2c6868fb332a08..17ff1ae317acb3dbb026e4aaf8e08bef136a6af5 100644
--- a/ui/keyboard/resources/elements/kb-key.js
+++ b/ui/keyboard/resources/elements/kb-key.js
@@ -67,8 +67,11 @@ Polymer('kb-key', {
if (!this.image) {
this.$.key.style.backgroundImage = "none";
} else {
+ // If no extension provided, default to svg.
+ var image =
+ this.image.split('.').length > 1 ? this.image : this.image + ".svg";
this.$.key.style.backgroundImage =
- "url(images/" + this.image + ".svg)";
+ "url(images/" + image + ")";
}
},
« no previous file with comments | « ui/keyboard/resources/elements/kb-key.html ('k') | ui/keyboard/resources/images/backspace.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698