Opera 11 WebSockets and Opera '-' key mapping fix.
Opera 11 native WebSockets (if enabled) seems to have bad behavior for the bufferedAmount so add change from websockify project to allow max bufferedAmount (before send queue is delay) to be configured. Also, Opera 11 and 10.60 behave like Mozilla regarding the '-' key so translate it correctly.
This commit is contained in:
parent
661f560946
commit
b28a16f57c
@ -770,8 +770,8 @@ function getKeysym(e) {
|
|||||||
case 186 : keysym = 59; break; // ; (IE)
|
case 186 : keysym = 59; break; // ; (IE)
|
||||||
case 187 : keysym = 61; break; // = (IE)
|
case 187 : keysym = 61; break; // = (IE)
|
||||||
case 188 : keysym = 44; break; // , (Mozilla, IE)
|
case 188 : keysym = 44; break; // , (Mozilla, IE)
|
||||||
case 109 : // - (Mozilla)
|
case 109 : // - (Mozilla, Opera)
|
||||||
if (Util.Engine.gecko) {
|
if (Util.Engine.gecko || Util.Engine.presto) {
|
||||||
keysym = 45; }
|
keysym = 45; }
|
||||||
break;
|
break;
|
||||||
case 189 : keysym = 45; break; // - (IE)
|
case 189 : keysym = 45; break; // - (IE)
|
||||||
|
@ -169,7 +169,7 @@ function flush() {
|
|||||||
if (websocket.bufferedAmount !== 0) {
|
if (websocket.bufferedAmount !== 0) {
|
||||||
Util.Debug("bufferedAmount: " + websocket.bufferedAmount);
|
Util.Debug("bufferedAmount: " + websocket.bufferedAmount);
|
||||||
}
|
}
|
||||||
if (websocket.bufferedAmount < 1000) {
|
if (websocket.bufferedAmount < api.maxBufferedAmount) {
|
||||||
//Util.Debug("arr: " + arr);
|
//Util.Debug("arr: " + arr);
|
||||||
//Util.Debug("sQ: " + sQ);
|
//Util.Debug("sQ: " + sQ);
|
||||||
if (sQ) {
|
if (sQ) {
|
||||||
@ -281,6 +281,9 @@ function close() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function constructor() {
|
function constructor() {
|
||||||
|
// Configuration settings
|
||||||
|
api.maxBufferedAmount = 200;
|
||||||
|
|
||||||
// Direct access to send and receive queues
|
// Direct access to send and receive queues
|
||||||
api.get_sQ = get_sQ;
|
api.get_sQ = get_sQ;
|
||||||
api.get_rQ = get_rQ;
|
api.get_rQ = get_rQ;
|
||||||
|
Loading…
Reference in New Issue
Block a user