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

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

Issue 899673003: Uprev Google Input Tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/layout/linearlayout.js
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/layout/linearlayout.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/layout/linearlayout.js
index f583c8e50632422bdac9b6f50ae628029886b321..ebcfebdc9207e0d8fd8650515a59af81b95419cb 100644
--- a/third_party/google_input_tools/src/chrome/os/inputview/elements/layout/linearlayout.js
+++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/layout/linearlayout.js
@@ -119,6 +119,12 @@ LinearLayout.prototype.getWidthInWeight = function() {
LinearLayout.prototype.resize = function(width, height) {
goog.base(this, 'resize', width, height);
+ var elem = this.getElement();
+ var borderBox = goog.style.getBorderBox(elem);
+ var paddingBox = goog.style.getPaddingBox(elem);
+ var marginBox = goog.style.getMarginBox(elem);
+ var w = width - borderBox.left - borderBox.right - paddingBox.left -
+ paddingBox.right - marginBox.left - marginBox.right;
var weightArray = [];
for (var i = 0; i < this.getChildCount(); i++) {
var child = /** @type {i18n.input.chrome.inputview.elements.Weightable} */ (
@@ -126,7 +132,7 @@ LinearLayout.prototype.resize = function(width, height) {
weightArray.push(child.getWidthInWeight());
}
var splitedWidth = i18n.input.chrome.inputview.util.splitValue(weightArray,
- width);
+ w);
for (var i = 0; i < this.getChildCount(); i++) {
var child = /** @type {i18n.input.chrome.inputview.elements.Element} */ (
this.getChildAt(i));

Powered by Google App Engine
This is Rietveld 408576698