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

Unified Diff: third_party/google_input_tools/src/chrome/os/inputview/elements/element.js

Issue 1257313003: Update Google Input Tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Free up grd resources. Created 5 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: third_party/google_input_tools/src/chrome/os/inputview/elements/element.js
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/element.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/element.js
index 467b59694fa08752ee218a2ceef11c807a490521..48e7f8ba9bf325e65273e8175d70d6cd2bc20785 100644
--- a/third_party/google_input_tools/src/chrome/os/inputview/elements/element.js
+++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/element.js
@@ -142,7 +142,10 @@ Element.prototype.isVisible = function() {
* @param {boolean} visibility True if the element is visible.
*/
Element.prototype.setVisible = function(visibility) {
- this.getElement().style.display = visibility ? this.display_ : 'none';
+ // TODO: Figure out why element can be null.
+ var element = this.getElement();
+ if (element)
+ element.style.display = visibility ? this.display_ : 'none';
};

Powered by Google App Engine
This is Rietveld 408576698