| diff -urN nacl-mozc-1.15.1800.4.orig/config/jp.js nacl-mozc-1.15.1800.4/config/jp.js |
| --- nacl-mozc-1.15.1800.4.orig/config/jp.js 1970-01-01 09:00:00.000000000 +0900 |
| +++ nacl-mozc-1.15.1800.4/config/jp.js 2014-05-09 13:27:42.390442458 +0900 |
| @@ -0,0 +1,5 @@ |
| +(function() { function b(c,a){return c.type=a}var d="push",e="ArrowDown",f="ArrowLeft",h="ArrowRight",k="ArrowUp",l="ShiftLeft",m="ShiftRight",n="inputview-arrow-key ",p="inputview-down-key",q="inputview-left-key",r="inputview-right-key",s="inputview-shift-icon",t="inputview-up-key";function u(c,a,g,H){v.splice.apply(c,w(arguments,1))}function w(c,a,g){return 2>=arguments.length?v.slice.call(c,a):v.slice.call(c,a,g)} |
| +function x(c){var a={toState:1,iconCssClass:s,type:5};a.id=c?l:m;a.supportSticky=void 0;return y(a)}function z(c){var a={iconCssClass:n};0==c?(a.id=k,a.iconCssClass+=t,b(a,15)):1==c?(a.id=e,a.iconCssClass+=p,b(a,16)):2==c?(a.id=f,a.iconCssClass+=q,b(a,17)):3==c&&(a.id=h,a.iconCssClass+=r,b(a,18));return y(a)}function y(c){var a={},g;for(g in c)a[g]=c[g];return{spec:a}};var v=Array.prototype;for(var A=[["`","~"],["1","!"],["2",'"'],["3","#"],["4","$"],["5","%"],["6","&"],["7","'"],["8","("],["9",")"],["0","~"],["-","="],["^","~"],["q","Q"],["w","W"],["e","E"],["r","R"],["t","T"],["y","Y"],["u","U"],["i","I"],["o","O"],["p","P"],["@","`"],["[","{"],["]","}"],["a","A"],["s","S"],["d","D"],["f","F"],["g","G"],["h","H"],["j","J"],["k","K"],["l","L"],[";","+"],[":","*"],["z","Z"],["x","X"],["c","C"],["v","V"],["b","B"],["n","N"],["m","M"],[",","<"],[".",">"],["/","?"],[" "," "]],B=[],C={}, |
| +D="Backquote Digit1 Digit2 Digit3 Digit4 Digit5 Digit6 Digit7 Digit8 Digit9 Digit0 Minus Equal KeyQ KeyW KeyE KeyR KeyT KeyY KeyU KeyI KeyO KeyP BracketLeft BracketRight Backslash KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL Semicolon Quote KeyZ KeyX KeyC KeyV KeyB KeyN KeyM Comma Period Slash".split(" "),E=0;E<A.length-1;E++){var F=y({id:D[E],type:6,characters:A[E]});B[d](F)}var G=y({name:" ",type:11,id:"Space"});u(B,13,0,y({iconCssClass:"inputview-backspace-icon",type:13,id:"Backspace"})); |
| +u(B,14,0,y({iconCssClass:"inputview-tab-icon",type:14,id:"Tab"}));u(B,28,0,y({toState:4,name:"caps",type:5,id:"OsLeft"}));u(B,40,0,y({iconCssClass:"inputview-enter-icon",type:12,id:"Enter"}));u(B,41,0,x(!0));B[d](x(!1));B[d](y({toState:8,name:"ctrl",type:5,id:"ControlLeft"}));B[d](y({toState:16,name:"alt",type:5,id:"AltLeft"}));B[d](y({id:"toCompact",name:"",toKeyset:"us.compact",iconCssClass:"inputview-compact-switcher",type:21,record:!0}));B[d](G);B[d](y({toState:2,name:"altgr",type:5,id:"AltRight"})); |
| +B[d](z(2));B[d](z(3));B[d](y({iconCssClass:"inputview-hide-keyboard-icon",type:19,id:"HideKeyboard"}));for(E=0;E<B.length;E++)F=B[E],C[F.spec.id]="101kbd-k-"+E;google.ime.chrome.inputview.onConfigLoaded({keyList:B,mapping:C,layout:"101kbd",hasAltGrKey:!1,id:"jp"}); })() |
| diff -urN nacl-mozc-1.15.1800.4.orig/config/us.js nacl-mozc-1.15.1800.4/config/us.js |
| --- nacl-mozc-1.15.1800.4.orig/config/us.js 2014-05-09 13:53:08.470488225 +0900 |
| +++ nacl-mozc-1.15.1800.4/config/us.js 2014-05-09 13:27:42.390442458 +0900 |
| @@ -1,10 +1,10 @@ |
| -(function() { function e(d,a){return d.type=a} |
| -var f="push",h="chrome",k="inputview",m="length",n="onConfigLoaded",p="",q=" ",r="?123",s="ArrowDown",t="ArrowLeft",w="ArrowRight",x="ArrowUp",y="Backspace",z="Enter",A="HideKeyboard",B="ShiftLeft",aa="ShiftRight",ba="Space",C="abc",ca="compactkbd",da="compactkbd-k-",D="compactkbd-k-key-",ea="inputview-arrow-key ",fa="inputview-backspace-icon",ga="inputview-down-key",ha="inputview-enter-icon",ia="inputview-hide-keyboard-icon",ja="inputview-left-key",ka="inputview-regular-switcher",la="inputview-right-key", |
| -ma="inputview-shift-icon",na="inputview-up-key",E="us",F="us.compact",G="us.compact.123",H="us.compact.more",I="~[<";function J(d,a,b,v){K.splice.apply(d,oa(arguments,1))}function oa(d,a,b){return 2>=arguments[m]?K.slice.call(d,a):K.slice.call(d,a,b)}function L(){return M({iconCssClass:ia,type:19,id:A})}function N(d,a){var b={toState:1,iconCssClass:ma,type:5};b.id=d?B:aa;b.supportSticky=a;return M(b)}function O(){return M({iconCssClass:ha,type:12,id:z})} |
| -function P(){return M({iconCssClass:fa,type:13,id:y})}function R(){return M({name:q,type:11,id:ba})}function S(d){var a={iconCssClass:ea};0==d?(a.id=x,a.iconCssClass+=na,e(a,15)):1==d?(a.id=s,a.iconCssClass+=ga,e(a,16)):2==d?(a.id=t,a.iconCssClass+=ja,e(a,17)):3==d&&(a.id=w,a.iconCssClass+=la,e(a,18));return M(a)}function M(d){var a={},b;for(b in d)a[b]=d[b];return{spec:a}} |
| -function T(d,a){for(var b=[],v={},g=0;g<d[m]-1;g++){var c;c=d[g][0];var l=2==d[g][m]?d[g][1]:void 0,Q=10==g?0.43:0,u={};u.id=D+g;e(u,22);u.text=c;l&&(u.hintText=l);Q&&(u.marginLeftPercent=Q);c=M(u);b[f](c)}g=R();c=b[m];J(b,10,0,P());J(b,20,0,O());switch(a){case 0:J(b,21,0,N(!0,!0));J(b,31,0,N(!1,!0));l=U(D+c++,r,G);J(b,32,0,l);c=U(D+c++,p,E,ka,!0);J(b,34,0,c);break;case 1:l=U(D+c++,I,H);J(b,21,0,l);l=U(D+c++,I,H);J(b,31,0,l);c=U(D+c++,C,F);J(b,32,0,c);break;case 2:l=U(D+c++,r,G),J(b,21,0,l),l=U(D+ |
| -c++,r,G),J(b,31,0,l),c=U(D+c++,C,F),J(b,32,0,c)}J(b,35,0,g);b[f](L());for(g=0;g<b[m];g++)c=b[g],v[c.spec.id]=da+g;return{keyList:b,mapping:v,layout:ca}}function U(d,a,b,v,g){var c={};c.id=d;c.name=a;c.toKeyset=b;c.iconCssClass=v;e(c,21);c.record=!!g;return M(c)};var K=Array.prototype;for(var V,W=[["`","~"],["1","!"],["2","@"],["3","#"],["4","$"],["5","%"],["6","^"],["7","&"],["8","*"],["9","("],["0",")"],["-","_"],["=","+"],["q","Q"],["w","W"],["e","E"],["r","R"],["t","T"],["y","Y"],["u","U"],["i","I"],["o","O"],["p","P"],["[","{"],["]","}"],["\\","|"],["a","A"],["s","S"],["d","D"],["f","F"],["g","G"],["h","H"],["j","J"],["k","K"],["l","L"],[";",":"],["'",'"'],["z","Z"],["x","X"],["c","C"],["v","V"],["b","B"],["n","N"],["m","M"],[",","<"],[".",">"],["/","?"],[q,q]],X=[],Y={}, |
| -pa="Backquote Digit1 Digit2 Digit3 Digit4 Digit5 Digit6 Digit7 Digit8 Digit9 Digit0 Minus Equal KeyQ KeyW KeyE KeyR KeyT KeyY KeyU KeyI KeyO KeyP BracketLeft BracketRight Backslash KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL Semicolon Quote KeyZ KeyX KeyC KeyV KeyB KeyN KeyM Comma Period Slash".split(" "),Z=0;Z<W[m]-1;Z++){var $=M({id:pa[Z],type:6,characters:W[Z]});X[f]($)}var qa=R();J(X,13,0,P());J(X,14,0,M({iconCssClass:"inputview-tab-icon",type:14,id:"Tab"})); |
| -J(X,28,0,M({toState:4,name:"caps",type:5,id:"OsLeft"}));J(X,40,0,O());J(X,41,0,N(!0));X[f](N(!1));X[f](M({toState:8,name:"ctrl",type:5,id:"Ctrl"}));X[f](M({toState:16,name:"alt",type:5,id:"Alt"}));X[f](U("toCompact",p,F,"inputview-compact-switcher",!0));X[f](qa);X[f](M({toState:2,name:"alt gr",type:5,id:"AltRight"}));X[f](S(2));X[f](S(3));X[f](L());for(Z=0;Z<X[m];Z++)$=X[Z],Y[$.spec.id]="101kbd-k-"+Z;V={keyList:X,mapping:Y,layout:"101kbd",hasAltGrKey:!1,id:E};google.ime[h][k][n](V); |
| -V=T([["q","1"],["w","2"],["e","3"],["r","4"],["t","5"],["y","6"],["u","7"],["i","8"],["o","9"],["p","0"],["a"],["s"],["d"],["f"],["g"],["h"],["j"],["k"],["l"],["z"],["x"],["c"],["v"],["b"],["n"],["m"],["!"],["?"],["/"],[","],["."],[q]],0);V.id=F;google.ime[h][k][n](V);V=T([["1"],["2"],["3"],["4"],["5"],["6"],["7"],["8"],["9"],["0"],["@"],["#"],["$"],["%"],["&"],["-"],["+"],["("],[")"],["\\"],["="],["*"],['"'],["'"],[":"],[";"],["!"],["?"],["/"],["_"],[","],["."],[q]],1);V.id=G;google.ime[h][k][n](V); |
| -V=T([["~"],["`"],["|"],["\u2022"],["\u23b7"],["\u03a0"],["\u00f7"],["\u00d7"],["\u00b6"],["\u0394"],["\u00a3"],["\u00a2"],["\u20ac"],["\u00a5"],["^"],["\u00b0"],["="],["{"],["}"],["\\"],["\u00a9"],["\u00ae"],["\u2122"],["\u2105"],["["],["]"],["\u00a1"],["\u00bf"],["<"],[">"],[","],["."],[q]],2);V.id=H;google.ime[h][k][n](V); })() |
| +(function() { function f(d,a){return d.type=a} |
| +var g="push",h="chrome",k="inputview",l="length",n="onConfigLoaded",p=" ",q="?123",r="ArrowDown",t="ArrowLeft",u="ArrowRight",w="ArrowUp",x="Backspace",y="Enter",z="HideKeyboard",A="ShiftLeft",B="ShiftRight",C="Space",D="abc",aa="compactkbd",ba="compactkbd-k-",E="compactkbd-k-key-",ca="inputview-arrow-key ",da="inputview-backspace-icon",ea="inputview-down-key",fa="inputview-enter-icon",ga="inputview-hide-keyboard-icon",ha="inputview-left-key",ia="inputview-right-key",ja="inputview-shift-icon",ka= |
| +"inputview-up-key",F="us.compact",G="us.compact.123",H="us.compact.more",I="~[<";function J(d,a,b,v){K.splice.apply(d,la(arguments,1))}function la(d,a,b){return 2>=arguments[l]?K.slice.call(d,a):K.slice.call(d,a,b)}function L(){return M({iconCssClass:ga,type:19,id:z})}function N(d,a){var b={toState:1,iconCssClass:ja,type:5};b.id=d?A:B;b.supportSticky=a;return M(b)}function P(){return M({iconCssClass:fa,type:12,id:y})}function Q(){return M({iconCssClass:da,type:13,id:x})} |
| +function R(){return M({name:p,type:11,id:C})}function S(d){var a={iconCssClass:ca};0==d?(a.id=w,a.iconCssClass+=ka,f(a,15)):1==d?(a.id=r,a.iconCssClass+=ea,f(a,16)):2==d?(a.id=t,a.iconCssClass+=ha,f(a,17)):3==d&&(a.id=u,a.iconCssClass+=ia,f(a,18));return M(a)}function M(d){var a={},b;for(b in d)a[b]=d[b];return{spec:a}} |
| +function T(d,a){for(var b=[],v={},e=0;e<d[l]-1;e++){var c;c=d[e][0];var m=2==d[e][l]?d[e][1]:void 0,O=10==e?.33:0,ma=3==d[e][l]?!!d[e][2]:!1,s={};s.id=E+e;f(s,22);s.text=c;m&&(s.hintText=m);O&&(s.marginLeftPercent=O);s.isGrey=!!ma;c=M(s);b[g](c)}e=R();c=b[l];J(b,10,0,Q());J(b,20,0,P());switch(a){case 0:J(b,21,0,N(!0,!0));J(b,31,0,N(!1,!0));c=U(E+c++,q,G);J(b,32,0,c);break;case 1:m=U(E+c++,I,H);J(b,21,0,m);m=U(E+c++,I,H);J(b,31,0,m);c=U(E+c++,D,F);J(b,32,0,c);break;case 2:m=U(E+c++,q,G),J(b,21,0,m), |
| +m=U(E+c++,q,G),J(b,31,0,m),c=U(E+c++,D,F),J(b,32,0,c)}J(b,35,0,e);b[g](L());for(e=0;e<b[l];e++)c=b[e],v[c.spec.id]=ba+e;return{keyList:b,mapping:v,layout:aa}}function U(d,a,b,v,e){var c={};c.id=d;c.name=a;c.toKeyset=b;c.iconCssClass=v;f(c,21);c.record=!!e;return M(c)};var K=Array.prototype;for(var V,W=[["`","~"],["1","!"],["2","@"],["3","#"],["4","$"],["5","%"],["6","^"],["7","&"],["8","*"],["9","("],["0",")"],["-","_"],["=","+"],["q","Q"],["w","W"],["e","E"],["r","R"],["t","T"],["y","Y"],["u","U"],["i","I"],["o","O"],["p","P"],["[","{"],["]","}"],["\\","|"],["a","A"],["s","S"],["d","D"],["f","F"],["g","G"],["h","H"],["j","J"],["k","K"],["l","L"],[";",":"],["'",'"'],["z","Z"],["x","X"],["c","C"],["v","V"],["b","B"],["n","N"],["m","M"],[",","<"],[".",">"],["/","?"],[p,p]],X=[],Y={}, |
| +na="Backquote Digit1 Digit2 Digit3 Digit4 Digit5 Digit6 Digit7 Digit8 Digit9 Digit0 Minus Equal KeyQ KeyW KeyE KeyR KeyT KeyY KeyU KeyI KeyO KeyP BracketLeft BracketRight Backslash KeyA KeyS KeyD KeyF KeyG KeyH KeyJ KeyK KeyL Semicolon Quote KeyZ KeyX KeyC KeyV KeyB KeyN KeyM Comma Period Slash".split(" "),Z=0;Z<W[l]-1;Z++){var $=M({id:na[Z],type:6,characters:W[Z]});X[g]($)}var oa=R();J(X,13,0,Q());J(X,14,0,M({iconCssClass:"inputview-tab-icon",type:14,id:"Tab"})); |
| +J(X,28,0,M({toState:4,name:"caps",type:5,id:"OsLeft"}));J(X,40,0,P());J(X,41,0,N(!0));X[g](N(!1));X[g](M({toState:8,name:"ctrl",type:5,id:"ControlLeft"}));X[g](M({toState:16,name:"alt",type:5,id:"AltLeft"}));X[g](U("toCompact","",F,"inputview-compact-switcher",!0));X[g](oa);X[g](M({toState:2,name:"altgr",type:5,id:"AltRight"}));X[g](S(2));X[g](S(3));X[g](L());for(Z=0;Z<X[l];Z++)$=X[Z],Y[$.spec.id]="101kbd-k-"+Z;V={keyList:X,mapping:Y,layout:"101kbd",hasAltGrKey:!1,id:"us"};google.ime[h][k][n](V); |
| +V=T([["q","1"],["w","2"],["e","3"],["r","4"],["t","5"],["y","6"],["u","7"],["i","8"],["o","9"],["p","0"],["a"],["s"],["d"],["f"],["g"],["h"],["j"],["k"],["l"],["z"],["x"],["c"],["v"],["b"],["n"],["m"],["!"],["?"],["/"],["-"],[","],["."],[p]],0);V.id=F;google.ime[h][k][n](V);V=T([["1"],["2"],["3"],["4"],["5"],["6"],["7"],["8"],["9"],["0"],["@"],["#"],["$"],["%"],["&"],["-"],["+"],["("],[")"],["\\"],["="],["*"],['"'],["'"],[":"],[";"],["!"],["?"],["/"],["_"],[","],["."],[p]],1);V.id=G;google.ime[h][k][n](V); |
| +V=T([["~"],["`"],["|"],["\u2022"],["\u23b7"],["\u03a0"],["\u00f7"],["\u00d7"],["\u00b6"],["\u0394"],["\u00a3"],["\u00a2"],["\u20ac"],["\u00a5"],["^"],["\u00b0"],["="],["{"],["}"],["\\"],["\u00a9"],["\u00ae"],["\u2122"],["\u2105"],["["],["]"],["\u00a1"],["\u00bf"],["<"],[">"],[","],["."],[p]],2);V.id=H;google.ime[h][k][n](V); })() |
| diff -urN nacl-mozc-1.15.1800.4.orig/inputview.js nacl-mozc-1.15.1800.4/inputview.js |
| --- nacl-mozc-1.15.1800.4.orig/inputview.js 2014-05-09 13:53:08.490488226 +0900 |
| +++ nacl-mozc-1.15.1800.4/inputview.js 2014-05-09 13:27:42.640442490 +0900 |
| @@ -516,7 +516,7 @@ |
| }; |
| goog.string.htmlEscape = function $goog$string$htmlEscape$(str, opt_isLikelyToContainHtmlChars) { |
| if (opt_isLikelyToContainHtmlChars) { |
| - str = str.replace(goog.string.AMP_RE_, "&").replace(goog.string.LT_RE_, "<").replace(goog.string.GT_RE_, ">").replace(goog.string.QUOT_RE_, """).replace(goog.string.SINGLE_QUOTE_RE_, "'"), goog.string.DETECT_DOUBLE_ESCAPING && (str = str.replace(goog.string.E_RE_, "e")); |
| + str = str.replace(goog.string.AMP_RE_, "&").replace(goog.string.LT_RE_, "<").replace(goog.string.GT_RE_, ">").replace(goog.string.QUOT_RE_, """).replace(goog.string.SINGLE_QUOTE_RE_, "'").replace(goog.string.NULL_RE_, "�"), goog.string.DETECT_DOUBLE_ESCAPING && (str = str.replace(goog.string.E_RE_, "e")); |
| } else { |
| if (!goog.string.ALL_RE_.test(str)) { |
| return str; |
| @@ -526,6 +526,7 @@ |
| -1 != str.indexOf(">") && (str = str.replace(goog.string.GT_RE_, ">")); |
| -1 != str.indexOf('"') && (str = str.replace(goog.string.QUOT_RE_, """)); |
| -1 != str.indexOf("'") && (str = str.replace(goog.string.SINGLE_QUOTE_RE_, "'")); |
| + -1 != str.indexOf("\x00") && (str = str.replace(goog.string.NULL_RE_, "�")); |
| goog.string.DETECT_DOUBLE_ESCAPING && -1 != str.indexOf("e") && (str = str.replace(goog.string.E_RE_, "e")); |
| } |
| return str; |
| @@ -535,8 +536,9 @@ |
| goog.string.GT_RE_ = />/g; |
| goog.string.QUOT_RE_ = /"/g; |
| goog.string.SINGLE_QUOTE_RE_ = /'/g; |
| +goog.string.NULL_RE_ = /\x00/g; |
| goog.string.E_RE_ = /e/g; |
| -goog.string.ALL_RE_ = goog.string.DETECT_DOUBLE_ESCAPING ? /[&<>"'e]/ : /[&<>"']/; |
| +goog.string.ALL_RE_ = goog.string.DETECT_DOUBLE_ESCAPING ? /[\x00&<>"'e]/ : /[\x00&<>"']/; |
| goog.string.unescapeEntities = function $goog$string$unescapeEntities$(str) { |
| return goog.string.contains(str, "&") ? "document" in goog.global ? goog.string.unescapeEntitiesUsingDom_(str) : goog.string.unescapePureXmlEntities_(str) : str; |
| }; |
| @@ -4015,7 +4017,7 @@ |
| i18n.input.chrome.inputview.Context.prototype.getQueryText = goog.functions.constant(""); |
| i18n.input.chrome.inputview.Context.EventType = {UPDATE:"u$0", RESET:"r$1", CONTEXT_CHANGE:"cc$2", VISIBILITY_CHANGE:"vc$3"}; |
| i18n.input.chrome.inputview.events = {}; |
| -i18n.input.chrome.inputview.events.EventType = {CONFIG_LOADED:"cl$4", DOUBLE_CLICK:"dc$5", KEY_CLICK:"kc$6", LAYOUT_LOADED:"ll$7", LONG_PRESS:"lp$8", LONG_PRESS_END:"lpe$9", POINTER_DOWN:"pd$10", POINTER_UP:"pu$11", POINTER_OVER:"po$12", POINTER_OUT:"po$13", SWIPE:"s$14"}; |
| +i18n.input.chrome.inputview.events.EventType = {CONFIG_LOADED:"cl$4", DOUBLE_CLICK:"dc$5", KEY_CLICK:"kc$6", LAYOUT_LOADED:"ll$7", LONG_PRESS:"lp$8", LONG_PRESS_END:"lpe$9", POINTER_DOWN:"pd$10", POINTER_UP:"pu$11", POINTER_OVER:"po$12", POINTER_OUT:"po$13", SETTINGS_READY:"sr$14", SWIPE:"s$15"}; |
| i18n.input.chrome.inputview.events.LayoutLoadedEvent = function $i18n$input$chrome$inputview$events$LayoutLoadedEvent$(data) { |
| goog.events.Event.call(this, i18n.input.chrome.inputview.events.EventType.LAYOUT_LOADED); |
| this.data = data; |
| @@ -4048,12 +4050,14 @@ |
| this.isHidden_ = document.webkitHidden; |
| this.context = {contextID:0, type:""}; |
| this.modifierState_ = {}; |
| - if (chrome.virtualKeyboardPrivate && chrome.virtualKeyboardPrivate.getKeyboardConfig) { |
| - var self = this; |
| - chrome.virtualKeyboardPrivate.getKeyboardConfig(function(config) { |
| - self.isA11yMode = !!config.a11ymode; |
| - }); |
| - } |
| + var self = this; |
| + chrome.virtualKeyboardPrivate && chrome.virtualKeyboardPrivate.getKeyboardConfig && chrome.virtualKeyboardPrivate.getKeyboardConfig(function(config) { |
| + self.isA11yMode = !!config.a11ymode; |
| + self.dispatchEvent(new goog.events.Event(i18n.input.chrome.inputview.events.EventType.SETTINGS_READY)); |
| + }); |
| + window.setTimeout(function() { |
| + self.dispatchEvent(new goog.events.Event(i18n.input.chrome.inputview.events.EventType.SETTINGS_READY)); |
| + }, 500); |
| this.registerEventHandler_(isKeyEventhandled); |
| chrome.inputMethodPrivate && chrome.inputMethodPrivate.startIme && chrome.inputMethodPrivate.startIme(); |
| }; |
| @@ -4101,6 +4105,7 @@ |
| }; |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.setCompositionText = function $i18n$input$chrome$inputview$ChromeOsContext$$setCompositionText$(compositionText) { |
| if (0 != this.context.contextID) { |
| + this.maybeSendKickOffEvent_(); |
| this.committedText_ = ""; |
| this.compositionText_ = compositionText; |
| this.settingComposing_ = !0; |
| @@ -4118,9 +4123,14 @@ |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.getCommittedText = function $i18n$input$chrome$inputview$ChromeOsContext$$getCommittedText$() { |
| return this.committedText_; |
| }; |
| +i18n.input.chrome.inputview.ChromeOsContext.prototype.maybeSendKickOffEvent_ = function $i18n$input$chrome$inputview$ChromeOsContext$$maybeSendKickOffEvent_$() { |
| + this.isPasswdBox() || this.sendKeyEvent_([this.generateKeyboardEvent_("keydown", "", "KeyA"), this.generateKeyboardEvent_("keyup", "", "KeyA")]); |
| +}; |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.commitText = function $i18n$input$chrome$inputview$ChromeOsContext$$commitText$(opt_text) { |
| - if (0 != this.context.contextID) { |
| - var textToCommit = opt_text || this.compositionText_, contextID = this.context.contextID; |
| + var textToCommit = opt_text || this.compositionText_; |
| + if (0 != this.context.contextID && textToCommit) { |
| + this.maybeSendKickOffEvent_(); |
| + var contextID = this.context.contextID; |
| if (this.compositionText_ || this.isPasswdBox()) { |
| chrome.input.ime.commitText({contextID:contextID, text:textToCommit}); |
| } else { |
| @@ -4135,20 +4145,21 @@ |
| } |
| }; |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.sendKeyDownAndUpEvent = function $i18n$input$chrome$inputview$ChromeOsContext$$sendKeyDownAndUpEvent$(key, code) { |
| + this.commitText(); |
| this.sendKeyEvent_([this.generateKeyboardEvent_("keydown", key, code), this.generateKeyboardEvent_("keyup", key, code)]); |
| }; |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.sendKeyDownAndUpMessage = function $i18n$input$chrome$inputview$ChromeOsContext$$sendKeyDownAndUpMessage$(key, code, opt_callback) { |
| chrome.runtime.sendMessage(goog.object.create(goog.events.EventType.KEYDOWN, this.generateKeyboardEvent_(goog.events.EventType.KEYDOWN, key, code), goog.events.EventType.KEYUP, this.generateKeyboardEvent_(goog.events.EventType.KEYUP, key, code)), opt_callback); |
| }; |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.sendKeyDownEvent = function $i18n$input$chrome$inputview$ChromeOsContext$$sendKeyDownEvent$(key, code) { |
| + this.commitText(); |
| this.sendKeyEvent_([this.generateKeyboardEvent_("keydown", key, code)]); |
| }; |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.sendKeyUpEvent = function $i18n$input$chrome$inputview$ChromeOsContext$$sendKeyUpEvent$(key, code) { |
| + this.commitText(); |
| this.sendKeyEvent_([this.generateKeyboardEvent_("keyup", key, code)]); |
| }; |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.sendKeyEvent_ = function $i18n$input$chrome$inputview$ChromeOsContext$$sendKeyEvent_$(keyData) { |
| - var StateType = i18n.input.chrome.inputview.StateType; |
| - this.compositionText_ && (this.modifierState_[StateType.CTRL] || this.modifierState_[StateType.ALT]) && chrome.input.ime.commitText({contextID:this.context.contextID, text:this.compositionText_}); |
| chrome.input.ime.sendKeyEvents({contextID:0, keyData:keyData}); |
| }; |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.generateKeyboardEvent_ = function $i18n$input$chrome$inputview$ChromeOsContext$$generateKeyboardEvent_$(type, key, code) { |
| @@ -4177,6 +4188,9 @@ |
| i18n.input.chrome.inputview.ChromeOsContext.prototype.getQueryText = function $i18n$input$chrome$inputview$ChromeOsContext$$getQueryText$() { |
| return this.textBeforeCursor_ + "," + this.compositionText_; |
| }; |
| +i18n.input.chrome.inputview.ChromeOsContext.prototype.setContext = function $i18n$input$chrome$inputview$ChromeOsContext$$setContext$(context) { |
| + this.context = context; |
| +}; |
| goog.Timer = function $goog$Timer$(opt_interval, opt_timerObject) { |
| goog.events.EventTarget.call(this); |
| this.interval_ = opt_interval || 1; |
| @@ -4188,7 +4202,7 @@ |
| goog.Timer.MAX_TIMEOUT_ = 2147483647; |
| goog.Timer.prototype.enabled = !1; |
| goog.Timer.defaultTimerObject = goog.global; |
| -goog.Timer.intervalScale = 0.8; |
| +goog.Timer.intervalScale = .8; |
| goog.Timer.prototype.timer_ = null; |
| goog.Timer.prototype.tick_ = function $goog$Timer$$tick_$() { |
| if (this.enabled) { |
| @@ -5050,7 +5064,7 @@ |
| }; |
| goog.dom.getPixelRatio = goog.functions.cacheReturnValue(function() { |
| var win = goog.dom.getWindow(), isFirefoxMobile = goog.userAgent.GECKO && goog.userAgent.MOBILE; |
| - return goog.isDef(win.devicePixelRatio) && !isFirefoxMobile ? win.devicePixelRatio : win.matchMedia ? goog.dom.matchesPixelRatio_(0.75) || goog.dom.matchesPixelRatio_(1.5) || goog.dom.matchesPixelRatio_(2) || goog.dom.matchesPixelRatio_(3) || 1 : 1; |
| + return goog.isDef(win.devicePixelRatio) && !isFirefoxMobile ? win.devicePixelRatio : win.matchMedia ? goog.dom.matchesPixelRatio_(.75) || goog.dom.matchesPixelRatio_(1.5) || goog.dom.matchesPixelRatio_(2) || goog.dom.matchesPixelRatio_(3) || 1 : 1; |
| }); |
| goog.dom.matchesPixelRatio_ = function $goog$dom$matchesPixelRatio_$(pixelRatio) { |
| var win = goog.dom.getWindow(), query = "(-webkit-min-device-pixel-ratio: " + pixelRatio + "),(min--moz-device-pixel-ratio: " + pixelRatio + "),(min-resolution: " + pixelRatio + "dppx)"; |
| @@ -6172,10 +6186,10 @@ |
| var matches = transform.match(goog.style.MATRIX_TRANSLATION_REGEX_); |
| return matches ? new goog.math.Coordinate(parseFloat(matches[1]), parseFloat(matches[2])) : new goog.math.Coordinate(0, 0); |
| }; |
| -i18n.input.chrome.inputview.Css = {ALTDATA_VIEW:"inputview-altdata-view", ALTDATA_KEY:"inputview-altdata-key", ALTDATA_COVER:"inputview-altdata-cover", ALTGR_CONTENT:"inputview-ac", ARROW_KEY:"inputview-arrow-key", BACKSPACE_ICON:"inputview-backspace-icon", CANDIDATE:"inputview-candidate", CANDIDATE_SEPARATOR:"inputview-candidate-separator", CANDIDATE_VIEW:"inputview-candidate-view", CAPSLOCK_DOT:"inputview-capslock-dot", CAPSLOCK_DOT_HIGHLIGHT:"inputview-capslock-dot-highlight", CHARACTER:"inputview-character", |
| -CHARACTER_HIGHLIGHT:"inputview-ch", COMPACT_KEY:"inputview-compact-key", COMPACT_SWITCHER:"inputview-compact-switcher", DEFAULT_CONTENT:"inputview-dc", DOWN_KEY:"inputview-down-key", ELEMENT_HIGHLIGHT:"inputview-element-highlight", ENTER_ICON:"inputview-enter-icon", HIDE_KEYBOARD_ICON:"inputview-hide-keyboard-icon", HINT_TEXT:"inputview-hint-text", MODIFIER_ON:"inputview-modifier-on", HOLD:"inputview-hold", KEY_HOLD:"inputview-key-hold", LAYOUT_VIEW:"inputview-layoutview", LEFT_KEY:"inputview-left-key", |
| -LINEAR_LAYOUT:"inputview-linear", MODIFIER:"inputview-modifier", MODIFIER_STATE_ICON:"inputview-modifier-state-icon", REGULAR_SWITCHER:"inputview-regular-switcher", RIGHT_KEY:"inputview-right-key", SHIFT_ICON:"inputview-shift-icon", SPECIAL_KEY_HIGHLIGHT:"inputview-special-key-highlight", SPECIAL_KEY_BG:"inputview-special-key-bg", SPECIAL_KEY_NAME:"inputview-special-key-name", SOFT_KEY:"inputview-sk", SOFT_KEY_VIEW:"inputview-skv", TABLE_CELL:"inputview-table-cell", TAB_ICON:"inputview-tab-icon", |
| -TITLE:"inputview-title", TITLE_BAR:"inputview-title-bar", UP_KEY:"inputview-up-key", VERTICAL_LAYOUT:"inputview-vertical", VIEW:"inputview-view"}; |
| +i18n.input.chrome.inputview.Css = {ALTDATA_VIEW:"inputview-altdata-view", ALTDATA_KEY:"inputview-altdata-key", ALTDATA_COVER:"inputview-altdata-cover", ALTGR_CONTENT:"inputview-ac", ARROW_KEY:"inputview-arrow-key", BACKSPACE_ICON:"inputview-backspace-icon", CANDIDATE:"inputview-candidate", CANDIDATE_SEPARATOR:"inputview-candidate-separator", CANDIDATE_VIEW:"inputview-candidate-view", CAPSLOCK_DOT:"inputview-capslock-dot", CAPSLOCK_DOT_HIGHLIGHT:"inputview-capslock-dot-highlight", CANDIDATE_HIGHLIGHT:"inputview-candidate-highlight", |
| +CHARACTER:"inputview-character", CHARACTER_HIGHLIGHT:"inputview-ch", COMPACT_KEY:"inputview-compact-key", COMPACT_SWITCHER:"inputview-compact-switcher", DEFAULT_CONTENT:"inputview-dc", DOWN_KEY:"inputview-down-key", ELEMENT_HIGHLIGHT:"inputview-element-highlight", ENTER_ICON:"inputview-enter-icon", FONT:"inputview-font", HIDE_KEYBOARD_ICON:"inputview-hide-keyboard-icon", HINT_TEXT:"inputview-hint-text", MODIFIER_ON:"inputview-modifier-on", HOLD:"inputview-hold", KEY_HOLD:"inputview-key-hold", LAYOUT_VIEW:"inputview-layoutview", |
| +LEFT_KEY:"inputview-left-key", LINEAR_LAYOUT:"inputview-linear", MODIFIER:"inputview-modifier", MODIFIER_STATE_ICON:"inputview-modifier-state-icon", REGULAR_SWITCHER:"inputview-regular-switcher", RIGHT_KEY:"inputview-right-key", SHIFT_ICON:"inputview-shift-icon", SPECIAL_KEY_HIGHLIGHT:"inputview-special-key-highlight", SPECIAL_KEY_BG:"inputview-special-key-bg", SPECIAL_KEY_NAME:"inputview-special-key-name", SOFT_KEY:"inputview-sk", SOFT_KEY_VIEW:"inputview-skv", TABLE_CELL:"inputview-table-cell", |
| +TAB_ICON:"inputview-tab-icon", TITLE:"inputview-title", TITLE_BAR:"inputview-title-bar", UP_KEY:"inputview-up-key", VERTICAL_LAYOUT:"inputview-vertical", VIEW:"inputview-view"}; |
| goog.ui = {}; |
| goog.ui.IdGenerator = function $goog$ui$IdGenerator$() { |
| }; |
| @@ -6508,14 +6522,9 @@ |
| this.swipeState_.previousY = touchEvent.pageY; |
| 0 < direction && (goog.Timer.clear(this.longPressTimer_), this.dispatchEvent(new i18n.input.chrome.inputview.events.SwipeEvent(this.view_, direction, touchEvent.target, touchEvent.pageX, touchEvent.pageY)), this.isFlickering_ = !this.isLongPressing_ && !!(this.view_.pointerConfig.flickerDirection & direction)); |
| if (!this.isFlickering_) { |
| - var actualTarget = document.elementFromPoint(touchEvent.pageX, touchEvent.pageY); |
| - if (this.currentTarget_ != actualTarget) { |
| - var currentTargetView = this.getView_(this.currentTarget_); |
| - currentTargetView && this.dispatchEvent(new i18n.input.chrome.inputview.events.PointerEvent(currentTargetView, i18n.input.chrome.inputview.events.EventType.POINTER_OUT, this.currentTarget_, touchEvent.pageX, touchEvent.pageY)); |
| - var actualTargetView = this.getView_(actualTarget); |
| - actualTargetView && this.dispatchEvent(new i18n.input.chrome.inputview.events.PointerEvent(actualTargetView, i18n.input.chrome.inputview.events.EventType.POINTER_OVER, actualTarget, touchEvent.pageX, touchEvent.pageY)); |
| - this.currentTarget_ = actualTarget; |
| - } |
| + var actualTarget = document.elementFromPoint(touchEvent.pageX, touchEvent.pageY), currentTargetView = this.getView_(this.currentTarget_), actualTargetView = this.getView_(actualTarget); |
| + currentTargetView != actualTargetView && (currentTargetView && this.dispatchEvent(new i18n.input.chrome.inputview.events.PointerEvent(currentTargetView, i18n.input.chrome.inputview.events.EventType.POINTER_OUT, this.currentTarget_, touchEvent.pageX, touchEvent.pageY)), actualTargetView && this.dispatchEvent(new i18n.input.chrome.inputview.events.PointerEvent(actualTargetView, i18n.input.chrome.inputview.events.EventType.POINTER_OVER, actualTarget, touchEvent.pageX, touchEvent.pageY)), this.currentTarget_ = |
| + actualTarget); |
| } |
| }; |
| i18n.input.chrome.inputview.PointerHandler.prototype.handlePointerUp = function $i18n$input$chrome$inputview$PointerHandler$$handlePointerUp$(e) { |
| @@ -6555,7 +6564,6 @@ |
| }; |
| i18n.input.chrome.inputview.PointerHandler.prototype.triggerLongPress_ = function $i18n$input$chrome$inputview$PointerHandler$$triggerLongPress_$(e) { |
| var nativeEvt = e.getBrowserEvent(); |
| - this.dispatchEvent(new i18n.input.chrome.inputview.events.PointerEvent(this.view_, i18n.input.chrome.inputview.events.EventType.POINTER_OUT, e.target, nativeEvt.pageX, nativeEvt.pageY)); |
| this.dispatchEvent(new i18n.input.chrome.inputview.events.PointerEvent(this.view_, i18n.input.chrome.inputview.events.EventType.LONG_PRESS, e.target, nativeEvt.pageX, nativeEvt.pageY)); |
| this.isLongPressing_ = !0; |
| }; |
| @@ -6573,8 +6581,9 @@ |
| i18n.input.chrome.inputview.AltDataView.prototype.highlightIndex_ = 0; |
| i18n.input.chrome.inputview.AltDataView.prototype.createDom = function $i18n$input$chrome$inputview$AltDataView$$createDom$() { |
| i18n.input.chrome.inputview.AltDataView.superClass_.createDom.call(this); |
| - var dom = this.getDomHelper(); |
| - goog.dom.classes.add(this.getElement(), i18n.input.chrome.inputview.Css.ALTDATA_VIEW); |
| + var dom = this.getDomHelper(), elem = this.getElement(); |
| + goog.dom.classes.add(elem, i18n.input.chrome.inputview.Css.ALTDATA_VIEW); |
| + goog.dom.classes.add(elem, i18n.input.chrome.inputview.Css.FONT); |
| this.coverElement_ = dom.createDom(goog.dom.TagName.DIV, i18n.input.chrome.inputview.Css.ALTDATA_COVER); |
| dom.appendChild(document.body, this.coverElement_); |
| goog.style.setElementShown(this.coverElement_, !1); |
| @@ -6595,7 +6604,6 @@ |
| characters = []; |
| accents && (characters = goog.array.clone(accents)); |
| key.hintText && goog.array.insertAt(characters, key.hintText, 0); |
| - 0 < characters.length && goog.array.insertAt(characters, key.text, 0); |
| } |
| } |
| if (characters && 0 != characters.length) { |
| @@ -6661,15 +6669,17 @@ |
| i18n.input.chrome.inputview.AltDataView.superClass_.disposeInternal.call(this); |
| }; |
| i18n.input.chrome.inputview.ElementType = {CHARACTER:0, FUNCTIONAL_KEY:1, KEYBOARD:2, LAYOUT_VIEW:3, LINEAR_LAYOUT:4, MODIFIER_KEY:5, CHARACTER_KEY:6, SOFT_KEY:7, SOFT_KEY_VIEW:8, VERTICAL_LAYOUT:9, CANDIDATE_VIEW:10, SPACE_KEY:11, ENTER_KEY:12, BACKSPACE_KEY:13, TAB_KEY:14, ARROW_UP:15, ARROW_DOWN:16, ARROW_LEFT:17, ARROW_RIGHT:18, HIDE_KEYBOARD_KEY:19, ALTDATA_VIEW:20, SWITCHER_KEY:21, COMPACT_KEY:22}; |
| -i18n.input.chrome.inputview.CandidateView = function $i18n$input$chrome$inputview$CandidateView$(id, widthInWeight, heightInWeight, opt_eventTarget) { |
| +i18n.input.chrome.inputview.CandidateView = function $i18n$input$chrome$inputview$CandidateView$(id, widthInWeight, heightInWeight, numberRowWeight, opt_eventTarget) { |
| i18n.input.chrome.inputview.Element.call(this, id, i18n.input.chrome.inputview.ElementType.CANDIDATE_VIEW, opt_eventTarget); |
| - this.handler_ = new goog.events.EventHandler(this); |
| this.widthInWeight_ = widthInWeight; |
| this.heightInWeight_ = heightInWeight; |
| + this.numberRowWeight_ = numberRowWeight; |
| }; |
| goog.inherits(i18n.input.chrome.inputview.CandidateView, i18n.input.chrome.inputview.Element); |
| i18n.input.chrome.inputview.CandidateView.PADDING_ = 50; |
| i18n.input.chrome.inputview.CandidateView.prototype.showingCandidates = !1; |
| +i18n.input.chrome.inputview.CandidateView.prototype.showingNumberRow = !1; |
| +i18n.input.chrome.inputview.CandidateView.WIDTH_FOR_THREE_CANDIDATES_ = 235; |
| i18n.input.chrome.inputview.CandidateView.prototype.createDom = function $i18n$input$chrome$inputview$CandidateView$$createDom$() { |
| i18n.input.chrome.inputview.CandidateView.superClass_.createDom.call(this); |
| goog.dom.classes.add(this.getElement(), i18n.input.chrome.inputview.Css.CANDIDATE_VIEW); |
| @@ -6680,18 +6690,46 @@ |
| i18n.input.chrome.inputview.CandidateView.prototype.getHeightInWeight = function $i18n$input$chrome$inputview$CandidateView$$getHeightInWeight$() { |
| return this.heightInWeight_; |
| }; |
| -i18n.input.chrome.inputview.CandidateView.prototype.showCandidates = function $i18n$input$chrome$inputview$CandidateView$$showCandidates$(candidates) { |
| - this.getDomHelper().removeChildren(this.getElement()); |
| - this.handler_.removeAll(); |
| - this.addCandidates_(candidates); |
| - this.showingCandidates = 0 < candidates.length; |
| +i18n.input.chrome.inputview.CandidateView.prototype.hideNumberRow = function $i18n$input$chrome$inputview$CandidateView$$hideNumberRow$() { |
| + this.showingNumberRow && (this.getDomHelper().removeChildren(this.getElement()), this.showingNumberRow = !1); |
| +}; |
| +i18n.input.chrome.inputview.CandidateView.prototype.showNumberRow = function $i18n$input$chrome$inputview$CandidateView$$showNumberRow$() { |
| + if (this.numberRowWeight_) { |
| + var dom = this.getDomHelper(), numberWidth = this.numberRowWeight_ / this.widthInWeight_ / 10 * this.width - 1; |
| + dom.removeChildren(this.getElement()); |
| + for (var i = 0;10 > i;i++) { |
| + this.createSeparator_(); |
| + var numberElem = dom.createDom(goog.dom.TagName.DIV, i18n.input.chrome.inputview.Css.CANDIDATE, String((i + 1) % 10)); |
| + dom.appendChild(this.getElement(), numberElem); |
| + numberElem.style.height = this.height + "px"; |
| + numberElem.style.width = numberWidth + "px"; |
| + } |
| + this.createSeparator_(); |
| + this.getElement().style.paddingLeft = "0"; |
| + this.showingNumberRow = !0; |
| + } |
| +}; |
| +i18n.input.chrome.inputview.CandidateView.prototype.showCandidates = function $i18n$input$chrome$inputview$CandidateView$$showCandidates$(candidates, showThreeCandidates) { |
| + this.clearCandidates(); |
| + 0 < candidates.length && (showThreeCandidates ? this.addThreeCandidates_(candidates) : this.addFullCandidates_(candidates), this.showingCandidates = !0); |
| +}; |
| +i18n.input.chrome.inputview.CandidateView.prototype.addThreeCandidates_ = function $i18n$input$chrome$inputview$CandidateView$$addThreeCandidates_$(candidates) { |
| + for (var width = i18n.input.chrome.inputview.CandidateView.WIDTH_FOR_THREE_CANDIDATES_, num = Math.min(3, candidates.length), dom = this.getDomHelper(), i = 0;i < num;i++) { |
| + this.createSeparator_(); |
| + var candidateElem = dom.createDom(goog.dom.TagName.DIV, i18n.input.chrome.inputview.Css.CANDIDATE, candidates[i]); |
| + candidateElem.style.height = this.height + "px"; |
| + candidateElem.style.width = width + "px"; |
| + 0 == i && goog.dom.classes.add(candidateElem, i18n.input.chrome.inputview.Css.CANDIDATE_HIGHLIGHT); |
| + 1 == i ? dom.insertChildAt(this.getElement(), candidateElem, 0) : dom.appendChild(this.getElement(), candidateElem); |
| + } |
| + this.createSeparator_(); |
| + var padding = (this.width - width * i - i - 1) / 2; |
| + this.getElement().style.paddingLeft = padding + "px"; |
| }; |
| i18n.input.chrome.inputview.CandidateView.prototype.clearCandidates = function $i18n$input$chrome$inputview$CandidateView$$clearCandidates$() { |
| - this.getDomHelper().removeChildren(this.getElement()); |
| - this.handler_.removeAll(); |
| - this.showingCandidates = !1; |
| + this.showingCandidates && (this.getDomHelper().removeChildren(this.getElement()), this.showingCandidates = !1); |
| }; |
| -i18n.input.chrome.inputview.CandidateView.prototype.addCandidates_ = function $i18n$input$chrome$inputview$CandidateView$$addCandidates_$(candidates) { |
| +i18n.input.chrome.inputview.CandidateView.prototype.addFullCandidates_ = function $i18n$input$chrome$inputview$CandidateView$$addFullCandidates_$(candidates) { |
| for (var w = 0, dom = this.getDomHelper(), i = 0;i < candidates.length;i++) { |
| this.createSeparator_(); |
| var candidateElem = dom.createDom(goog.dom.TagName.DIV, i18n.input.chrome.inputview.Css.CANDIDATE, candidates[i]); |
| @@ -6699,16 +6737,17 @@ |
| var size = goog.style.getSize(candidateElem), w = w + (size.width + 2 * i18n.input.chrome.inputview.CandidateView.PADDING_); |
| if (w >= this.width) { |
| this.getElement().removeChild(candidateElem); |
| - break; |
| + return; |
| } |
| candidateElem.style.height = this.height + "px"; |
| candidateElem.style.paddingLeft = i18n.input.chrome.inputview.CandidateView.PADDING_ + "px"; |
| candidateElem.style.paddingRight = i18n.input.chrome.inputview.CandidateView.PADDING_ + "px"; |
| } |
| + this.getElement().style.paddingLeft = "0"; |
| }; |
| i18n.input.chrome.inputview.CandidateView.prototype.createSeparator_ = function $i18n$input$chrome$inputview$CandidateView$$createSeparator_$() { |
| var dom = this.getDomHelper(), tableCell = dom.createDom(goog.dom.TagName.DIV, i18n.input.chrome.inputview.Css.TABLE_CELL), separator = dom.createDom(goog.dom.TagName.DIV, i18n.input.chrome.inputview.Css.CANDIDATE_SEPARATOR); |
| - separator.style.height = Math.floor(0.5 * this.height) + "px"; |
| + separator.style.height = Math.floor(.5 * this.height) + "px"; |
| dom.appendChild(tableCell, separator); |
| dom.appendChild(this.getElement(), tableCell); |
| }; |
| @@ -6718,16 +6757,12 @@ |
| elem.style.width = width + "px"; |
| elem.style.height = height + "px"; |
| }; |
| -i18n.input.chrome.inputview.CandidateView.prototype.disposeInternal = function $i18n$input$chrome$inputview$CandidateView$$disposeInternal$() { |
| - goog.dispose(this.handler_); |
| - i18n.input.chrome.inputview.CandidateView.superClass_.disposeInternal.call(this); |
| -}; |
| i18n.input.chrome.inputview.Character = function $i18n$input$chrome$inputview$Character$(id, model) { |
| i18n.input.chrome.inputview.Element.call(this, id, i18n.input.chrome.inputview.ElementType.CHARACTER); |
| this.characterModel_ = model; |
| }; |
| goog.inherits(i18n.input.chrome.inputview.Character, i18n.input.chrome.inputview.Element); |
| -i18n.input.chrome.inputview.Character.PADDING_ = 5.5; |
| +i18n.input.chrome.inputview.Character.PADDING_ = 3; |
| i18n.input.chrome.inputview.Character.prototype.createDom = function $i18n$input$chrome$inputview$Character$$createDom$() { |
| i18n.input.chrome.inputview.Character.superClass_.createDom.call(this); |
| var elem = this.getElement(), dom = this.getDomHelper(); |
| @@ -6818,8 +6853,8 @@ |
| }; |
| i18n.input.chrome.inputview.util = {}; |
| i18n.input.chrome.inputview.util.DISPLAY_MAPPING = {"\u0300":"`", "\u0301":"\u00b4", "\u0302":"\u02c6", "\u0303":"\u02dc", "\u0304":"\u02c9", "\u0305":"\u00af", "\u0306":"\u02d8", "\u0307":"\u02d9", "\u0308":"\u00a8", "\u0309":"\u02c0", "\u030a":"\u02da", "\u030b":"\u02dd", "\u030c":"\u02c7", "\u030d":"\u02c8", "\u030e":'"', "\u0327":"\u00b8", "\u0328":"\u02db", "\u0345":"\u037a", "\u030f":"\u030f ", "\u031b":"\u031b ", "\u0323":"\u0323 "}; |
| -i18n.input.chrome.inputview.util.ACCENT_MAP = {A:"A\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u0100".split(""), C:["C", "\u00c7"], E:"E\u00c8\u00c9\u00ca\u00cb\u0112".split(""), I:"I\u00cc\u00cd\u00ce\u00cf\u012a".split(""), N:["N", "\u00d1"], O:"\u00d2\u00d3\u00d4\u00d5\u00d6\u014c\u0152O".split(""), S:["S", "\u1e9e"], U:"U\u00d9\u00da\u00db\u00dc\u016a".split(""), a:"a\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u0101".split(""), c:["c", "\u00e7"], e:"e\u00e8\u00e9\u00ea\u00eb\u0113".split(""), i:"i\u00ec\u00ed\u00ee\u00ef\u012b".split(""), |
| -n:["n", "\u00f1"], o:"\u00f2\u00f3\u00f4\u00f5\u00f6\u00f8\u0153o".split(""), s:["s", "\u00df"], u:"u\u00f9\u00fa\u00fb\u00fc\u016b".split("")}; |
| +i18n.input.chrome.inputview.util.ACCENT_MAP = {A:"\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u0100".split(""), C:["\u00c7"], E:["\u00c8", "\u00c9", "\u00ca", "\u00cb", "\u0112"], I:["\u00cc", "\u00cd", "\u00ce", "\u00cf", "\u012a"], N:["\u00d1"], O:"\u00d2\u00d3\u00d4\u00d5\u00d6\u014c\u0152".split(""), S:["\u1e9e"], U:["\u00d9", "\u00da", "\u00db", "\u00dc", "\u016a"], a:"\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u0101".split(""), c:["\u00e7"], e:["\u00e8", "\u00e9", "\u00ea", "\u00eb", "\u0113"], |
| +i:["\u00ec", "\u00ed", "\u00ee", "\u00ef", "\u012b"], n:["\u00f1"], o:"\u00f2\u00f3\u00f4\u00f5\u00f6\u00f8\u0153".split(""), s:["\u00df"], u:["\u00f9", "\u00fa", "\u00fb", "\u00fc", "\u016b"]}; |
| i18n.input.chrome.inputview.util.REGEX_CHARACTER_SUPPORT_DEADKEY_ = /^[a-zA-Z\u00e6\u00c6\u0153\u0152]+$/; |
| i18n.input.chrome.inputview.util.REGEX_LANGUAGE_MODEL_CHARACTERS = /^[a-zA-Z\u00e6\u00c6\u0153\u0152\'-]$/; |
| i18n.input.chrome.inputview.util.splitValue = function $i18n$input$chrome$inputview$util$splitValue$(weightArray, totalValue) { |
| @@ -8880,9 +8915,10 @@ |
| }; |
| i18n.input.chrome.inputview.DataSource.prototype.sendAutoComplete = goog.functions.NULL; |
| i18n.input.chrome.inputview.DataSource.prototype.sendAutoPrediction = goog.functions.NULL; |
| -i18n.input.chrome.inputview.DataSource.EventType = {AUTO_COMPLETE:"ac$15", AUTO_PREDICTION:"ap$16"}; |
| -i18n.input.chrome.inputview.DataSource.AutoCompleteEvent = function $i18n$input$chrome$inputview$DataSource$AutoCompleteEvent$(candidates, matchedLengths) { |
| +i18n.input.chrome.inputview.DataSource.EventType = {AUTO_COMPLETE:"ac$16", AUTO_PREDICTION:"ap$17"}; |
| +i18n.input.chrome.inputview.DataSource.AutoCompleteEvent = function $i18n$input$chrome$inputview$DataSource$AutoCompleteEvent$(source, candidates, matchedLengths) { |
| goog.events.Event.call(this, i18n.input.chrome.inputview.DataSource.EventType.AUTO_COMPLETE); |
| + this.source = source; |
| this.candidates = candidates; |
| this.matchedLengths = matchedLengths; |
| }; |
| @@ -9052,7 +9088,7 @@ |
| this.toState = toState; |
| this.stateManager_ = stateManager; |
| if (this.supportSticky = supportSticky) { |
| - this.pointerConfig.dblClick = !0; |
| + this.pointerConfig.dblClick = !0, this.pointerConfig.longPressWithoutPointerUp = !0; |
| } |
| }; |
| goog.inherits(i18n.input.chrome.inputview.ModifierKey, i18n.input.chrome.inputview.FunctionalKey); |
| @@ -9122,8 +9158,8 @@ |
| i18n.input.chrome.inputview.SpaceKey.prototype.setTitleVisible = function $i18n$input$chrome$inputview$SpaceKey$$setTitleVisible$(visible) { |
| goog.dom.setTextContent(this.textElem, visible ? this.text : ""); |
| }; |
| -i18n.input.chrome.inputview.SpecNodeName = {ALIGN:"align", CHARACTERS:"characters", CHILDREN:"children", CONDITION:"condition", DIRECTION:"direction", FULL_HEIGHT_IN_WEIGHT:"fullHeightInWeight", GIVE_WEIGHT_TO:"giveWeightTo", HAS_ALTGR_KEY:"hasAltGrKey", HEIGHT:"height", HEIGHT_IN_WEIGHT:"heightInWeight", HEIGHT_PERCENT:"heightPercent", HINT_TEXT:"hintText", ICON_CSS_CLASS:"iconCssClass", ID:"id", LAYOUT:"layout", LAYOUT_ID:"layoutID", HEIGHT_PERCENT_OF_WIDTH:"heightPercentOfWidth", MARGIN_LEFT_PERCENT:"marginLeftPercent", |
| -MINIMUM_HEIGHT:"minimumHeight", KEY_LIST:"keyList", MAPPING:"mapping", NAME:"name", PADDING:"padding", RECORD:"record", SUPPORT_STICKY:"supportSticky", SPEC:"spec", TEXT:"text", TITLE:"title", TYPE:"type", TO_STATE:"toState", TO_KEYSET:"toKeyset", WIDTH:"width", WIDTH_IN_WEIGHT:"widthInWeight", WIDTH_PERCENT:"widthPercent"}; |
| +i18n.input.chrome.inputview.SpecNodeName = {ALIGN:"align", CHARACTERS:"characters", CHILDREN:"children", CONDITION:"condition", DIRECTION:"direction", FULL_HEIGHT_IN_WEIGHT:"fullHeightInWeight", GIVE_WEIGHT_TO:"giveWeightTo", HAS_ALTGR_KEY:"hasAltGrKey", HEIGHT:"height", HEIGHT_IN_WEIGHT:"heightInWeight", HEIGHT_PERCENT:"heightPercent", HINT_TEXT:"hintText", ICON_CSS_CLASS:"iconCssClass", ID:"id", IS_GREY:"isGrey", LAYOUT:"layout", LAYOUT_ID:"layoutID", HEIGHT_PERCENT_OF_WIDTH:"heightPercentOfWidth", |
| +MARGIN_LEFT_PERCENT:"marginLeftPercent", MINIMUM_HEIGHT:"minimumHeight", NUMBER_ROW_WEIGHT:"numberRowWeight", KEY_LIST:"keyList", MAPPING:"mapping", NAME:"name", PADDING:"padding", RECORD:"record", SUPPORT_STICKY:"supportSticky", SPEC:"spec", TEXT:"text", TITLE:"title", TYPE:"type", TO_STATE:"toState", TO_KEYSET:"toKeyset", WIDTH:"width", WIDTH_IN_WEIGHT:"widthInWeight", WIDTH_PERCENT:"widthPercent"}; |
| i18n.input.chrome.inputview.StateManager = function $i18n$input$chrome$inputview$StateManager$() { |
| this.chording_ = this.stateKeyDown_ = this.sticky_ = this.state_ = 0; |
| }; |
| @@ -9273,7 +9309,7 @@ |
| spec.toState = i18n.input.chrome.inputview.StateType.CTRL; |
| spec.name = "ctrl"; |
| spec.type = i18n.input.chrome.inputview.ElementType.MODIFIER_KEY; |
| - spec.id = "Ctrl"; |
| + spec.id = "ControlLeft"; |
| return i18n.input.chrome.inputview.content.util.createKey(spec); |
| }; |
| i18n.input.chrome.inputview.content.util.createAltKey = function $i18n$input$chrome$inputview$content$util$createAltKey$() { |
| @@ -9281,13 +9317,13 @@ |
| spec.toState = i18n.input.chrome.inputview.StateType.ALT; |
| spec.name = "alt"; |
| spec.type = i18n.input.chrome.inputview.ElementType.MODIFIER_KEY; |
| - spec.id = "Alt"; |
| + spec.id = "AltLeft"; |
| return i18n.input.chrome.inputview.content.util.createKey(spec); |
| }; |
| i18n.input.chrome.inputview.content.util.createAltgrKey = function $i18n$input$chrome$inputview$content$util$createAltgrKey$() { |
| var spec = {}; |
| spec.toState = i18n.input.chrome.inputview.StateType.ALTGR; |
| - spec.name = "alt gr"; |
| + spec.name = "altgr"; |
| spec.type = i18n.input.chrome.inputview.ElementType.MODIFIER_KEY; |
| spec.id = "AltRight"; |
| return i18n.input.chrome.inputview.content.util.createKey(spec); |
| @@ -9362,7 +9398,7 @@ |
| }; |
| i18n.input.chrome.inputview.content.util.createCompactData = function $i18n$input$chrome$inputview$content$util$createCompactData$(keyCharacters, viewIdPrefix, keyIdPrefix, compactKeysetType) { |
| for (var keyList = [], mapping = {}, i = 0;i < keyCharacters.length - 1;i++) { |
| - var hintText = 2 == keyCharacters[i].length ? keyCharacters[i][1] : void 0, marginLeftPercent = 10 == i ? 0.43 : 0, key = i18n.input.chrome.inputview.content.util.createCompactKey(keyIdPrefix + i, keyCharacters[i][0], hintText, marginLeftPercent); |
| + var hintText = 2 == keyCharacters[i].length ? keyCharacters[i][1] : void 0, marginLeftPercent = 10 == i ? .33 : 0, isGrey = 3 == keyCharacters[i].length ? !!keyCharacters[i][2] : !1, key = i18n.input.chrome.inputview.content.util.createCompactKey(keyIdPrefix + i, keyCharacters[i][0], hintText, marginLeftPercent, isGrey); |
| keyList.push(key); |
| } |
| var spaceKey = i18n.input.chrome.inputview.content.util.createSpaceKey(); |
| @@ -9372,13 +9408,14 @@ |
| } |
| return{keyList:keyList, mapping:mapping, layout:"compactkbd"}; |
| }; |
| -i18n.input.chrome.inputview.content.util.createCompactKey = function $i18n$input$chrome$inputview$content$util$createCompactKey$(id, text, opt_hintText, opt_marginLeftPercent) { |
| +i18n.input.chrome.inputview.content.util.createCompactKey = function $i18n$input$chrome$inputview$content$util$createCompactKey$(id, text, opt_hintText, opt_marginLeftPercent, opt_isGrey) { |
| var spec = {}; |
| spec.id = id; |
| spec.type = i18n.input.chrome.inputview.ElementType.COMPACT_KEY; |
| spec.text = text; |
| opt_hintText && (spec.hintText = opt_hintText); |
| opt_marginLeftPercent && (spec.marginLeftPercent = opt_marginLeftPercent); |
| + spec.isGrey = !!opt_isGrey; |
| return i18n.input.chrome.inputview.content.util.createKey(spec); |
| }; |
| i18n.input.chrome.inputview.content.util.createSwitcherKey = function $i18n$input$chrome$inputview$content$util$createSwitcherKey$(id, name, toKeyset, opt_iconCssClass, opt_record) { |
| @@ -9416,7 +9453,6 @@ |
| goog.array.insertAt(keyList, i18n.input.chrome.inputview.content.util.createShiftKey(!0, !0), 21); |
| goog.array.insertAt(keyList, i18n.input.chrome.inputview.content.util.createShiftKey(!1, !0), 31); |
| goog.array.insertAt(keyList, i18n.input.chrome.inputview.content.util.createSwitcherKey(keyIdPrefix + id++, "?123", "us.compact.123"), 32); |
| - goog.array.insertAt(keyList, i18n.input.chrome.inputview.content.util.createSwitcherKey(keyIdPrefix + id++, "", "us", i18n.input.chrome.inputview.Css.REGULAR_SWITCHER, !0), 34); |
| break; |
| case i18n.input.chrome.inputview.content.util.CompactKeysetType.NUMBER: |
| goog.array.insertAt(keyList, i18n.input.chrome.inputview.content.util.createSwitcherKey(keyIdPrefix + id++, "~[<", "us.compact.more"), 21); |
| @@ -9712,8 +9748,10 @@ |
| }; |
| i18n.input.chrome.inputview.OfflineDataSource = function $i18n$input$chrome$inputview$OfflineDataSource$(numOfCandidate) { |
| i18n.input.chrome.inputview.DataSource.call(this, numOfCandidate); |
| + this.naclModule = null; |
| }; |
| goog.inherits(i18n.input.chrome.inputview.OfflineDataSource, i18n.input.chrome.inputview.DataSource); |
| +i18n.input.chrome.inputview.OfflineDataSource.prototype.spatialCache_ = {}; |
| i18n.input.chrome.inputview.OfflineDataSource.prototype.isReady_ = !1; |
| i18n.input.chrome.inputview.OfflineDataSource.prototype.setLanguage = function $i18n$input$chrome$inputview$OfflineDataSource$$setLanguage$(language) { |
| i18n.input.chrome.inputview.OfflineDataSource.superClass_.setLanguage.call(this, language); |
| @@ -9729,6 +9767,11 @@ |
| document.body.appendChild(this.naclModule); |
| this.naclModule.addEventListener("message", goog.bind(this.onResponse_, this), !0); |
| this.naclModule.addEventListener("load", goog.bind(this.onNaclLoaded_, this), !0); |
| + this.naclModule.addEventListener("crash", goog.bind(this.onNaclCrash_, this), !0); |
| +}; |
| +i18n.input.chrome.inputview.OfflineDataSource.prototype.onNaclCrash_ = function $i18n$input$chrome$inputview$OfflineDataSource$$onNaclCrash_$() { |
| + this.naclModule && this.naclModule.parentNode && (this.naclModule.parentNode.removeChild(this.naclModule), this.naclModule = null, this.isReady_ = !1); |
| + goog.Timer.callOnce(this.installNacl, 1E3, this); |
| }; |
| i18n.input.chrome.inputview.OfflineDataSource.prototype.isReady = function $i18n$input$chrome$inputview$OfflineDataSource$$isReady$() { |
| return this.isReady_; |
| @@ -9737,15 +9780,22 @@ |
| this.isReady_ = !0; |
| }; |
| i18n.input.chrome.inputview.OfflineDataSource.prototype.sendAutoComplete = function $i18n$input$chrome$inputview$OfflineDataSource$$sendAutoComplete$(query, opt_charactersForSpatial) { |
| - var payload = this.createCommonPayload(); |
| - payload.text = query; |
| + var payload = this.createCommonPayload(), source = query.replace(/^.+,/, ""); |
| + payload.text = query.slice(0, query.length - source.length); |
| + payload.source = source; |
| + payload.multi_text = []; |
| if (opt_charactersForSpatial) { |
| var segment = {}; |
| - segment.source = opt_charactersForSpatial; |
| + segment.source = opt_charactersForSpatial.map(function(value) { |
| + return value.toLowerCase(); |
| + }); |
| segment.score = opt_charactersForSpatial.map(function(value, i) { |
| - return 0 == i ? 0.9 : 0.1; |
| + return 0 == i ? 9 : 1; |
| }); |
| - payload.multi_text = [segment]; |
| + this.spatialCache_[source[source.length - 1]] = segment; |
| + } |
| + for (var i$$0 = 0;i$$0 < source.length;i$$0++) { |
| + payload.multi_text.push(this.spatialCache_[source[i$$0]]); |
| } |
| this.isReady() && this.naclModule.postMessage(JSON.stringify(payload)); |
| }; |
| @@ -9762,7 +9812,7 @@ |
| return candidate.replace(/ $/, ""); |
| }); |
| candidates = goog.array.splice(candidates, 0, this.numOfCandidate); |
| - source ? this.dispatchEvent(new i18n.input.chrome.inputview.DataSource.AutoCompleteEvent(candidates, matchedLengths)) : this.dispatchEvent(new i18n.input.chrome.inputview.DataSource.AutoPredictionEvent(candidates)); |
| + source ? this.dispatchEvent(new i18n.input.chrome.inputview.DataSource.AutoCompleteEvent(source, candidates, matchedLengths)) : this.dispatchEvent(new i18n.input.chrome.inputview.DataSource.AutoPredictionEvent(candidates)); |
| } |
| }; |
| i18n.input.chrome.inputview.PointerController = function $i18n$input$chrome$inputview$PointerController$() { |
| @@ -9908,7 +9958,7 @@ |
| }; |
| goog.i18n.bidi.wordSeparatorRe_ = /\s+/; |
| goog.i18n.bidi.hasNumeralsRe_ = /\d/; |
| -goog.i18n.bidi.rtlDetectionThreshold_ = 0.4; |
| +goog.i18n.bidi.rtlDetectionThreshold_ = .4; |
| goog.i18n.bidi.estimateDirection = function $goog$i18n$bidi$estimateDirection$(str, opt_isHtml) { |
| for (var rtlCount = 0, totalCount = 0, hasWeaklyLtr = !1, tokens = goog.i18n.bidi.stripHtmlIfNeeded_(str, opt_isHtml).split(goog.i18n.bidi.wordSeparatorRe_), i = 0;i < tokens.length;i++) { |
| var token = tokens[i]; |
| @@ -9920,7 +9970,7 @@ |
| return goog.i18n.bidi.estimateDirection(str, opt_isHtml) == goog.i18n.bidi.Dir.RTL; |
| }; |
| goog.i18n.bidi.setElementDirAndAlign = function $goog$i18n$bidi$setElementDirAndAlign$(element, dir) { |
| - element && (dir = goog.i18n.bidi.toDir(dir)) && (element.style.textAlign = dir == goog.i18n.bidi.Dir.RTL ? "right" : "left", element.dir = dir == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr"); |
| + element && (dir = goog.i18n.bidi.toDir(dir)) && (element.style.textAlign = dir == goog.i18n.bidi.Dir.RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT, element.dir = dir == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr"); |
| }; |
| goog.i18n.bidi.DirectionalString = function $goog$i18n$bidi$DirectionalString$() { |
| }; |
| @@ -11156,11 +11206,12 @@ |
| goog.ui.Container.prototype.setMouseButtonPressed = function $goog$ui$Container$$setMouseButtonPressed$(pressed) { |
| this.mouseButtonPressed_ = pressed; |
| }; |
| -i18n.input.chrome.inputview.CompactKey = function $i18n$input$chrome$inputview$CompactKey$(id, text, hintText, stateManager, opt_marginLeftPercent, opt_eventTarget) { |
| +i18n.input.chrome.inputview.CompactKey = function $i18n$input$chrome$inputview$CompactKey$(id, text, hintText, stateManager, opt_marginLeftPercent, opt_isGrey, opt_eventTarget) { |
| i18n.input.chrome.inputview.FunctionalKey.call(this, id, i18n.input.chrome.inputview.ElementType.COMPACT_KEY, text, "", opt_eventTarget); |
| this.hintText = hintText; |
| this.marginLeftPercent_ = opt_marginLeftPercent || 0; |
| this.stateManager_ = stateManager; |
| + this.isGrey_ = !!opt_isGrey; |
| this.pointerConfig.longPressWithPointerUp = !0; |
| this.pointerConfig.flickerDirection = i18n.input.chrome.inputview.SwipeDirection.UP; |
| }; |
| @@ -11169,7 +11220,7 @@ |
| i18n.input.chrome.inputview.CompactKey.prototype.createDom = function $i18n$input$chrome$inputview$CompactKey$$createDom$() { |
| i18n.input.chrome.inputview.CompactKey.superClass_.createDom.call(this); |
| goog.dom.classes.add(this.tableCell, i18n.input.chrome.inputview.Css.COMPACT_KEY); |
| - goog.dom.classes.remove(this.bgElem, i18n.input.chrome.inputview.Css.SPECIAL_KEY_BG); |
| + this.isGrey_ || goog.dom.classes.remove(this.bgElem, i18n.input.chrome.inputview.Css.SPECIAL_KEY_BG); |
| if (this.hintText) { |
| var dom = this.getDomHelper(), hintTextElem = dom.createDom(goog.dom.TagName.DIV, i18n.input.chrome.inputview.Css.HINT_TEXT, this.hintText); |
| dom.appendChild(this.tableCell, hintTextElem); |
| @@ -11195,10 +11246,11 @@ |
| goog.ui.Container.call(this); |
| this.keyData_ = keyData; |
| this.layoutData_ = layoutData; |
| + this.keyboardCode_ = keyboardCode; |
| this.languageCode_ = languageCode; |
| this.dataModel_ = model; |
| this.altDataView_ = new i18n.input.chrome.inputview.AltDataView(this); |
| - this.horizontalPaddingPercent_ = 0.06; |
| + this.horizontalPaddingPercent_ = .06; |
| this.rows_ = []; |
| this.softKeyViewMap_ = {}; |
| this.softKeyConditionMap_ = {}; |
| @@ -11214,7 +11266,9 @@ |
| i18n.input.chrome.inputview.View.prototype.createDom = function $i18n$input$chrome$inputview$View$$createDom$() { |
| i18n.input.chrome.inputview.View.superClass_.createDom.call(this); |
| var elem = this.getElement(); |
| + elem.id = this.keyboardCode_.replace(".", "-"); |
| goog.dom.classes.add(elem, i18n.input.chrome.inputview.Css.VIEW); |
| + goog.dom.classes.add(elem, i18n.input.chrome.inputview.Css.FONT); |
| elem.setAttribute("lang", this.languageCode_); |
| for (var children = this.layoutData_.children, i = 0;i < children.length;i++) { |
| var child = children[i], layoutElem = this.createLayoutElement_(child[i18n.input.chrome.inputview.SpecNodeName.SPEC], this); |
| @@ -11268,8 +11322,14 @@ |
| i18n.input.chrome.inputview.View.prototype.getAltDataView = function $i18n$input$chrome$inputview$View$$getAltDataView$() { |
| return this.altDataView_; |
| }; |
| -i18n.input.chrome.inputview.View.prototype.showCandidates = function $i18n$input$chrome$inputview$View$$showCandidates$(candidates) { |
| - this.candidateView_ && this.candidateView_.showCandidates(candidates); |
| +i18n.input.chrome.inputview.View.prototype.showCandidates = function $i18n$input$chrome$inputview$View$$showCandidates$(candidates, showThreeCandidates) { |
| + this.candidateView_ && this.candidateView_.showCandidates(candidates, showThreeCandidates); |
| +}; |
| +i18n.input.chrome.inputview.View.prototype.showNumberRow = function $i18n$input$chrome$inputview$View$$showNumberRow$() { |
| + this.candidateView_ && this.candidateView_.showNumberRow(); |
| +}; |
| +i18n.input.chrome.inputview.View.prototype.hideNumberRow = function $i18n$input$chrome$inputview$View$$hideNumberRow$() { |
| + this.candidateView_ && this.candidateView_.hideNumberRow(); |
| }; |
| i18n.input.chrome.inputview.View.prototype.clearCandidates = function $i18n$input$chrome$inputview$View$$clearCandidates$() { |
| this.candidateView_ && this.candidateView_.clearCandidates(); |
| @@ -11297,7 +11357,8 @@ |
| case i18n.input.chrome.inputview.ElementType.LAYOUT_VIEW: |
| return this.keyboardView_ = new i18n.input.chrome.inputview.KeyboardView(id, opt_eventTarget); |
| case i18n.input.chrome.inputview.ElementType.CANDIDATE_VIEW: |
| - return this.candidateView_ = new i18n.input.chrome.inputview.CandidateView(id, widthInWeight, heightInWeight, opt_eventTarget); |
| + var numberRowWeight = spec[i18n.input.chrome.inputview.SpecNodeName.NUMBER_ROW_WEIGHT]; |
| + return this.candidateView_ = new i18n.input.chrome.inputview.CandidateView(id, widthInWeight, heightInWeight, numberRowWeight, opt_eventTarget); |
| } |
| return null; |
| }; |
| @@ -11354,8 +11415,8 @@ |
| var record = spec[i18n.input.chrome.inputview.SpecNodeName.RECORD]; |
| return new i18n.input.chrome.inputview.SwitcherKey(id, type, name, iconCssClass, toKeyset, record); |
| case i18n.input.chrome.inputview.ElementType.COMPACT_KEY: |
| - var marginLeftPercent = spec[i18n.input.chrome.inputview.SpecNodeName.MARGIN_LEFT_PERCENT]; |
| - return new i18n.input.chrome.inputview.CompactKey(id, text, hintText, this.dataModel_.stateManager, marginLeftPercent); |
| + var marginLeftPercent = spec[i18n.input.chrome.inputview.SpecNodeName.MARGIN_LEFT_PERCENT], isGrey = spec[i18n.input.chrome.inputview.SpecNodeName.IS_GREY]; |
| + return new i18n.input.chrome.inputview.CompactKey(id, text, hintText, this.dataModel_.stateManager, marginLeftPercent, isGrey); |
| case i18n.input.chrome.inputview.ElementType.CHARACTER_KEY: |
| var isLetterKey = i18n.input.chrome.inputview.util.isLetterKey(characters); |
| return new i18n.input.chrome.inputview.CharacterKey(id, characters, isLetterKey, hasAltGrCharacterInTheKeyset[isLetterKey], this.dataModel_.settings.alwaysRenderAltGrCharacter, this.dataModel_.stateManager); |
| @@ -11391,6 +11452,9 @@ |
| }; |
| goog.inherits(i18n.input.chrome.inputview.Controller, goog.Disposable); |
| i18n.input.chrome.inputview.Controller.NACL_LANGUAGES_ = "de en es fr it nl pt".split(" "); |
| +i18n.input.chrome.inputview.Controller.prototype.isSettingReady = !1; |
| +i18n.input.chrome.inputview.Controller.prototype.sendBackspaceDown_ = !1; |
| +i18n.input.chrome.inputview.Controller.prototype.sendEnterDown_ = !1; |
| i18n.input.chrome.inputview.Controller.prototype.dataSource_ = null; |
| i18n.input.chrome.inputview.Controller.prototype.deadKey_ = ""; |
| i18n.input.chrome.inputview.Controller.prototype.isFakeEventUsed_ = !1; |
| @@ -11398,14 +11462,44 @@ |
| i18n.input.chrome.inputview.Controller.prototype.registerEventHandler_ = function $i18n$input$chrome$inputview$Controller$$registerEventHandler_$() { |
| this.handler_.listen(this.model_, i18n.input.chrome.inputview.events.EventType.LAYOUT_LOADED, this.onLayoutLoaded_).listen(this.model_, i18n.input.chrome.inputview.events.EventType.CONFIG_LOADED, this.onConfigLoaded_).listen(this.m17nModel_, i18n.input.chrome.inputview.events.EventType.CONFIG_LOADED, this.onConfigLoaded_).listen(this.context_, i18n.input.chrome.inputview.Context.EventType.VISIBILITY_CHANGE, this.onVisibilityChange_).listen(this.pointerController_, [i18n.input.chrome.inputview.events.EventType.LONG_PRESS, |
| i18n.input.chrome.inputview.events.EventType.DOUBLE_CLICK, i18n.input.chrome.inputview.events.EventType.POINTER_UP, i18n.input.chrome.inputview.events.EventType.POINTER_DOWN, i18n.input.chrome.inputview.events.EventType.POINTER_OVER, i18n.input.chrome.inputview.events.EventType.POINTER_OUT, i18n.input.chrome.inputview.events.EventType.SWIPE], this.onPointerEvent_).listen(window, goog.events.EventType.RESIZE, this.resize).listen(this.context_, i18n.input.chrome.inputview.Context.EventType.CONTEXT_CHANGE, |
| - this.onContextChange_).listen(this.context_, i18n.input.chrome.inputview.Context.EventType.RESET, this.onContextReset_).listen(this.context_, i18n.input.chrome.inputview.Context.EventType.UPDATE, this.onContextUpdate_); |
| + this.onContextChange_).listen(this.context_, i18n.input.chrome.inputview.Context.EventType.RESET, this.onContextReset_).listen(this.context_, i18n.input.chrome.inputview.Context.EventType.UPDATE, this.onContextUpdate_).listen(this.context_, i18n.input.chrome.inputview.events.EventType.SETTINGS_READY, this.onSettingsReady_); |
| this.isFakeEventUsed_ || this.isMessageUsed_ || this.handler_.listen(this.context_, i18n.input.chrome.inputview.events.EventType.KEY_CLICK, this.handlePhysicalKeyboardEvent_); |
| }; |
| +i18n.input.chrome.inputview.Controller.prototype.onSettingsReady_ = function $i18n$input$chrome$inputview$Controller$$onSettingsReady_$() { |
| + if (!this.isSettingReady) { |
| + this.isSettingReady = !0; |
| + if ("us" == this.keyboardKeyset_ && "en-US" == this.languageCode_) { |
| + if (this.context_.isA11yMode) { |
| + this.passwordKeyset_ = this.currentKeyset_ = this.keyboardKeyset_ = "us"; |
| + } else { |
| + var preferredKeyset = this.model_.settings.getPreference(i18n.input.chrome.inputview.Settings.Preference.KEY_SET); |
| + this.passwordKeyset_ = this.currentKeyset_ = this.keyboardKeyset_ = preferredKeyset || "us.compact"; |
| + } |
| + } |
| + this.switchToKeyboard(this.currentKeyset_); |
| + } |
| +}; |
| +i18n.input.chrome.inputview.Controller.prototype.getCharactersForSpatial_ = function $i18n$input$chrome$inputview$Controller$$getCharactersForSpatial_$(key) { |
| + var characters = []; |
| + characters.push(this.getKeyContent_(key)); |
| + for (var i = 0;i < key.nearbyKeys.length;i++) { |
| + var content = this.getKeyContent_(key.nearbyKeys[i]); |
| + content && i18n.input.chrome.inputview.util.REGEX_LANGUAGE_MODEL_CHARACTERS.test(content) && characters.push(content); |
| + } |
| + return characters; |
| +}; |
| +i18n.input.chrome.inputview.Controller.prototype.getKeyContent_ = function $i18n$input$chrome$inputview$Controller$$getKeyContent_$(key) { |
| + return key.type == i18n.input.chrome.inputview.ElementType.CHARACTER_KEY ? key.getActiveCharacter() : key.type == i18n.input.chrome.inputview.ElementType.COMPACT_KEY ? key.text : ""; |
| +}; |
| i18n.input.chrome.inputview.Controller.prototype.initializeDataSource_ = function $i18n$input$chrome$inputview$Controller$$initializeDataSource_$(language) { |
| this.dataSource_ = new i18n.input.chrome.inputview.OfflineDataSource(20); |
| this.dataSource_.setLanguage(language); |
| this.handler_.listen(this.dataSource_, i18n.input.chrome.inputview.DataSource.EventType.AUTO_COMPLETE, this.onAutoComplete_).listen(this.dataSource_, i18n.input.chrome.inputview.DataSource.EventType.AUTO_PREDICTION, this.onAutoPrediction_); |
| }; |
| +i18n.input.chrome.inputview.Controller.prototype.shouldSendKeyEvent_ = function $i18n$input$chrome$inputview$Controller$$shouldSendKeyEvent_$() { |
| + var ctrlKey = this.model_.stateManager.hasState(i18n.input.chrome.inputview.StateType.CTRL), altKey = this.model_.stateManager.hasState(i18n.input.chrome.inputview.StateType.ALT); |
| + return this.isFakeEventUsed_ || ctrlKey || altKey; |
| +}; |
| i18n.input.chrome.inputview.Controller.prototype.onPointerEvent_ = function $i18n$input$chrome$inputview$Controller$$onPointerEvent_$(e) { |
| this.getCurrentView_() && e.view && e.view && this.handlePointerAction_(e.view, e); |
| }; |
| @@ -11425,9 +11519,9 @@ |
| e.type == i18n.input.chrome.inputview.events.EventType.SWIPE && this.handleSwipeAction_(view, e); |
| switch(view.type) { |
| case i18n.input.chrome.inputview.ElementType.CANDIDATE_VIEW: |
| - if (view.showingCandidates && e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP) { |
| + if ((view.showingCandidates || view.showingNumberRow) && e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP) { |
| var candidate = goog.dom.getTextContent(e.target); |
| - this.context_.getCommittedText() && (candidate = " " + candidate); |
| + view.showingCandidates && (candidate += " "); |
| this.commitText_("", candidate, !0, !0, !1); |
| this.chromeVoxHandler_.handleCandidateEvent(candidate); |
| } |
| @@ -11438,7 +11532,7 @@ |
| } else { |
| if (e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP) { |
| var ch = view.getHighlightedCharacter(); |
| - this.isFakeEventUsed_ ? this.context_.sendKeyDownAndUpEvent(ch, view.triggeredBy.id) : this.commitText_(ch, "", i18n.input.chrome.inputview.util.isCommitCharacter(ch), !0, !0); |
| + this.shouldSendKeyEvent_() ? this.context_.sendKeyDownAndUpEvent(ch, view.triggeredBy.id) : this.commitText_(ch, "", i18n.input.chrome.inputview.util.isCommitCharacter(ch), !0, !0); |
| view.hide(); |
| } |
| } |
| @@ -11457,30 +11551,29 @@ |
| case i18n.input.chrome.inputview.ElementType.CHARACTER_KEY: |
| key = softKey; |
| if (e.type == i18n.input.chrome.inputview.events.EventType.LONG_PRESS) { |
| - this.isFakeEventUsed_ || this.getCurrentView_().getAltDataView().show(key); |
| + this.isFakeEventUsed_ || (this.getCurrentView_().getAltDataView().show(key), key.setHighlighted(!1)); |
| } else { |
| if (e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP) { |
| - var ch = key.getActiveCharacter(), ctrlKey = this.model_.stateManager.hasState(i18n.input.chrome.inputview.StateType.CTRL), altKey = this.model_.stateManager.hasState(i18n.input.chrome.inputview.StateType.ALT); |
| - this.isFakeEventUsed_ || this.isMessageUsed_ || ctrlKey || altKey ? (this.isMessageUsed_ ? this.context_.sendKeyDownAndUpMessage(ch, key.id, this.commitText_.bind(this, ch, "", i18n.input.chrome.inputview.util.isCommitCharacter(ch), !0, !0)) : this.context_.sendKeyDownAndUpEvent(ch, key.id), this.model_.stateManager.hasUnStickyState() && (this.model_.stateManager.clearUnstickyState(), this.getCurrentView_().update())) : this.commitText_(ch, "", i18n.input.chrome.inputview.util.isCommitCharacter(ch), |
| - !0, !0); |
| + var ch = key.getActiveCharacter(); |
| + if (this.isMessageUsed_) { |
| + this.context_.sendKeyDownAndUpMessage(ch, key.id, this.commitText_.bind(this, ch, "", i18n.input.chrome.inputview.util.isCommitCharacter(ch), !0, !0)); |
| + } else { |
| + if (this.shouldSendKeyEvent_()) { |
| + this.context_.sendKeyDownAndUpEvent(ch, key.id), this.model_.stateManager.hasUnStickyState() && (this.model_.stateManager.clearUnstickyState(), this.getCurrentView_().update()); |
| + } else { |
| + var charactersForSpatial = this.getCharactersForSpatial_(key); |
| + this.commitText_(ch, "", i18n.input.chrome.inputview.util.isCommitCharacter(ch), !0, !0, charactersForSpatial); |
| + } |
| + } |
| key.flickerredCharacter = ""; |
| } |
| } |
| break; |
| case i18n.input.chrome.inputview.ElementType.MODIFIER_KEY: |
| key = softKey; |
| - var isStateEnabled = this.model_.stateManager.hasState(key.toState); |
| - if (e.type == i18n.input.chrome.inputview.events.EventType.POINTER_DOWN) { |
| - this.changeState_(key.toState, !isStateEnabled, !0), this.model_.stateManager.setKeyDown(key.toState, !0); |
| - } else { |
| - if (e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP || e.type == i18n.input.chrome.inputview.events.EventType.POINTER_OUT) { |
| - var isChording = this.model_.stateManager.isChording(key.toState); |
| - isChording ? this.changeState_(key.toState, !1, !1) : key.toState != i18n.input.chrome.inputview.StateType.CAPSLOCK && this.changeState_(key.toState, isStateEnabled, !1); |
| - this.model_.stateManager.setKeyDown(key.toState, !1); |
| - } else { |
| - e.type == i18n.input.chrome.inputview.events.EventType.DOUBLE_CLICK && this.changeState_(key.toState, isStateEnabled, !0); |
| - } |
| - } |
| + var isStateEnabled = this.model_.stateManager.hasState(key.toState), isChording = this.model_.stateManager.isChording(key.toState); |
| + e.type == i18n.input.chrome.inputview.events.EventType.POINTER_DOWN ? (this.changeState_(key.toState, !isStateEnabled, !0), this.model_.stateManager.setKeyDown(key.toState, !0)) : e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP || e.type == i18n.input.chrome.inputview.events.EventType.POINTER_OUT ? (isChording ? this.changeState_(key.toState, !1, !1) : key.toState != i18n.input.chrome.inputview.StateType.CAPSLOCK && this.changeState_(key.toState, isStateEnabled, !1), this.model_.stateManager.setKeyDown(key.toState, |
| + !1), key.pointerConfig.longPressWithoutPointerUp = !0) : e.type == i18n.input.chrome.inputview.events.EventType.DOUBLE_CLICK ? this.changeState_(key.toState, isStateEnabled, !0) : e.type == i18n.input.chrome.inputview.events.EventType.LONG_PRESS && (isChording ? key.pointerConfig.longPressWithoutPointerUp = !1 : (this.changeState_(key.toState, !0, !0), this.model_.stateManager.setKeyDown(key.toState, !1))); |
| break; |
| case i18n.input.chrome.inputview.ElementType.BACKSPACE_KEY: |
| if (e.type == i18n.input.chrome.inputview.events.EventType.POINTER_DOWN) { |
| @@ -11511,7 +11604,7 @@ |
| break; |
| case i18n.input.chrome.inputview.ElementType.SPACE_KEY: |
| key = softKey; |
| - e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP && (this.isFakeEventUsed_ ? this.context_.sendKeyDownAndUpEvent(key.getCharacter(), "Space") : this.commitText_(key.getCharacter(), "", !0, !0, !0)); |
| + e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP && (this.shouldSendKeyEvent_() ? this.context_.sendKeyDownAndUpEvent(key.getCharacter(), "Space") : this.commitText_(key.getCharacter(), "", !0, !0, !0)); |
| break; |
| case i18n.input.chrome.inputview.ElementType.SWITCHER_KEY: |
| key = softKey; |
| @@ -11524,7 +11617,7 @@ |
| } else { |
| if (e.type == i18n.input.chrome.inputview.events.EventType.POINTER_UP) { |
| var text = key.flickerredCharacter || key.text; |
| - this.commitText_(text, "", i18n.input.chrome.inputview.util.isCommitCharacter(text), !0, !0); |
| + this.commitText_(text, "", i18n.input.chrome.inputview.util.isCommitCharacter(text), !0, !0, this.getCharactersForSpatial_(key)); |
| key.flickerredCharacter = ""; |
| } |
| } |
| @@ -11539,15 +11632,22 @@ |
| } |
| var keyData = e.keyData; |
| if (keyData.extensionId) { |
| - return!0; |
| + return "KeyA" != keyData.code; |
| } |
| keyData.capsLock ? this.changeState_(i18n.input.chrome.inputview.StateType.CAPSLOCK, !0, !0) : this.changeState_(i18n.input.chrome.inputview.StateType.CAPSLOCK, !1, !1); |
| - if ("AltRight" != keyData.code && (keyData.altKey || keyData.ctrlKey)) { |
| + var code = keyData.code; |
| + "ControlRight" == code && (code = "ControlLeft"); |
| + var currentView = this.getCurrentView_(); |
| + if (!currentView) { |
| return!0; |
| } |
| - var keyView = this.getCurrentView_().getViewForKey(keyData.code), evtType = keyData.type, ret = !0; |
| + var keyView = this.getCurrentView_().getViewForKey(code), evtType = keyData.type, ret = !0; |
| if (keyView) { |
| - switch(keyView.type != i18n.input.chrome.inputview.ElementType.MODIFIER_KEY && (evtType == goog.events.EventType.KEYDOWN ? keyView.setHighlighted(!0) : evtType == goog.events.EventType.KEYUP && keyView.setHighlighted(!1)), keyView.type) { |
| + evtType == goog.events.EventType.KEYDOWN ? keyView.setHighlighted(!0) : evtType == goog.events.EventType.KEYUP && keyView.setHighlighted(!1); |
| + if ("AltRight" != keyData.code && (keyData.altKey || keyData.ctrlKey)) { |
| + return!0; |
| + } |
| + switch(keyView.type) { |
| case i18n.input.chrome.inputview.ElementType.CHARACTER_KEY: |
| if (evtType == goog.events.EventType.KEYDOWN) { |
| var ch = keyView.getActiveCharacter(); |
| @@ -11580,14 +11680,15 @@ |
| this.context_.isVisible() && (this.resetAll_(), this.resize()); |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.onContextChange_ = function $i18n$input$chrome$inputview$Controller$$onContextChange_$() { |
| - var currentView = this.getCurrentView_(); |
| - currentView && (this.context_.isPasswdBox() ? (this.switchToKeyboard(this.passwordKeyset_), currentView.setTitleVisible(!1)) : (this.switchToKeyboard(this.keyboardKeyset_), currentView.setTitleVisible(!0)), this.m17nModel_.setContext(this.context_.context)); |
| + var isPassword = this.context_.isPasswdBox(); |
| + this.switchToKeyboard(isPassword ? this.passwordKeyset_ : this.keyboardKeyset_); |
| + this.m17nModel_.setContext(this.context_.context); |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.onContextUpdate_ = function $i18n$input$chrome$inputview$Controller$$onContextUpdate_$() { |
| - if (this.getCurrentView_()) { |
| + if (this.getCurrentView_() && !this.context_.isPasswdBox()) { |
| this.getCurrentView_().clearCandidates(); |
| var commitText = this.context_.getCommittedText(); |
| - commitText && this.dataSource_ && !this.context_.isPasswdBox() && this.dataSource_.sendAutoPrediction(commitText); |
| + commitText && this.dataSource_ && this.dataSource_.sendAutoPrediction(commitText); |
| this.m17nModel_ && this.m17nModel_.clearHistory(); |
| } |
| }; |
| @@ -11608,13 +11709,14 @@ |
| this.setCompositionText_(compositionText); |
| ret = !1; |
| } else { |
| - isPointerEvent && this.context_.sendKeyDownEvent("Backspace", "Backspace"), this.getCurrentView_().clearCandidates(); |
| + isPointerEvent && (this.context_.sendKeyDownEvent("Backspace", "Backspace"), this.sendBackspaceDown_ = !0), this.getCurrentView_().clearCandidates(); |
| } |
| this.context_.execAll(); |
| return ret; |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.backspaceUp_ = function $i18n$input$chrome$inputview$Controller$$backspaceUp_$() { |
| - this.context_.sendKeyUpEvent("Backspace", "Backspace"); |
| + this.sendBackspaceDown_ && this.context_.sendKeyUpEvent("Backspace", "Backspace"); |
| + this.sendBackspaceDown_ = !1; |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.tabDown_ = function $i18n$input$chrome$inputview$Controller$$tabDown_$() { |
| this.context_.sendKeyDownEvent("Tab", "Tab"); |
| @@ -11624,12 +11726,15 @@ |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.enterDown_ = function $i18n$input$chrome$inputview$Controller$$enterDown_$(isPointerEvent) { |
| var ret = !0; |
| - this.context_.getCompositionText() ? (this.context_.commitText(), this.context_.sendKeyDownEvent("Enter", "Enter"), ret = !1) : isPointerEvent && this.context_.sendKeyDownEvent("Enter", "Enter"); |
| + if (this.context_.getCompositionText() || isPointerEvent) { |
| + this.context_.sendKeyDownEvent("Enter", "Enter"), this.sendEnterDown_ = !0, ret = !this.context_.getCompositionText(); |
| + } |
| this.context_.execAll(); |
| return ret; |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.enterUp_ = function $i18n$input$chrome$inputview$Controller$$enterUp_$() { |
| - this.context_.sendKeyUpEvent("Enter", "Enter"); |
| + this.sendEnterDown_ && this.context_.sendKeyUpEvent("Enter", "Enter"); |
| + this.sendEnterDown_ = !1; |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.changeState_ = function $i18n$input$chrome$inputview$Controller$$changeState_$(stateType, enable, isSticky) { |
| stateType == i18n.input.chrome.inputview.StateType.ALTGR && (enable ? this.context_.sendKeyDownEvent("", "AltRight") : this.context_.sendKeyUpEvent("", "AltRight")); |
| @@ -11673,22 +11778,26 @@ |
| this.dataSource_ && text && this.dataSource_.sendAutoComplete(this.context_.getQueryText(), opt_charactersForSpatial); |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.onAutoComplete_ = function $i18n$input$chrome$inputview$Controller$$onAutoComplete_$(e) { |
| - var candidates = e.candidates, source = this.context_.getCompositionText(), matchedLengths = e.matchedLengths, candidates = goog.array.filter(candidates, function(candidate, i) { |
| - return void 0 == matchedLengths[i] || matchedLengths[i] == source.replace(/['-]/g, "").length; |
| - }), candidates = goog.array.map(candidates, function(candidate) { |
| - if (0 == candidate.toLowerCase().indexOf(source.toLowerCase())) { |
| - return source + candidate.slice(source.length); |
| - } |
| - if (source.toUpperCase() == source) { |
| - return candidate.toUpperCase(); |
| - } |
| - var ch = source.charAt(0); |
| - return ch.toUpperCase() == ch ? candidate.charAt(0).toUpperCase() + candidate.slice(1) : candidate; |
| - }); |
| - this.getCurrentView_().showCandidates(candidates); |
| + var candidates = e.candidates, source = this.context_.getCompositionText(); |
| + if (source == e.source) { |
| + var matchedLengths = e.matchedLengths, candidates = goog.array.filter(candidates, function(candidate, i) { |
| + return void 0 == matchedLengths[i] || matchedLengths[i] == source.replace(/['-]/g, "").length; |
| + }), candidates = goog.array.map(candidates, function(candidate) { |
| + if (0 == candidate.toLowerCase().indexOf(source.toLowerCase())) { |
| + return source + candidate.slice(source.length); |
| + } |
| + if (source.toUpperCase() == source) { |
| + return candidate.toUpperCase(); |
| + } |
| + var ch = source.charAt(0); |
| + return ch.toUpperCase() == ch ? candidate.charAt(0).toUpperCase() + candidate.slice(1) : candidate; |
| + }), isThreeCandidates = "us.compact" == this.currentKeyset_; |
| + isThreeCandidates && (goog.array.insertAt(candidates, source, 0), goog.array.removeDuplicates(candidates)); |
| + this.getCurrentView_().showCandidates(candidates, isThreeCandidates); |
| + } |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.onAutoPrediction_ = function $i18n$input$chrome$inputview$Controller$$onAutoPrediction_$(e) { |
| - this.getCurrentView_().showCandidates(e.candidates); |
| + this.getCurrentView_().showCandidates(e.candidates, "us.compact" == this.currentKeyset_); |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.onLayoutLoaded_ = function $i18n$input$chrome$inputview$Controller$$onLayoutLoaded_$(e) { |
| var layoutID = e.data.layoutID; |
| @@ -11700,25 +11809,28 @@ |
| var keyData = this.keyConfigurations_[keyboardCode], layoutId = keyData[i18n.input.chrome.inputview.SpecNodeName.LAYOUT], layoutData = this.layouts_[layoutId]; |
| if (!this.viewMap_[keyboardCode] && layoutData) { |
| var conditions = {}; |
| - conditions[i18n.input.chrome.inputview.ConditionName.SHOW_COMPACT_LAYOUT_SWITCHER] = "us" == keyboardCode && "en-US" == this.languageCode_; |
| + conditions[i18n.input.chrome.inputview.ConditionName.SHOW_COMPACT_LAYOUT_SWITCHER] = !1; |
| conditions[i18n.input.chrome.inputview.ConditionName.SHOW_ALTGR] = keyData[i18n.input.chrome.inputview.SpecNodeName.HAS_ALTGR_KEY]; |
| var view = new i18n.input.chrome.inputview.View(keyData, layoutData, keyboardCode, this.languageCode_, this.model_, this.inputToolName_); |
| view.render(); |
| view.applyConditions(conditions); |
| this.viewMap_[keyboardCode] = view; |
| - keyboardCode == this.currentKeyset_ ? this.switchToKeyboard(this.currentKeyset_) : this.viewMap_[keyboardCode].setVisible(!1); |
| + this.viewMap_[keyboardCode].setVisible(!1); |
| + this.switchToKeyboard(this.currentKeyset_); |
| } |
| } |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.switchToKeyboard = function $i18n$input$chrome$inputview$Controller$$switchToKeyboard$(keyboardCode) { |
| - this.currentKeyset_ = keyboardCode; |
| - for (var code in this.viewMap_) { |
| - var view = this.viewMap_[code]; |
| - code == keyboardCode ? (view.setVisible(!0), view.update(), this.resize()) : view.setVisible(!1); |
| + if (this.viewMap_[keyboardCode] && this.isSettingReady) { |
| + this.currentKeyset_ = keyboardCode; |
| + for (var code in this.viewMap_) { |
| + var view = this.viewMap_[code]; |
| + code == keyboardCode ? (view.setVisible(!0), view.update(), this.resize(), this.context_.isPasswdBox() && "us.compact" == code ? view.showNumberRow() : view.hideNumberRow(), view.setTitleVisible(!this.context_.isPasswdBox())) : view.setVisible(!1); |
| + } |
| } |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.getCurrentView_ = function $i18n$input$chrome$inputview$Controller$$getCurrentView_$() { |
| - return this.viewMap_[this.currentKeyset_]; |
| + return this.viewMap_[this.currentKeyset_] || null; |
| }; |
| i18n.input.chrome.inputview.Controller.prototype.onConfigLoaded_ = function $i18n$input$chrome$inputview$Controller$$onConfigLoaded_$(e) { |
| var data = e.data, keyboardCode = data[i18n.input.chrome.inputview.SpecNodeName.ID]; |
| @@ -11743,14 +11855,6 @@ |
| var standardLanguage = i18n.input.chrome.inputview.util.getStandardLanguageCode(languageCode); |
| goog.array.contains(i18n.input.chrome.inputview.Controller.NACL_LANGUAGES_, standardLanguage) && this.initializeDataSource_(standardLanguage); |
| this.currentKeyset_ = this.keyboardKeyset_ = keyset; |
| - if ("us" == keyset && "en-US" == languageCode) { |
| - if (this.context_.isA11yMode) { |
| - this.currentKeyset_ = this.keyboardKeyset_ = "us"; |
| - } else { |
| - var preferredKeyset = this.model_.settings.getPreference(i18n.input.chrome.inputview.Settings.Preference.KEY_SET); |
| - this.currentKeyset_ = this.keyboardKeyset_ = preferredKeyset || "us.compact"; |
| - } |
| - } |
| this.isFakeEventUsed_ = isFakeEventUsed; |
| this.inputToolName_ = name; |
| this.isMessageUsed_ = isMessageUsed; |
| @@ -11769,6 +11873,9 @@ |
| var uri = new goog.Uri(window.location.href), code = uri.getParameterValue("id") || "us", language = uri.getParameterValue("language") || "en", passwordLayout = uri.getParameterValue("passwordLayout") || "us", isFakeEventUsed = !!uri.getParameterValue("isFakeEventUsed"), name = chrome.i18n.getMessage(uri.getParameterValue("name") || "English"), isMessageUsed = !!uri.getParameterValue("isMessageUsed"), context = new i18n.input.chrome.inputview.ChromeOsContext(!isFakeEventUsed && !isMessageUsed), |
| controller = new i18n.input.chrome.inputview.Controller(context); |
| controller.initialize(code, language, passwordLayout, isFakeEventUsed, name, isMessageUsed); |
| + window.setContext = function $window$setContext$(mockContext) { |
| + context.setContext(mockContext); |
| + }; |
| window.unload = function $window$unload$() { |
| goog.dispose(controller); |
| goog.dispose(this.context_); |
| diff -urN nacl-mozc-1.15.1800.4.orig/inputview_css.css nacl-mozc-1.15.1800.4/inputview_css.css |
| --- nacl-mozc-1.15.1800.4.orig/inputview_css.css 2014-05-09 13:53:08.490488226 +0900 |
| +++ nacl-mozc-1.15.1800.4/inputview_css.css 2014-05-09 13:27:42.640442490 +0900 |
| @@ -1,2 +1,2 @@ |
| /* Copyright 2014 Google Inc. All Rights Reserved. */ |
| -.inputview-layoutview{position:relative;-webkit-user-select:none}.inputview-skv{display:inline-block;overflow:hidden}.inputview-sk{margin:0 7px 7px 0;position:relative;background-color:white}.inputview-character{position:absolute;text-align:center;color:#bbb;font-size:15px;display:inline-block}.inputview-ch{color:#666;font-size:21px}.inputview-vertical{display:inline-block}.inputview-linear{display:inline-block}.inputview-view{position:fixed;bottom:0;left:0;-webkit-box-shadow:-5px 0 5px #ccc;border:1px solid #cfcfcf;background-color:#ebebeb;font-family:'Roboto, Noto Sans, Sans-Serif';color:#666666;-webkit-user-select:none}.inputview-view[lang=am]{font-family:'Roboto, Noto Sans Armenian, Sans-Serif'}.inputview-view[lang=il]{font-family:'Roboto, Noto Sans Hebrew, Sans-Serif'}.inputview-view[lang=jp]{font-family:'Roboto, MotoyaG04Gothic, IPAGothic, Sans-Serif'}.inputview-view[lang=ar]{font-family:'Roboto, Noto Arabic Naskh UI, Sans-Serif'}.inputview-view[lang=bn]{font-family:'Roboto, Noto Sans Bengali, Sans-Serif'}.inputview-view[lang=ethi]{font-family:'Roboto, Noto Sans Ethiopic, Sans-Serif'}.inputview-view[lang=fa]{font-family:'Roboto, Noto Arabic Naskh UI, Sans-Serif'}.inputview-view[lang=gu]{font-family:'Roboto, Noto Sans Gujarati, Lohit Gujarati, Sans-Serif'}.inputview-view[lang=kn]{font-family:'Roboto, Noto Sans Kannada, Lohit Kannada, Sans-Serif '}.inputview-view[lang=ml]{font-family:'Roboto, Noto Sans Malayalam, Lohit Malayalam, Sans-Serif'}.inputview-view[lang=ta]{font-family:'Roboto, Noto Sans Tamil, Lohit Tamil, Sans-Serif'}.inputview-view[lang=te]{font-family:'Roboto, Noto Sans Telugu, Lohit Telugu, Sans-Serif'}.inputview-view[lang=th]{font-family:'Roboto, Noto Sans Thai, Sans-Serif'}.inputview-view[lang=zh-CN]{font-family:'Roboto, MYingHeiGB18030, Droid Sans Fallback, Sans-Serif'}.inputview-view[lang=zh-TW],.inputview-view[lang=zh-HK]{font-family:'Roboto, MYingHeiB5HK, Droid Sans Fallback, Sans-Serif'}.inputview-view[lang=kr]{font-family:'Roboto, NanumGothic, Sans-Serif'}.inputview-modifier{display:table-cell;vertical-align:middle;font-size:15px;text-align:center;position:relative}.inputview-altdata-view{position:absolute;z-index:999;border:1px solid #ccc;background-color:white}.inputview-altdata-key{display:table-cell;font-size:21px;vertical-align:middle;text-align:center}.inputview-candidate-view{overflow:hidden;display:inline-block}.inputview-candidate{display:table-cell;font-size:15px;vertical-align:middle;text-align:center}.inputview-candidate-separator{border-left:1px solid #ddd;position:relative;display:inline-block}.inputview-table-cell{display:table-cell;vertical-align:middle;text-align:center}.inputview-title{font-size:15px;color:#bfbfbf}.inputview-special-key-name{display:block}.inputview-modifier-state-icon{background-image:url('images/modifier-off.png');background-repeat:no-repeat;background-size:16px 4px;display:inline-block;width:16px;height:4px}.inputview-modifier-state-icon.inputview-modifier-on{background-image:url('images/modifier-on.png')}.inputview-modifier-state-icon.inputview-hold{-webkit-box-shadow:0 0 5px 1px #397ffb;opacity:0.9}.inputview-altdata-cover{position:fixed;bottom:0;left:0;background-color:white;opacity:0.5;z-index:1}.inputview-arrow-key{background-repeat:no-repeat;display:inline-block;width:16px;height:13px;background-size:16px 13px}.inputview-up-key{background-image:url('images/up.png')}.inputview-down-key{background-image:url('images/down.png')}.inputview-left-key{background-image:url('images/left.png')}.inputview-right-key{background-image:url('images/right.png')}.inputview-special-key-bg{background-color:#ddd}.inputview-hide-keyboard-icon{background:transparent url('images/hide.png') 0 0 no-repeat;background-size:18px 18.5px;display:inline-block;width:18px;height:18.5px}.inputview-element-highlight{background-color:#ddd}.inputview-special-key-highlight{background-color:#bbb}.inputview-backspace-icon{background:transparent url('images/backspace.png');background-size:22.5px 13.5px;display:inline-block;width:22.5px;height:13.5px}.inputview-enter-icon{background:transparent url('images/enter.png');background-size:18px 13.5px;display:inline-block;width:18px;height:13.5px}.inputview-shift-icon{background:transparent url('images/shift.png');background-size:18.5px 13.5px;display:inline-block;width:18.5px;height:13.5px}.inputview-tab-icon{background:transparent url('images/tab.png');background-size:25.5px 13.5px;display:inline-block;width:25.5px;height:13.5px}.inputview-capslock-dot{background-color:#ccc;width:4px;height:4px;position:absolute;top:8px;right:8px}.inputview-capslock-dot-highlight{background-color:#4285f4}.inputview-hint-text{font-size:12px;color:grey;position:absolute;top:8px;right:8px}.inputview-compact-key{font-size:21px}.inputview-compact-switcher{background:transparent url('images/compact.png');background-size:19px 9px;display:inline-block;width:19px;height:9px}.inputview-regular-switcher{background:transparent url('images/regular_size.png');background-size:19px 14px;display:inline-block;width:19px;height:14px} |
| \ No newline at end of file |
| +.inputview-layoutview{position:relative;-webkit-user-select:none}.inputview-skv{display:inline-block;overflow:hidden}.inputview-sk{margin:0 7px 7px 0;position:relative;background-color:#ffffff}#us-compact .inputview-sk{margin:0 11px 11px 0}.inputview-character{position:absolute;text-align:center;color:#bbb;font-size:16px;display:inline-block}.inputview-ch{color:#666;font-size:23px}.inputview-vertical{display:inline-block}.inputview-linear{display:inline-block}.inputview-view{position:fixed;bottom:0;left:0;-webkit-box-shadow:-5px 0 5px #ccc;border:1px solid #cfcfcf;background-color:#eeeeee;-webkit-user-select:none}.inputview-font{font-family:Roboto,Noto Sans,Sans-Serif}.inputview-font[lang=am]{font-family:Roboto,Noto Sans Armenian,Sans-Serif}.inputview-font[lang=il]{font-family:Roboto,Noto Sans Hebrew,Sans-Serif}.inputview-font[lang=jp]{font-family:Roboto,MotoyaG04Gothic,IPAGothic,Sans-Serif}.inputview-font[lang=ar]{font-family:Roboto,Noto Arabic Naskh ui,Sans-Serif}.inputview-font[lang=bn]{font-family:Roboto,Noto Sans Bengali,Sans-Serif}.inputview-font[lang=ethi]{font-family:Roboto,Noto Sans Ethiopic,Sans-Serif}.inputview-font[lang=fa]{font-family:Roboto,Noto Arabic Naskh ui,Sans-Serif}.inputview-font[lang=gu]{font-family:Roboto,Noto Sans Gujarati,Lohit Gujarati,Sans-Serif}.inputview-font[lang=kn]{font-family:Roboto,Noto Sans Kannada,Lohit Kannada,Sans-Serif}.inputview-font[lang=ml]{font-family:Roboto,Noto Sans Malayalam,Lohit Malayalam,Sans-Serif}.inputview-font[lang=ta]{font-family:Roboto,Noto Sans Tamil,Lohit Tamil,Sans-Serif}.inputview-font[lang=te]{font-family:Roboto,Noto Sans Telugu,Lohit Telugu,Sans-Serif}.inputview-font[lang=th]{font-family:Roboto,Noto Sans Thai,Sans-Serif}.inputview-font[lang=zh-CN]{font-family:Roboto,MYingHeiGB18030,Droid Sans Fallback,Sans-Serif}.inputview-font[lang=zh-TW],.inputview-font[lang=zh-HK]{font-family:Roboto,MYingHeiB5HK,Droid Sans Fallback,Sans-Serif}.inputview-font[lang=kr]{font-family:Roboto,NanumGothic,Sans-Serif}.inputview-modifier{display:table-cell;vertical-align:middle;font-size:15px;text-align:center;position:relative}.inputview-altdata-view{position:absolute;z-index:999;border:1px solid #ccc;background-color:white}.inputview-altdata-key{display:table-cell;font-size:23px;vertical-align:middle;text-align:center}.inputview-candidate.inputview-candidate-highlight{color:#262626}.inputview-candidate-view{overflow:hidden;display:inline-block}.inputview-candidate{display:table-cell;font-size:18px;color:#555555;vertical-align:middle;text-align:center}.inputview-candidate-separator{border-left:1px solid #ddd;position:relative;display:inline-block}.inputview-table-cell{display:table-cell;vertical-align:middle;text-align:center}.inputview-title{font-size:15px;color:#bfbfbf}.inputview-special-key-name{display:block}.inputview-modifier-state-icon{background-image:url('images/modifier-off.png');background-repeat:no-repeat;background-size:16px 4px;display:inline-block;width:16px;height:4px}.inputview-modifier-state-icon.inputview-modifier-on{background-image:url('images/modifier-on.png')}.inputview-modifier-state-icon.inputview-hold{-webkit-box-shadow:0 0 5px 1px #397ffb;opacity:0.9}.inputview-altdata-cover{position:fixed;bottom:0;left:0;background-color:white;opacity:0.5;z-index:1}.inputview-arrow-key{background-repeat:no-repeat;display:inline-block;width:16px;height:13px;background-size:16px 13px}.inputview-up-key{background-image:url('images/up.png')}.inputview-down-key{background-image:url('images/down.png')}.inputview-left-key{background-image:url('images/left.png')}.inputview-right-key{background-image:url('images/right.png')}.inputview-special-key-bg{background-color:#ddd}.inputview-hide-keyboard-icon{background:transparent url('images/hide.png') 0 0 no-repeat;background-size:18px 18.5px;display:inline-block;width:18px;height:18.5px}.inputview-element-highlight{background-color:#dddddd}.inputview-special-key-highlight{background-color:#cccccc}.inputview-backspace-icon{background:transparent url('images/backspace.png');background-size:22.5px 13.5px;display:inline-block;width:22.5px;height:13.5px}.inputview-enter-icon{background:transparent url('images/enter.png');background-size:18px 13.5px;display:inline-block;width:18px;height:13.5px}.inputview-shift-icon{background:transparent url('images/shift.png');background-size:18.5px 13.5px;display:inline-block;width:18.5px;height:13.5px}.inputview-tab-icon{background:transparent url('images/tab.png');background-size:25.5px 13.5px;display:inline-block;width:25.5px;height:13.5px}.inputview-capslock-dot{background-color:#ccc;width:4px;height:4px;position:absolute;top:8px;right:8px}.inputview-capslock-dot-highlight{background-color:#4285f4}.inputview-hint-text{font-size:12px;color:grey;position:absolute;top:8px;right:8px}.inputview-compact-key{font-size:28px;color:#555555}.inputview-compact-switcher{background:transparent url('images/compact.png');background-size:19px 9px;display:inline-block;width:19px;height:9px}.inputview-regular-switcher{background:transparent url('images/regular_size.png');background-size:19px 14px;display:inline-block;width:19px;height:14px}#Space{color:#bbbbbb;font-size:18px} |
| \ No newline at end of file |
| diff -urN nacl-mozc-1.15.1800.4.orig/inputview_layouts/101kbd.js nacl-mozc-1.15.1800.4/inputview_layouts/101kbd.js |
| --- nacl-mozc-1.15.1800.4.orig/inputview_layouts/101kbd.js 2014-05-09 13:53:08.490488226 +0900 |
| +++ nacl-mozc-1.15.1800.4/inputview_layouts/101kbd.js 2014-05-09 13:27:42.870442520 +0900 |
| @@ -1,3 +1,3 @@ |
| -(function() { function a(b){for(var e=d,f=[],c=0;c<b;c++)f.push(g(e));return f}function g(b){var e=h+l++;return m(8,b,e)}function n(b){return m(4,b,void 0)}function m(b,e,f){var c={},k;for(k in e)c[k]=e[k];c.type=b;f&&(c.id=f);return{spec:c}};var l=0,h="";var h="101kbd-k-",p=n({id:"topBar",children:[m(10,{id:"candidateView",widthInWeight:15,heightInWeight:1},void 0)],condition:"showTitleBar"}),q,d={widthInWeight:1,heightInWeight:1},r=a(13),s=g({widthInWeight:2}),t=n({id:"row1",children:[r,s]}),u=g({widthInWeight:1.5}),v=a(12),w=g({widthInWeight:1.5}),x=n({id:"row2",children:[u,v,w]}),y=g({widthInWeight:1.75}),z=a(11),A=g({widthInWeight:2.25}),B=n({id:"row3",children:[y,z,A]}),C=g({widthInWeight:2.5}),D=a(10),E=g({widthInWeight:2.5}); |
| +(function() { function a(b){for(var e=d,f=[],c=0;c<b;c++)f.push(g(e));return f}function g(b){var e=h+l++;return m(8,b,e)}function n(b){return m(4,b,void 0)}function m(b,e,f){var c={},k;for(k in e)c[k]=e[k];c.type=b;f&&(c.id=f);return{spec:c}};var l=0,h="";var h="101kbd-k-",p;p=n({id:"topBar",children:[m(10,{id:"candidateView",widthInWeight:15,heightInWeight:1},void 0)],condition:"showTitleBar"});var q,d={widthInWeight:1,heightInWeight:1},r=a(13),s=g({widthInWeight:2}),t=n({id:"row1",children:[r,s]}),u=g({widthInWeight:1.5}),v=a(12),w=g({widthInWeight:1.5}),x=n({id:"row2",children:[u,v,w]}),y=g({widthInWeight:1.75}),z=a(11),A=g({widthInWeight:2.25}),B=n({id:"row3",children:[y,z,A]}),C=g({widthInWeight:2.5}),D=a(10),E=g({widthInWeight:2.5}); |
| q=[t,x,B,n({id:"row4",children:[C,D,E]})];var F=g({widthInWeight:1}),G=g({widthInWeight:1}),H=g({widthInWeight:1,condition:"showCompactLayoutSwitcher"}),I=g({widthInWeight:8}),J=g({widthInWeight:1,condition:"showAltGr"});H.spec.giveWeightTo=I.spec.id;J.spec.giveWeightTo=I.spec.id;var K=g({widthInWeight:1}),L=g({widthInWeight:1}),M=g({widthInWeight:1}); |
| -google.ime.chrome.inputview.onLayoutLoaded({layoutID:"101kbd",heightPercentOfWidth:0.3,minimumHeight:380,fullHeightInWeight:6,children:[p,n({id:"keyboardContainer",children:[m(3,{id:"keyboardView",children:[q,n({id:"spaceKeyrow",children:[F,G,H,I,J,K,L,M]})],widthPercent:100,heightPercent:100},void 0)]})]}); })() |
| +google.ime.chrome.inputview.onLayoutLoaded({layoutID:"101kbd",heightPercentOfWidth:.3,minimumHeight:380,fullHeightInWeight:6,children:[p,n({id:"keyboardContainer",children:[m(3,{id:"keyboardView",children:[q,n({id:"spaceKeyrow",children:[F,G,H,I,J,K,L,M]})],widthPercent:100,heightPercent:100},void 0)]})]}); })() |
| diff -urN nacl-mozc-1.15.1800.4.orig/inputview_layouts/compactkbd.js nacl-mozc-1.15.1800.4/inputview_layouts/compactkbd.js |
| --- nacl-mozc-1.15.1800.4.orig/inputview_layouts/compactkbd.js 2014-05-09 13:53:08.490488226 +0900 |
| +++ nacl-mozc-1.15.1800.4/inputview_layouts/compactkbd.js 2014-05-09 13:27:42.870442520 +0900 |
| @@ -1,2 +1,3 @@ |
| -(function() { function a(b){for(var d=e,f=[],c=0;c<b;c++)f.push(g(d));return f}function g(b){var d=h+l++;return m(8,b,d)}function n(b){return m(4,b,void 0)}function m(b,d,f){var c={},k;for(k in d)c[k]=d[k];c.type=b;f&&(c.id=f);return{spec:c}};var l=0,h="";var h="compactkbd-k-",p=n({id:"topBar",children:[m(10,{id:"candidateView",widthInWeight:15,heightInWeight:1},void 0)],condition:"showTitleBar"}),e={widthInWeight:1,heightInWeight:1},q=a(10),r=g({widthInWeight:2}),s=n({id:"row1",children:[q,r]}),t=g({widthInWeight:1.75}),u=a(8),v=g({widthInWeight:2.25}),w=n({id:"row2",children:[t,u,v]}),x=g({widthInWeight:1.5}),y=a(9),z=g({widthInWeight:1.5}),A=n({id:"row3",children:[x,y,z]}),B=g({widthInWeight:1}),C=g({widthInWeight:1}),D=g({widthInWeight:1}),E=g({widthInWeight:6}), |
| -F=g({widthInWeight:1}),G=g({widthInWeight:1}),H=g({widthInWeight:1});google.ime.chrome.inputview.onLayoutLoaded({layoutID:"compactkbd",heightPercentOfWidth:0.3,minimumHeight:380,fullHeightInWeight:5,children:[p,n({id:"keyboardContainer",children:[m(3,{id:"keyboardView",children:[[s,w,A,n({id:"row4",children:[B,C,D,E,F,G,H]})]],widthPercent:100,heightPercent:100},void 0)]})]}); })() |
| +(function() { function a(b){for(var d=e,f=[],c=0;c<b;c++)f.push(g(d));return f}function g(b){var d=h+l++;return m(8,b,d)}function n(b){return m(4,b,void 0)}function m(b,d,f){var c={},k;for(k in d)c[k]=d[k];c.type=b;f&&(c.id=f);return{spec:c}};var l=0,h="";var h="compactkbd-k-",p;p=n({id:"topBar",children:[m(10,{id:"candidateView",widthInWeight:11.2,heightInWeight:.6,numberRowWeight:10},void 0)],condition:"showTitleBar"}); |
| +var e={widthInWeight:1,heightInWeight:1},q=a(10),r=g({widthInWeight:1.2}),s=n({id:"row1",children:[q,r]}),t=g({widthInWeight:1.5}),u=a(8),v=g({widthInWeight:1.7}),w=n({id:"row2",children:[t,u,v]}),x=g({widthInWeight:1.1}),y=a(9),z=g({widthInWeight:1.1}),A=n({id:"row3",children:[x,y,z]}),B=g({widthInWeight:1.1}),C=g({widthInWeight:1}),D=g({widthInWeight:1}),E=g({widthInWeight:5}),F=g({widthInWeight:1}),G=g({widthInWeight:1}),H=g({widthInWeight:1.1}); |
| +google.ime.chrome.inputview.onLayoutLoaded({layoutID:"compactkbd",heightPercentOfWidth:.3,minimumHeight:380,fullHeightInWeight:4.6,children:[p,n({id:"keyboardContainer",children:[m(3,{id:"keyboardView",children:[[s,w,A,n({id:"row4",children:[B,C,D,E,F,G,H]})]],widthPercent:100,heightPercent:100},void 0)]})]}); })() |
| diff -urN nacl-mozc-1.15.1800.4.orig/key_translator.js nacl-mozc-1.15.1800.4/key_translator.js |
| --- nacl-mozc-1.15.1800.4.orig/key_translator.js 2014-05-09 13:53:00.070488532 +0900 |
| +++ nacl-mozc-1.15.1800.4/key_translator.js 2014-05-09 13:27:43.680442621 +0900 |
| @@ -396,10 +396,21 @@ |
| // Do not disturb taking screenshot. |
| if (keyData.ctrlKey && keyData.key == 'ChromeOSSwitchWindow') { |
| return /** @type {!mozc.KeyEvent} */ ({}); |
| - } else if (mozc.MODIFIER_KEY_CODE_MASK_MAP_[keyData.code]) { |
| - return this.translateModifierKeyEvent_(keyData); |
| - } else if (keyData.type == 'keydown') { |
| - return this.translateKeyDownEvent_(keyData, isKanaMode, keyboardLayout); |
| + } else { |
| + // Since IME API can't send the correct upper case alphabet. |
| + // Need to make a transform first. JP IME use shift status to input upper |
| + // case letter. |
| + var key = keyData.key; |
| + if (keyData.capsLock && key) { |
| + if (key.toUpperCase() != key) { |
| + keyData.shiftKey = !keyData.shiftKey; |
| + } |
| + } |
| + if (mozc.MODIFIER_KEY_CODE_MASK_MAP_[keyData.code]) { |
| + return this.translateModifierKeyEvent_(keyData); |
| + } else if (keyData.type == 'keydown') { |
| + return this.translateKeyDownEvent_(keyData, isKanaMode, keyboardLayout); |
| + } |
| } |
| return /** @type {!mozc.KeyEvent} */ ({}); |
| }; |
| diff -urN nacl-mozc-1.15.1800.4.orig/manifest.json nacl-mozc-1.15.1800.4/manifest.json |
| --- nacl-mozc-1.15.1800.4.orig/manifest.json 2014-05-09 13:52:53.070488794 +0900 |
| +++ nacl-mozc-1.15.1800.4/manifest.json 2014-05-09 13:36:13.020515832 +0900 |
| @@ -29,7 +29,7 @@ |
| "description": "Japanese input method.", |
| "language": "ja", |
| "layouts": ["jp"], |
| - "input_view": "inputview.html?id=us&language=ja&passwordLayout=us&name=appNameJPKeyboard&isFakeEventUsed=true" |
| + "input_view": "inputview.html?id=jp&language=ja&passwordLayout=us&name=appNameJPKeyboard&isFakeEventUsed=true" |
| }], |
| "options_page": "options.html", |
| "icons": { |