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

Side by Side Diff: third_party/google_input_tools/src/chrome/os/inputview/keyboardcontainer.js

Issue 701603002: Update to google-input-tools version 1.0.5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 /** 96 /**
97 * The padding value of handwriting panel. 97 * The padding value of handwriting panel.
98 * 98 *
99 * @type {number} 99 * @type {number}
100 * @private 100 * @private
101 */ 101 */
102 KeyboardContainer.HANDWRITING_PADDING_ = 22; 102 KeyboardContainer.HANDWRITING_PADDING_ = 22;
103 103
104 104
105 /** 105 /**
106 * The padding of emoji keyset.
107 *
108 * @type {number}
109 * @private
110 */
111 KeyboardContainer.EMOJI_PADDING_ = 22;
112
113
114 /**
115 * An div to wrapper candidate view and keyboard set view. 106 * An div to wrapper candidate view and keyboard set view.
116 * 107 *
117 * @private {Element} 108 * @private {Element}
118 */ 109 */
119 KeyboardContainer.prototype.wrapperDiv_ = null; 110 KeyboardContainer.prototype.wrapperDiv_ = null;
120 111
121 112
122 /** @override */ 113 /** @override */
123 KeyboardContainer.prototype.createDom = function() { 114 KeyboardContainer.prototype.createDom = function() {
124 goog.base(this, 'createDom'); 115 goog.base(this, 'createDom');
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 elem.style.paddingBottom = ''; 244 elem.style.paddingBottom = '';
254 } else { 245 } else {
255 h = height - KeyboardContainer.PADDING_BOTTOM_; 246 h = height - KeyboardContainer.PADDING_BOTTOM_;
256 elem.style.paddingBottom = KeyboardContainer.PADDING_BOTTOM_ + 'px'; 247 elem.style.paddingBottom = KeyboardContainer.PADDING_BOTTOM_ + 'px';
257 } 248 }
258 249
259 var padding = Math.round((width - width * widthPercent) / 2); 250 var padding = Math.round((width - width * widthPercent) / 2);
260 elem.style.paddingLeft = elem.style.paddingRight = padding + 'px'; 251 elem.style.paddingLeft = elem.style.paddingRight = padding + 'px';
261 252
262 var w = width - 2 * padding; 253 var w = width - 2 * padding;
263 h = this.currentKeysetView.disableCandidateView ? 254
264 h - KeyboardContainer.EMOJI_PADDING_ : h - candidateViewHeight; 255 // Reduce height if candidate view is enabled
256 h = this.currentKeysetView.disableCandidateView ? h :
257 h - candidateViewHeight;
265 258
266 this.candidateView.setWidthInWeight( 259 this.candidateView.setWidthInWeight(
267 this.currentKeysetView.getWidthInWeight()); 260 this.currentKeysetView.getWidthInWeight());
268 this.candidateView.resize(w, candidateViewHeight); 261 this.candidateView.resize(w, candidateViewHeight);
269 this.currentKeysetView.resize(w, h); 262 this.currentKeysetView.resize(w, h);
270 this.expandedCandidateView.resize(w, h); 263 this.expandedCandidateView.resize(w, h);
271 this.altDataView.resize(screen.width, height); 264 this.altDataView.resize(screen.width, height);
272 this.menuView.resize(screen.width, height); 265 this.menuView.resize(screen.width, height);
273 }; 266 };
274 267
(...skipping 27 matching lines...) Expand all
302 295
303 /** 296 /**
304 * Cleans the stokes. 297 * Cleans the stokes.
305 */ 298 */
306 KeyboardContainer.prototype.cleanStroke = function() { 299 KeyboardContainer.prototype.cleanStroke = function() {
307 if (this.currentKeysetView) { 300 if (this.currentKeysetView) {
308 this.currentKeysetView.cleanStroke(); 301 this.currentKeysetView.cleanStroke();
309 } 302 }
310 }; 303 };
311 }); // goog.scope 304 }); // goog.scope
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698