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

Side by Side 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, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved.
2 // limitations under the License. 2 // limitations under the License.
3 // See the License for the specific language governing permissions and 3 // See the License for the specific language governing permissions and
4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5 // distributed under the License is distributed on an "AS-IS" BASIS, 5 // distributed under the License is distributed on an "AS-IS" BASIS,
6 // Unless required by applicable law or agreed to in writing, software 6 // Unless required by applicable law or agreed to in writing, software
7 // 7 //
8 // http://www.apache.org/licenses/LICENSE-2.0 8 // http://www.apache.org/licenses/LICENSE-2.0
9 // 9 //
10 // You may obtain a copy of the License at 10 // You may obtain a copy of the License at
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 return goog.style.isElementShown(this.getElement()); 135 return goog.style.isElementShown(this.getElement());
136 }; 136 };
137 137
138 138
139 /** 139 /**
140 * Sets the visibility of the element. 140 * Sets the visibility of the element.
141 * 141 *
142 * @param {boolean} visibility True if the element is visible. 142 * @param {boolean} visibility True if the element is visible.
143 */ 143 */
144 Element.prototype.setVisible = function(visibility) { 144 Element.prototype.setVisible = function(visibility) {
145 this.getElement().style.display = visibility ? this.display_ : 'none'; 145 // TODO: Figure out why element can be null.
146 var element = this.getElement();
147 if (element)
148 element.style.display = visibility ? this.display_ : 'none';
146 }; 149 };
147 150
148 151
149 /** 152 /**
150 * Updates the element. 153 * Updates the element.
151 */ 154 */
152 Element.prototype.update = function() { 155 Element.prototype.update = function() {
153 this.setHighlighted(false); 156 this.setHighlighted(false);
154 for (var i = 0; i < this.getChildCount(); i++) { 157 for (var i = 0; i < this.getChildCount(); i++) {
155 var child = /** @type {!Element} */ ( 158 var child = /** @type {!Element} */ (
(...skipping 22 matching lines...) Expand all
178 181
179 /** @override */ 182 /** @override */
180 Element.prototype.disposeInternal = function() { 183 Element.prototype.disposeInternal = function() {
181 this.getElement()['view'] = null; 184 this.getElement()['view'] = null;
182 goog.dispose(this.handler); 185 goog.dispose(this.handler);
183 186
184 goog.base(this, 'disposeInternal'); 187 goog.base(this, 'disposeInternal');
185 }; 188 };
186 189
187 }); // goog.scope 190 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698