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

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

Issue 828063007: Uprev Google Input Tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update extensions schema. 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/content/candidatebutton.js
diff --git a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js
index b7aa48483dc87353c7630e9110159d4ca48e7410..30897fa5868dee24967a5812f64896eaa6c5e204 100644
--- a/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js
+++ b/third_party/google_input_tools/src/chrome/os/inputview/elements/content/candidatebutton.js
@@ -35,11 +35,12 @@ var Css = i18n.input.chrome.inputview.Css;
* @param {string} iconCss .
* @param {string} text .
* @param {!goog.events.EventTarget=} opt_eventTarget .
+ * @param {boolean=} opt_noSeparator .
* @constructor
* @extends {i18n.input.chrome.inputview.elements.Element}
*/
i18n.input.chrome.inputview.elements.content.CandidateButton = function(
- id, type, iconCss, text, opt_eventTarget) {
+ id, type, iconCss, text, opt_eventTarget, opt_noSeparator) {
goog.base(this, id, type, opt_eventTarget);
/** @type {string} */
@@ -47,6 +48,9 @@ i18n.input.chrome.inputview.elements.content.CandidateButton = function(
/** @type {string} */
this.iconCss = iconCss;
+
+ /** @private {boolean} */
+ this.hasSeperator_ = !opt_noSeparator;
};
var CandidateButton = i18n.input.chrome.inputview.elements.content.
CandidateButton;
@@ -70,7 +74,9 @@ CandidateButton.prototype.createDom = function() {
goog.dom.classlist.addAll(elem, [Css.CANDIDATE_INTER_CONTAINER,
Css.CANDIDATE_BUTTON]);
- this.separatorCell = this.createSeparator_();
+ if (this.hasSeperator_) {
+ this.separatorCell = this.createSeparator_();
+ }
this.iconCell = dom.createDom(goog.dom.TagName.DIV, Css.TABLE_CELL);
dom.appendChild(elem, this.iconCell);
@@ -106,7 +112,9 @@ CandidateButton.prototype.createSeparator_ = function() {
/** @override */
CandidateButton.prototype.resize = function(width, height) {
- goog.style.setSize(this.separatorCell, 1, height);
+ if (this.hasSeperator_) {
+ goog.style.setSize(this.separatorCell, 1, height);
+ }
goog.style.setSize(this.iconCell, width - 1, height);
goog.base(this, 'resize', width, height);

Powered by Google App Engine
This is Rietveld 408576698