Merge branch 'master' into web-29-mutation-observers

This commit is contained in:
Joshua Horton 2017-05-30 10:52:20 +07:00
commit beb0e882ea
7 changed files with 40 additions and 38 deletions

View file

@ -358,7 +358,7 @@
cs.width='2px';
cs.backgroundColor='blue';
cs.border='none';
cs.left=cs.top=0; // actual position set relative to parent when displayed
cs.left=cs.top='0px'; // actual position set relative to parent when displayed
cs.display='block';
cs.visibility='hidden';
cs.zIndex='9998'; // immediately below the OSK
@ -1732,18 +1732,19 @@
*/
keymanweb._GetEventObject=function(e) // I2404 - Attach to controls in IFRAMEs
{
if (!e)
{
if (!e) {
e = window.event;
if(!e)
{
e = keymanweb._GetLastActiveElement();
if(e)
{
e = e.ownerDocument;
if(e) e = e.parentWindow;
if(!e) return null;
e = e.event;
if(!e) {
var elem = keymanweb._GetLastActiveElement();
if(elem) {
elem = elem.ownerDocument;
if(elem) {
elem = elem.parentWindow;
}
if(!elem) {
return null;
}
e = elem.event;
}
}
}
@ -3085,12 +3086,12 @@
* Javascript treats it as an object anyway
*
* @param {Object} Lkbd Keyboard object
* @return {Array} Copy of keyboard identification strings
* @return {Object} Copy of keyboard identification strings
*
*/
keymanweb._GetKeyboardDetail = function(Lkbd) // I2078 - Full keyboard detail
{
var Lr=[];
var Lr={};
Lr['Name'] = Lkbd['KN'];
Lr['InternalName'] = Lkbd['KI'];
Lr['LanguageName'] = Lkbd['KL']; // I1300 - Add support for language names
@ -3939,7 +3940,7 @@
/**
* Function removeHotKey
* Scope Public
* @param {number} keycode
* @param {number} keyCode
* @param {number} shiftState
* Description Remove a hot key handler from array of document-level hotkeys triggered by key up event
*/

View file

@ -104,8 +104,8 @@ var __BUILD__ = 300;
};
// Generalized component event registration
util.events = [];
util.currentEvents = [];
util.events = {}; // An object mapping event names to individual event lists. Maps strings to arrays.
util.currentEvents = []; // The event messaging call stack.
/**
* Determine path and protocol of executing script
@ -194,7 +194,7 @@ var __BUILD__ = 300;
util.callEvent = function(event,params)
{
if(typeof util.events[event] == 'undefined') return true;
if(typeof util.currentEvents[event] != 'undefined') return false;
if(util.currentEvents.indexOf(event) != -1) return false; // Avoid event messaging recursion!
util.currentEvents.push(event);
for(var i=0; i<util.events[event].length; i++)
{
@ -247,7 +247,7 @@ var __BUILD__ = 300;
/**
* Function getOption
* Scope Public
* @param {string} option Name of option
* @param {string} optionName Name of option
* @param {*=} dflt Default value of option
* @return {*}
* Description Returns value of named option
@ -262,7 +262,7 @@ var __BUILD__ = 300;
/**
* Function setOption
* Scope Public
* @param {string} option Name of option
* @param {string} optionName Name of option
* @param {*=} value Value of option
* Description Sets value of named option
*/
@ -993,7 +993,7 @@ var __BUILD__ = 300;
* Function toNumber
* Scope Public
* @param {string} s numeric string
* @param {number} v default value
* @param {number} dflt default value
* @return {number}
* Description Return string converted to integer or default value
*/
@ -1007,7 +1007,7 @@ var __BUILD__ = 300;
* Function toNumber
* Scope Public
* @param {string} s numeric string
* @param {number} v default value
* @param {number} dflt default value
* @return {number}
* Description Return string converted to real value or default value
*/

View file

@ -54,7 +54,7 @@
Lelem._KeymanWebSelectionEnd=Le;
keymanweb._IgnoreNextSelChange = 0;
if(Ptext!=null)keymanweb.KO(0, Lelem, Ptext);
if(typeof(PdeadKey)!='undefined') keymanweb.KDO(0, Lelem, PdeadKey);
if((typeof(PdeadKey)!=='undefined') && (PdeadKey !== null)) keymanweb.KDO(0, Lelem, PdeadKey);
Lelem._KeymanWebSelectionStart=null;
Lelem._KeymanWebSelectionEnd=null;
Lv=true;
@ -177,7 +177,7 @@
if(!keymanweb['initialized'])
{
keymanweb.deferredKRS.push(Pstub);
return;
return null;
}
// The default stub is always the first keyboard stub loaded [and will be ignored by desktop browsers - not for beta, anyway]
@ -229,6 +229,8 @@
// make any changes needed by UI for new keyboard stub
// (Uncommented for Build 360)
keymanweb.doKeyboardRegistered(Pstub['KI'],Pstub['KL'],Pstub['KN'],Pstub['KLC']);
return null;
}
/**
@ -259,7 +261,7 @@
* Function KN
* Scope Public
* @param {number} n Length of context to check
* @param {Object} Pelem Element to work with (must be currently focused element)
* @param {Object} Ptarg Element to work with (must be currently focused element)
* @return {boolean} True if length of context is less than or equal to n
* Description Test length of context, return true if the length of the context is less than or equal to n
*
@ -346,16 +348,13 @@
retVal = (keyCode == Lrulekey); // I3318, I3555
}
if(!retVal) this._DeadkeyResetMatched(); // I3318
return retVal; // I3318
return retVal != 0; // I3318
};
/**
* Function KKI
* Scope Public
* @param {number} n
* @param {Object} Ptarg
* @param {string} val
* @param {number} ln
* @param {Object} e
* @return {Object} Object with event's virtual key flag, key code, and modifiers
* Description Get object with extended key event information
*/
@ -383,7 +382,7 @@
n = sp - n;
for(var i = 0; i < keymanweb._DeadKeys.length; i++)
if(keymanweb._DeadKeys[i].p == n && keymanweb._DeadKeys[i].d == d) {
keymanweb._DeadKeys[i].matched = 1; return 1; // I3318
keymanweb._DeadKeys[i].matched = 1; return true; // I3318
}
this._DeadkeyResetMatched(); // I3318
@ -448,7 +447,9 @@
*/
keymanweb['KA'] = keymanweb.KA = function(n,ch,s) // Keyboard_Any()
{
if(ch == '') return 0;
if(ch == '') {
return false;
}
var Lix = s._kmwIndexOf(ch); //I3319
keymanweb._AnyIndices[n] = Lix;
return Lix >= 0;
@ -677,7 +678,7 @@
* Scope Public
* @param {number} Pdn no of character to overwrite (delete)
* @param {string} Ps string
* @param {numebr} Pn index
* @param {number} Pn index
* @param {Object} Pelem element to output to
* Description Output a character selected from the string according to the offset in the index array
*/

View file

@ -211,7 +211,7 @@
/**
* Function enabled
* Scope Public
* @return {boolean|integer} True if KMW OSK enabled
* @return {boolean|number} True if KMW OSK enabled
* Description Test if KMW OSK is enabled
*/
osk['isEnabled'] = osk.isEnabled = function()
@ -222,7 +222,7 @@
/**
* Function isVisible
* Scope Public
* @return {boolean|integer} True if KMW OSK visible
* @return {boolean|number} True if KMW OSK visible
* Description Test if KMW OSK is actually visible
* Note that this will usually return false after any UI event that results in (temporary) loss of input focus
*/
@ -1644,7 +1644,7 @@
/**
* Create the OSK for a particular keyboard and device
*
* @param {Array.<Object>} layout Array of OSK layout objects
* @param {Object} layout OSK layout definition
* @param {string} formFactor layout form factor
* @return {Object} fully formatted OSK object
*/

View file

@ -109,7 +109,7 @@ String.prototype._kmwCharCodeAt = function(codePointIndex) {};
/**
* @param {string} searchValue
* @param {number} fromIndex
* @param {number} [fromIndex]
* @return {number}
**/
String.prototype._kmwIndexOf = function(searchValue, fromIndex) {};

View file

@ -64,7 +64,7 @@ String.prototype.kmwCharCodeAt = function(codePointIndex) {
* of the specified value, or -1 if not found.
*
* @param {string} searchValue The value to search for
* @param {number} fromIndex Optional code point index to start searching from
* @param {number} [fromIndex] Optional code point index to start searching from
* @return {number} The code point index of the specified search value
*/
String.prototype.kmwIndexOf = function(searchValue, fromIndex) {

Binary file not shown.