mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge m-c to fx-team
This commit is contained in:
commit
ca4ca575be
@ -65,6 +65,9 @@ def build_dict(env=os.environ):
|
||||
|
||||
# crashreporter
|
||||
d["crashreporter"] = 'MOZ_CRASHREPORTER' in env and env['MOZ_CRASHREPORTER'] == '1'
|
||||
|
||||
# per-window private browsing
|
||||
d["perwindowprivatebrowsing"] = 'MOZ_PER_WINDOW_PRIVATE_BROWSING' in env and env['MOZ_PER_WINDOW_PRIVATE_BROWSING'] == '1'
|
||||
return d
|
||||
|
||||
#TODO: replace this with the json module when Python >= 2.6 is a requirement.
|
||||
|
@ -8885,6 +8885,7 @@ MOZ_DEBUG=${MOZ_DEBUG} \
|
||||
MOZ_WIDGET_TOOLKIT=${MOZ_WIDGET_TOOLKIT} \
|
||||
UNIVERSAL_BINARY=${UNIVERSAL_BINARY} \
|
||||
MOZ_CRASHREPORTER=${MOZ_CRASHREPORTER} \
|
||||
MOZ_PER_WINDOW_PRIVATE_BROWSING=${MOZ_PER_WINDOW_PRIVATE_BROWSING} \
|
||||
$PYTHON ${_topsrcdir}/config/writemozinfo.py ./mozinfo.json.tmp
|
||||
if cmp -s ./mozinfo.json.tmp ./mozinfo.json; then
|
||||
rm ./mozinfo.json.tmp
|
||||
|
@ -17,6 +17,7 @@ LIBXUL_LIBRARY = 1
|
||||
|
||||
EXPORTS += \
|
||||
GStreamerDecoder.h \
|
||||
GStreamerReader.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
@ -18,6 +18,7 @@ LIBXUL_LIBRARY = 1
|
||||
EXPORTS += \
|
||||
OggDecoder.h \
|
||||
OggCodecState.h \
|
||||
OggReader.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
@ -15,6 +15,7 @@ LIBXUL_LIBRARY = 1
|
||||
|
||||
EXPORTS += \
|
||||
MediaOmxDecoder.h \
|
||||
MediaOmxReader.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
@ -17,6 +17,7 @@ EXPORTS += \
|
||||
MPAPI.h \
|
||||
MediaPluginHost.h \
|
||||
MediaPluginDecoder.h \
|
||||
MediaPluginReader.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
@ -17,6 +17,7 @@ LIBXUL_LIBRARY = 1
|
||||
|
||||
EXPORTS += \
|
||||
WaveDecoder.h \
|
||||
WaveReader.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
@ -17,6 +17,7 @@ LIBXUL_LIBRARY = 1
|
||||
|
||||
EXPORTS += \
|
||||
WebMDecoder.h \
|
||||
WebMReader.h \
|
||||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
|
@ -197,7 +197,7 @@ var W3CTest = {
|
||||
add_completion_callback(W3CTest.finish.bind(W3CTest));
|
||||
setup({
|
||||
"output": false,
|
||||
"timeout": 1000000
|
||||
"explicit_timeout": true
|
||||
});
|
||||
} catch (e) {
|
||||
W3CTest.logFailure("Unexpected exception: " + e);
|
||||
|
@ -36,4 +36,5 @@ disabled = Bug 806138
|
||||
[test_incoming_onstatechange.js]
|
||||
[test_outgoing_onstatechange.js]
|
||||
[test_redundant_operations.js]
|
||||
[test_multiple_hold.js]
|
||||
|
||||
|
289
dom/telephony/test/marionette/test_multiple_hold.js
Normal file
289
dom/telephony/test/marionette/test_multiple_hold.js
Normal file
@ -0,0 +1,289 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
MARIONETTE_TIMEOUT = 15000;
|
||||
|
||||
SpecialPowers.addPermission("telephony", true, document);
|
||||
|
||||
let telephony = window.navigator.mozTelephony;
|
||||
let inNumber = "5555551111";
|
||||
let outNumber = "5555552222";
|
||||
let incomingCall;
|
||||
let outgoingCall;
|
||||
|
||||
function verifyInitialState() {
|
||||
log("Verifying initial state.");
|
||||
ok(telephony);
|
||||
is(telephony.active, null);
|
||||
ok(telephony.calls);
|
||||
is(telephony.calls.length, 0);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Initial call list: " + result);
|
||||
is(result[0], "OK");
|
||||
simulateIncoming();
|
||||
});
|
||||
}
|
||||
|
||||
function simulateIncoming() {
|
||||
log("Simulating an incoming call.");
|
||||
|
||||
telephony.onincoming = function onincoming(event) {
|
||||
log("Received 'incoming' call event.");
|
||||
incomingCall = event.call;
|
||||
ok(incomingCall);
|
||||
is(incomingCall.number, inNumber);
|
||||
is(incomingCall.state, "incoming");
|
||||
|
||||
is(telephony.calls.length, 1);
|
||||
is(telephony.calls[0], incomingCall);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "inbound from " + inNumber + " : incoming");
|
||||
is(result[1], "OK");
|
||||
answerIncoming();
|
||||
});
|
||||
};
|
||||
runEmulatorCmd("gsm call " + inNumber);
|
||||
}
|
||||
|
||||
function answerIncoming() {
|
||||
log("Answering the incoming call.");
|
||||
|
||||
let gotConnecting = false;
|
||||
incomingCall.onconnecting = function onconnectingIn(event) {
|
||||
log("Received 'connecting' call event for original (incoming) call.");
|
||||
is(incomingCall, event.call);
|
||||
is(incomingCall.state, "connecting");
|
||||
gotConnecting = true;
|
||||
};
|
||||
|
||||
incomingCall.onconnected = function onconnectedIn(event) {
|
||||
log("Received 'connected' call event for original (incoming) call.");
|
||||
is(incomingCall, event.call);
|
||||
is(incomingCall.state, "connected");
|
||||
ok(gotConnecting);
|
||||
is(incomingCall, telephony.active);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "inbound from " + inNumber + " : active");
|
||||
is(result[1], "OK");
|
||||
holdCall();
|
||||
});
|
||||
};
|
||||
incomingCall.answer();
|
||||
}
|
||||
|
||||
// Put the original (incoming) call on hold
|
||||
function holdCall() {
|
||||
log("Putting the original (incoming) call on hold.");
|
||||
|
||||
let gotHolding = false;
|
||||
incomingCall.onholding = function onholding(event) {
|
||||
log("Received 'holding' call event");
|
||||
is(incomingCall, event.call);
|
||||
is(incomingCall.state, "holding");
|
||||
gotHolding = true;
|
||||
};
|
||||
|
||||
incomingCall.onheld = function onheld(event) {
|
||||
log("Received 'held' call event");
|
||||
is(incomingCall, event.call);
|
||||
is(incomingCall.state, "held");
|
||||
ok(gotHolding);
|
||||
|
||||
is(telephony.active, null);
|
||||
is(telephony.calls.length, 1);
|
||||
is(telephony.calls[0], incomingCall);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "inbound from " + inNumber + " : held");
|
||||
is(result[1], "OK");
|
||||
dial();
|
||||
});
|
||||
};
|
||||
incomingCall.hold();
|
||||
}
|
||||
|
||||
// With one call on hold, make outgoing call
|
||||
function dial() {
|
||||
log("Making an outgoing call (while have one call already held).");
|
||||
|
||||
outgoingCall = telephony.dial(outNumber);
|
||||
ok(outgoingCall);
|
||||
is(outgoingCall.number, outNumber);
|
||||
is(outgoingCall.state, "dialing");
|
||||
is(outgoingCall, telephony.active);
|
||||
is(telephony.calls.length, 2);
|
||||
is(telephony.calls[0], incomingCall);
|
||||
is(telephony.calls[1], outgoingCall);
|
||||
|
||||
outgoingCall.onalerting = function onalerting(event) {
|
||||
log("Received 'onalerting' call event.");
|
||||
is(outgoingCall, event.call);
|
||||
is(outgoingCall.state, "alerting");
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "inbound from " + inNumber + " : held");
|
||||
is(result[1], "outbound to " + outNumber + " : ringing");
|
||||
is(result[2], "OK");
|
||||
answerOutgoing();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// Have the outgoing call answered
|
||||
function answerOutgoing() {
|
||||
log("Answering the outgoing/2nd call");
|
||||
|
||||
// We get no "connecting" event when the remote party answers the call.
|
||||
outgoingCall.onconnected = function onconnectedOut(event) {
|
||||
log("Received 'connected' call event for outgoing/2nd call.");
|
||||
is(outgoingCall, event.call);
|
||||
is(outgoingCall.state, "connected");
|
||||
is(outgoingCall, telephony.active);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "inbound from " + inNumber + " : held");
|
||||
is(result[1], "outbound to " + outNumber + " : active");
|
||||
is(result[2], "OK");
|
||||
holdSecondCall();
|
||||
});
|
||||
};
|
||||
runEmulatorCmd("gsm accept " + outNumber);
|
||||
}
|
||||
|
||||
// With one held call and one active, hold the active one; expect the first
|
||||
// (held) call to automatically become active, and the 2nd call to go on hold
|
||||
function holdSecondCall() {
|
||||
let firstCallReconnected = false;
|
||||
let secondCallHeld = false;
|
||||
|
||||
log("Putting the 2nd (outgoing) call on hold.");
|
||||
|
||||
// Since first call will become connected again, setup handler
|
||||
incomingCall.onconnected = function onreconnected(event) {
|
||||
log("Received 'connected' call event for original (incoming) call.");
|
||||
is(incomingCall, event.call);
|
||||
is(incomingCall.state, "connected");
|
||||
is(incomingCall, telephony.active);
|
||||
firstCallReconnected = true;
|
||||
if (firstCallReconnected && secondCallHeld) {
|
||||
verifyCalls();
|
||||
}
|
||||
};
|
||||
|
||||
// Handlers for holding 2nd call
|
||||
let gotHolding = false;
|
||||
outgoingCall.onholding = function onholdingOut(event) {
|
||||
log("Received 'holding' call event for 2nd call.");
|
||||
is(outgoingCall, event.call);
|
||||
is(outgoingCall.state, "holding");
|
||||
gotHolding = true;
|
||||
};
|
||||
|
||||
outgoingCall.onheld = function onheldOut(event) {
|
||||
log("Received 'held' call event for 2nd call.");
|
||||
is(outgoingCall, event.call);
|
||||
is(outgoingCall.state, "held");
|
||||
ok(gotHolding);
|
||||
secondCallHeld = true;
|
||||
if (firstCallReconnected && secondCallHeld) {
|
||||
verifyCalls();
|
||||
}
|
||||
};
|
||||
outgoingCall.hold();
|
||||
}
|
||||
|
||||
function verifyCalls() {
|
||||
is(telephony.active, incomingCall);
|
||||
is(telephony.calls.length, 2);
|
||||
is(telephony.calls[0], incomingCall);
|
||||
is(telephony.calls[1], outgoingCall);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "inbound from " + inNumber + " : active");
|
||||
is(result[1], "outbound to " + outNumber + " : held");
|
||||
is(result[2], "OK");
|
||||
hangUpIncoming();
|
||||
});
|
||||
}
|
||||
|
||||
// Hang-up the original incoming call, which is now active
|
||||
function hangUpIncoming() {
|
||||
log("Hanging up the original incoming (now active) call.");
|
||||
|
||||
let gotDisconnecting = false;
|
||||
incomingCall.ondisconnecting = function ondisconnectingIn(event) {
|
||||
log("Received 'disconnecting' call event for original (incoming) call.");
|
||||
is(incomingCall, event.call);
|
||||
is(incomingCall.state, "disconnecting");
|
||||
gotDisconnecting = true;
|
||||
};
|
||||
|
||||
incomingCall.ondisconnected = function ondisconnectedIn(event) {
|
||||
log("Received 'disconnected' call event for original (incoming) call.");
|
||||
is(incomingCall, event.call);
|
||||
is(incomingCall.state, "disconnected");
|
||||
ok(gotDisconnecting);
|
||||
|
||||
// Now back to one call
|
||||
is(telephony.active, null);
|
||||
is(telephony.calls.length, 1);
|
||||
is(telephony.calls[0], outgoingCall);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "outbound to " + outNumber + " : held");
|
||||
is(result[1], "OK");
|
||||
hangUpOutgoing();
|
||||
});
|
||||
};
|
||||
incomingCall.hangUp();
|
||||
}
|
||||
|
||||
// Hang-up the remaining (outgoing) call, which is held
|
||||
function hangUpOutgoing() {
|
||||
log("Hanging up the remaining (outgoing) held call.");
|
||||
|
||||
let gotDisconnecting = false;
|
||||
outgoingCall.ondisconnecting = function ondisconnectingOut(event) {
|
||||
log("Received 'disconnecting' call event for remaining (outgoing) call.");
|
||||
is(outgoingCall, event.call);
|
||||
is(outgoingCall.state, "disconnecting");
|
||||
gotDisconnecting = true;
|
||||
};
|
||||
|
||||
outgoingCall.ondisconnected = function ondisconnectedOut(event) {
|
||||
log("Received 'disconnected' call event for remaining (outgoing) call.");
|
||||
is(outgoingCall, event.call);
|
||||
is(outgoingCall.state, "disconnected");
|
||||
ok(gotDisconnecting);
|
||||
|
||||
// Now no calls
|
||||
is(telephony.active, null);
|
||||
is(telephony.calls.length, 0);
|
||||
|
||||
runEmulatorCmd("gsm list", function(result) {
|
||||
log("Call list is now: " + result);
|
||||
is(result[0], "OK");
|
||||
cleanUp();
|
||||
});
|
||||
};
|
||||
outgoingCall.hangUp();
|
||||
}
|
||||
|
||||
function cleanUp() {
|
||||
telephony.onincoming = null;
|
||||
SpecialPowers.removePermission("telephony", document);
|
||||
finish();
|
||||
}
|
||||
|
||||
// Start the test
|
||||
verifyInitialState();
|
@ -161,7 +161,6 @@ abstract public class GeckoApp
|
||||
public View getView() { return mGeckoLayout; }
|
||||
public SurfaceView cameraView;
|
||||
public static GeckoApp mAppContext;
|
||||
public boolean mDOMFullScreen = false;
|
||||
protected MenuPresenter mMenuPresenter;
|
||||
protected MenuPanel mMenuPanel;
|
||||
protected Menu mMenu;
|
||||
@ -991,9 +990,17 @@ abstract public class GeckoApp
|
||||
} else if (event.equals("ToggleChrome:Focus")) {
|
||||
focusChrome();
|
||||
} else if (event.equals("DOMFullScreen:Start")) {
|
||||
mDOMFullScreen = true;
|
||||
// Local ref to layerView for thread safety
|
||||
LayerView layerView = mLayerView;
|
||||
if (layerView != null) {
|
||||
layerView.setFullScreen(true);
|
||||
}
|
||||
} else if (event.equals("DOMFullScreen:Stop")) {
|
||||
mDOMFullScreen = false;
|
||||
// Local ref to layerView for thread safety
|
||||
LayerView layerView = mLayerView;
|
||||
if (layerView != null) {
|
||||
layerView.setFullScreen(false);
|
||||
}
|
||||
} else if (event.equals("Permissions:Data")) {
|
||||
String host = message.getString("host");
|
||||
JSONArray permissions = message.getJSONArray("permissions");
|
||||
@ -2504,7 +2511,7 @@ abstract public class GeckoApp
|
||||
return;
|
||||
}
|
||||
|
||||
if (mDOMFullScreen) {
|
||||
if (mLayerView.isFullScreen()) {
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("FullScreen:Exit", null));
|
||||
return;
|
||||
}
|
||||
|
@ -650,6 +650,11 @@ public class GeckoLayerClient
|
||||
return mZoomConstraints;
|
||||
}
|
||||
|
||||
/** Implementation of PanZoomTarget */
|
||||
public boolean isFullScreen() {
|
||||
return mView.isFullScreen();
|
||||
}
|
||||
|
||||
/** Implementation of PanZoomTarget */
|
||||
public void setAnimationTarget(ImmutableViewportMetrics metrics) {
|
||||
if (mGeckoIsReady) {
|
||||
|
@ -454,9 +454,9 @@ public class LayerRenderer implements Tabs.OnTabsChangedListener {
|
||||
|
||||
Layer rootLayer = mView.getLayerClient().getRoot();
|
||||
|
||||
if (!mPageContext.fuzzyEquals(mLastPageContext)) {
|
||||
// the viewport or page changed, so show the scrollbars again
|
||||
// as per UX decision
|
||||
if (!mPageContext.fuzzyEquals(mLastPageContext) && !mView.isFullScreen()) {
|
||||
// The viewport or page changed, so show the scrollbars again
|
||||
// as per UX decision. Don't do this if we're in full-screen mode though.
|
||||
mVertScrollLayer.unfade();
|
||||
mHorizScrollLayer.unfade();
|
||||
mFadeRunnable.scheduleStartFade(ScrollbarLayer.FADE_DELAY);
|
||||
|
@ -54,6 +54,7 @@ public class LayerView extends FrameLayout {
|
||||
private int mPaintState;
|
||||
private int mCheckerboardColor;
|
||||
private boolean mCheckerboardShouldShowChecks;
|
||||
private boolean mFullScreen;
|
||||
|
||||
private SurfaceView mSurfaceView;
|
||||
private TextureView mTextureView;
|
||||
@ -426,4 +427,12 @@ public class LayerView extends FrameLayout {
|
||||
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
|
||||
GeckoAccessibility.onLayerViewFocusChanged(this, gainFocus);
|
||||
}
|
||||
|
||||
public void setFullScreen(boolean fullScreen) {
|
||||
mFullScreen = fullScreen;
|
||||
}
|
||||
|
||||
public boolean isFullScreen() {
|
||||
return mFullScreen;
|
||||
}
|
||||
}
|
||||
|
@ -315,7 +315,8 @@ public class PanZoomController
|
||||
return false;
|
||||
|
||||
case TOUCHING:
|
||||
if (panDistance(event) < PAN_THRESHOLD) {
|
||||
// Don't allow panning if there is an element in full-screen mode. See bug 775511.
|
||||
if (mTarget.isFullScreen() || panDistance(event) < PAN_THRESHOLD) {
|
||||
return false;
|
||||
}
|
||||
cancelTouch();
|
||||
@ -831,7 +832,7 @@ public class PanZoomController
|
||||
|
||||
@Override
|
||||
public boolean onScale(SimpleScaleGestureDetector detector) {
|
||||
if (GeckoApp.mAppContext == null || GeckoApp.mAppContext.mDOMFullScreen)
|
||||
if (mTarget.isFullScreen())
|
||||
return false;
|
||||
|
||||
if (mState != PanZoomState.PINCHING)
|
||||
|
@ -13,6 +13,7 @@ import android.graphics.PointF;
|
||||
public interface PanZoomTarget {
|
||||
public ImmutableViewportMetrics getViewportMetrics();
|
||||
public ZoomConstraints getZoomConstraints();
|
||||
public boolean isFullScreen();
|
||||
|
||||
public void setAnimationTarget(ImmutableViewportMetrics viewport);
|
||||
public void setViewportMetrics(ImmutableViewportMetrics viewport);
|
||||
|
Loading…
Reference in New Issue
Block a user