mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Merge birch to m-c.
This commit is contained in:
commit
8fdb4e50eb
@ -235,7 +235,13 @@ let FormAssistant = {
|
||||
|
||||
this._documentEncoder = null;
|
||||
if (this._editor) {
|
||||
this._editor.removeEditorObserver(this);
|
||||
// When the nsIFrame of the input element is reconstructed by
|
||||
// CSS restyling, the editor observers are removed. Catch
|
||||
// [nsIEditor.removeEditorObserver] failure exception if that
|
||||
// happens.
|
||||
try {
|
||||
this._editor.removeEditorObserver(this);
|
||||
} catch (e) {}
|
||||
this._editor = null;
|
||||
}
|
||||
|
||||
|
@ -61,6 +61,15 @@ DirectoryProvider.prototype = {
|
||||
persistent.value = true;
|
||||
return file;
|
||||
}
|
||||
if (prop == "ProfD") {
|
||||
let dir = Cc["@mozilla.org/file/local;1"]
|
||||
.createInstance(Ci.nsILocalFile);
|
||||
dir.initWithPath(LOCAL_DIR+"/tests/profile");
|
||||
if (dir.exists()) {
|
||||
persistent.value = true;
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
if (prop == "coreAppsDir") {
|
||||
let file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile)
|
||||
file.initWithPath("/system/b2g");
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"revision": "37d94f0bacee10e768aca70b2ea6acab378ebed5",
|
||||
"revision": "c59267134f80ccb38353a46c51b210009dba0391",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -1649,7 +1649,7 @@ TabChild::RecvMouseEvent(const nsString& aType,
|
||||
const int32_t& aModifiers,
|
||||
const bool& aIgnoreRootScrollFrame)
|
||||
{
|
||||
DispatchMouseEvent(aType, aX, aY, aButton, aClickCount, aModifiers,
|
||||
DispatchMouseEvent(aType, CSSPoint(aX, aY), aButton, aClickCount, aModifiers,
|
||||
aIgnoreRootScrollFrame);
|
||||
return true;
|
||||
}
|
||||
@ -1672,14 +1672,14 @@ TabChild::RecvMouseWheelEvent(const WheelEvent& event)
|
||||
|
||||
void
|
||||
TabChild::DispatchSynthesizedMouseEvent(uint32_t aMsg, uint64_t aTime,
|
||||
const nsIntPoint& aRefPoint)
|
||||
const LayoutDevicePoint& aRefPoint)
|
||||
{
|
||||
MOZ_ASSERT(aMsg == NS_MOUSE_MOVE || aMsg == NS_MOUSE_BUTTON_DOWN ||
|
||||
aMsg == NS_MOUSE_BUTTON_UP);
|
||||
|
||||
nsMouseEvent event(true, aMsg, NULL,
|
||||
nsMouseEvent::eReal, nsMouseEvent::eNormal);
|
||||
event.refPoint = aRefPoint;
|
||||
event.refPoint = nsIntPoint(aRefPoint.x, aRefPoint.y);
|
||||
event.time = aTime;
|
||||
event.button = nsMouseEvent::eLeftButton;
|
||||
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
|
||||
@ -1735,7 +1735,7 @@ TabChild::UpdateTapState(const nsTouchEvent& aEvent, nsEventStatus aStatus)
|
||||
}
|
||||
|
||||
Touch* touch = static_cast<Touch*>(aEvent.touches[0].get());
|
||||
mGestureDownPoint = touch->mRefPoint;
|
||||
mGestureDownPoint = LayoutDevicePoint(touch->mRefPoint.x, touch->mRefPoint.y);
|
||||
mActivePointerId = touch->mIdentifier;
|
||||
if (sClickHoldContextMenusEnabled) {
|
||||
MOZ_ASSERT(!mTapHoldTimer);
|
||||
@ -1757,7 +1757,7 @@ TabChild::UpdateTapState(const nsTouchEvent& aEvent, nsEventStatus aStatus)
|
||||
return;
|
||||
}
|
||||
|
||||
nsIntPoint currentPoint = trackedTouch->mRefPoint;
|
||||
LayoutDevicePoint currentPoint = LayoutDevicePoint(trackedTouch->mRefPoint.x, trackedTouch->mRefPoint.y);
|
||||
int64_t time = aEvent.time;
|
||||
switch (aEvent.message) {
|
||||
case NS_TOUCH_MOVE:
|
||||
@ -1786,9 +1786,15 @@ TabChild::UpdateTapState(const nsTouchEvent& aEvent, nsEventStatus aStatus)
|
||||
void
|
||||
TabChild::FireContextMenuEvent()
|
||||
{
|
||||
double scale;
|
||||
GetDefaultScale(&scale);
|
||||
if (scale < 0) {
|
||||
scale = 1;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mTapHoldTimer && mActivePointerId >= 0);
|
||||
bool defaultPrevented = DispatchMouseEvent(NS_LITERAL_STRING("contextmenu"),
|
||||
mGestureDownPoint.x, mGestureDownPoint.y,
|
||||
mGestureDownPoint / CSSToLayoutDeviceScale(scale),
|
||||
2 /* Right button */,
|
||||
1 /* Click count */,
|
||||
0 /* Modifiers */,
|
||||
@ -2278,8 +2284,7 @@ TabChild::IsAsyncPanZoomEnabled()
|
||||
|
||||
bool
|
||||
TabChild::DispatchMouseEvent(const nsString& aType,
|
||||
const float& aX,
|
||||
const float& aY,
|
||||
const CSSPoint& aPoint,
|
||||
const int32_t& aButton,
|
||||
const int32_t& aClickCount,
|
||||
const int32_t& aModifiers,
|
||||
@ -2289,7 +2294,7 @@ TabChild::DispatchMouseEvent(const nsString& aType,
|
||||
NS_ENSURE_TRUE(utils, true);
|
||||
|
||||
bool defaultPrevented = false;
|
||||
utils->SendMouseEvent(aType, aX, aY, aButton, aClickCount, aModifiers,
|
||||
utils->SendMouseEvent(aType, aPoint.x, aPoint.y, aButton, aClickCount, aModifiers,
|
||||
aIgnoreRootScrollFrame, 0, 0, &defaultPrevented);
|
||||
return defaultPrevented;
|
||||
}
|
||||
|
@ -309,8 +309,7 @@ public:
|
||||
* the event.
|
||||
*/
|
||||
bool DispatchMouseEvent(const nsString& aType,
|
||||
const float& aX,
|
||||
const float& aY,
|
||||
const CSSPoint& aPoint,
|
||||
const int32_t& aButton,
|
||||
const int32_t& aClickCount,
|
||||
const int32_t& aModifiers,
|
||||
@ -407,7 +406,7 @@ private:
|
||||
const nsACString& aJSONData);
|
||||
|
||||
void DispatchSynthesizedMouseEvent(uint32_t aMsg, uint64_t aTime,
|
||||
const nsIntPoint& aRefPoint);
|
||||
const LayoutDevicePoint& aRefPoint);
|
||||
|
||||
// These methods are used for tracking synthetic mouse events
|
||||
// dispatched for compatibility. On each touch event, we
|
||||
@ -445,7 +444,7 @@ private:
|
||||
ScreenIntSize mInnerSize;
|
||||
// When we're tracking a possible tap gesture, this is the "down"
|
||||
// point of the touchstart.
|
||||
nsIntPoint mGestureDownPoint;
|
||||
LayoutDevicePoint mGestureDownPoint;
|
||||
// The touch identifier of the active gesture.
|
||||
int32_t mActivePointerId;
|
||||
// A timer task that fires if the tap-hold timeout is exceeded by
|
||||
|
@ -4632,6 +4632,15 @@ RIL[REQUEST_GET_IMSI] = function REQUEST_GET_IMSI(length, options) {
|
||||
options.rilMessageType = "iccimsi";
|
||||
options.imsi = this.iccInfoPrivate.imsi;
|
||||
this.sendDOMMessage(options);
|
||||
|
||||
if (this._isCdma) {
|
||||
let mccMnc = ICCUtilsHelper.parseMccMncFromImsi(this.iccInfoPrivate.imsi);
|
||||
if (mccMnc) {
|
||||
this.iccInfo.mcc = mccMnc.mcc;
|
||||
this.iccInfo.mnc = mccMnc.mnc;
|
||||
ICCUtilsHelper.handleICCInfoChange();
|
||||
}
|
||||
}
|
||||
};
|
||||
RIL[REQUEST_HANGUP] = function REQUEST_HANGUP(length, options) {
|
||||
if (options.rilRequestError) {
|
||||
@ -10343,20 +10352,12 @@ let ICCRecordHelper = {
|
||||
debug("AD: " + str);
|
||||
}
|
||||
|
||||
let imsi = RIL.iccInfoPrivate.imsi;
|
||||
if (imsi) {
|
||||
// MCC is the first 3 digits of IMSI.
|
||||
RIL.iccInfo.mcc = imsi.substr(0,3);
|
||||
// The 4th byte of the response is the length of MNC.
|
||||
let mncLength = ad && ad[3];
|
||||
if (!mncLength) {
|
||||
// If response dose not contain the length of MNC, check the MCC table
|
||||
// to decide the length of MNC.
|
||||
let index = MCC_TABLE_FOR_MNC_LENGTH_IS_3.indexOf(RIL.iccInfo.mcc);
|
||||
mncLength = (index !== -1) ? 3 : 2;
|
||||
}
|
||||
RIL.iccInfo.mnc = imsi.substr(3, mncLength);
|
||||
if (DEBUG) debug("MCC: " + RIL.iccInfo.mcc + " MNC: " + RIL.iccInfo.mnc);
|
||||
// The 4th byte of the response is the length of MNC.
|
||||
let mccMnc = ICCUtilsHelper.parseMccMncFromImsi(RIL.iccInfoPrivate.imsi,
|
||||
ad && ad[3]);
|
||||
if (mccMnc) {
|
||||
RIL.iccInfo.mcc = mccMnc.mcc;
|
||||
RIL.iccInfo.mnc = mccMnc.mnc;
|
||||
ICCUtilsHelper.handleICCInfoChange();
|
||||
}
|
||||
}
|
||||
@ -11633,6 +11634,36 @@ let ICCUtilsHelper = {
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Parse MCC/MNC from IMSI. If there is no available value for the length of
|
||||
* mnc, it will use the data in MCC table to parse.
|
||||
*
|
||||
* @param imsi
|
||||
* The imsi of icc.
|
||||
* @param mncLength [optional]
|
||||
* The length of mnc.
|
||||
*
|
||||
* @return An object contains the parsing result of mcc and mnc.
|
||||
* Or null if any error occurred.
|
||||
*/
|
||||
parseMccMncFromImsi: function parseMccMncFromImsi(imsi, mncLength) {
|
||||
if (!imsi) {
|
||||
return;
|
||||
}
|
||||
|
||||
// MCC is the first 3 digits of IMSI.
|
||||
let mcc = imsi.substr(0,3);
|
||||
if (!mncLength) {
|
||||
// Check the MCC table to decide the length of MNC.
|
||||
let index = MCC_TABLE_FOR_MNC_LENGTH_IS_3.indexOf(mcc);
|
||||
mncLength = (index !== -1) ? 3 : 2;
|
||||
}
|
||||
let mnc = imsi.substr(3, mncLength);
|
||||
if (DEBUG) debug("IMSI: " + imsi + " MCC: " + mcc + " MNC: " + mnc);
|
||||
|
||||
return { mcc: mcc, mnc: mnc};
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -2632,6 +2632,41 @@ add_test(function test_unlock_card_lock_corporateLocked() {
|
||||
* Verify MCC and MNC parsing
|
||||
*/
|
||||
add_test(function test_mcc_mnc_parsing() {
|
||||
let worker = newUint8Worker();
|
||||
let helper = worker.ICCUtilsHelper;
|
||||
|
||||
function do_test(imsi, mncLength, expectedMcc, expectedMnc) {
|
||||
let result = helper.parseMccMncFromImsi(imsi, mncLength);
|
||||
|
||||
if (!imsi) {
|
||||
do_check_eq(result, null);
|
||||
return;
|
||||
}
|
||||
|
||||
do_check_eq(result.mcc, expectedMcc);
|
||||
do_check_eq(result.mnc, expectedMnc);
|
||||
}
|
||||
|
||||
// Test the imsi is null.
|
||||
do_test(null, null, null, null);
|
||||
|
||||
// Test MCC is Taiwan
|
||||
do_test("466923202422409", 0x02, "466", "92");
|
||||
do_test("466923202422409", 0x03, "466", "923");
|
||||
do_test("466923202422409", null, "466", "92");
|
||||
|
||||
// Test MCC is US
|
||||
do_test("310260542718417", 0x02, "310", "26");
|
||||
do_test("310260542718417", 0x03, "310", "260");
|
||||
do_test("310260542718417", null, "310", "260");
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
|
||||
/**
|
||||
* Verify reading EF_AD and parsing MCC/MNC
|
||||
*/
|
||||
add_test(function test_reading_ad_and_parsing_mcc_mnc() {
|
||||
let worker = newUint8Worker();
|
||||
let record = worker.ICCRecordHelper;
|
||||
let helper = worker.GsmPDUHelper;
|
||||
|
@ -45,6 +45,7 @@ function testSendMMI(mmi, error) {
|
||||
|
||||
do_print("worker.postMessage " + worker.postMessage);
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: mmi});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -338,6 +339,7 @@ function setCallForwardSuccess(mmi) {
|
||||
});
|
||||
};
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: mmi});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -384,6 +386,7 @@ add_test(function test_sendMMI_call_forwarding_interrogation() {
|
||||
});
|
||||
};
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: "*#21#"});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -413,6 +416,7 @@ add_test(function test_sendMMI_call_forwarding_interrogation_no_rules() {
|
||||
});
|
||||
};
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: "*#21#"});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -476,6 +480,7 @@ add_test(function test_sendMMI_change_PIN() {
|
||||
});
|
||||
}
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: "**04*1234*4567*4567#"});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -520,6 +525,7 @@ add_test(function test_sendMMI_change_PIN2() {
|
||||
});
|
||||
}
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: "**042*1234*4567*4567#"});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -564,6 +570,7 @@ add_test(function test_sendMMI_unblock_PIN() {
|
||||
});
|
||||
}
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: "**05*1234*4567*4567#"});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -608,6 +615,7 @@ add_test(function test_sendMMI_unblock_PIN2() {
|
||||
});
|
||||
}
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: "**052*1234*4567*4567#"});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -712,6 +720,7 @@ add_test(function test_sendMMI_USSD() {
|
||||
});
|
||||
}
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: "*123#"});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
@ -736,6 +745,7 @@ add_test(function test_sendMMI_USSD_error() {
|
||||
});
|
||||
}
|
||||
|
||||
worker.RIL.radioState = GECKO_RADIOSTATE_READY;
|
||||
worker.RIL.sendMMI({mmi: "*123#"});
|
||||
|
||||
let postedMessage = workerhelper.postedMessage;
|
||||
|
@ -53,10 +53,6 @@
|
||||
"content/events/test/test_continuous_wheel_events.html":"",
|
||||
"content/events/test/test_dom_wheel_event.html":"",
|
||||
"content/html/content/test/forms/test_input_file_picker.html":"",
|
||||
"content/html/content/test/forms/test_max_attribute.html":"",
|
||||
"content/html/content/test/forms/test_min_attribute.html":"",
|
||||
"content/html/content/test/forms/test_required_attribute.html":"",
|
||||
"content/html/content/test/forms/test_step_attribute.html":"",
|
||||
"content/html/content/test/forms/test_validation.html":"",
|
||||
"content/html/content/test/test_bug209275.xhtml":"",
|
||||
"content/html/content/test/test_bug430351.html":"",
|
||||
@ -64,8 +60,6 @@
|
||||
"content/html/content/test/test_bug481335.xhtml":"",
|
||||
"content/html/content/test/test_bug523771.html":"",
|
||||
"content/html/content/test/test_bug561636.html":"",
|
||||
"content/html/content/test/test_bug590353-2.html":"",
|
||||
"content/html/content/test/test_bug598643.html":"",
|
||||
"content/html/content/test/test_bug612730.html":"",
|
||||
"content/html/content/test/test_bug613113.html":"",
|
||||
"content/html/content/test/test_bug615833.html":"",
|
||||
@ -102,7 +96,6 @@
|
||||
"content/base/test/test_bug166235.html":"",
|
||||
"content/base/test/test_bug326337.html":"",
|
||||
"content/base/test/test_bug330925.xhtml":"",
|
||||
"content/base/test/test_bug403852.html":"",
|
||||
"content/base/test/test_bug419527.xhtml":"",
|
||||
"content/base/test/test_bug422403-1.html":"",
|
||||
"content/base/test/test_bug422537.html":"",
|
||||
@ -122,7 +115,6 @@
|
||||
"content/base/test/test_child_process_shutdown_message.html":"",
|
||||
"content/base/test/test_copypaste.html":"",
|
||||
"content/base/test/test_csp_redirects.html":"",
|
||||
"content/base/test/test_fileapi.html":"",
|
||||
"content/base/test/test_fileapi_slice.html":"",
|
||||
"content/base/test/test_messagemanager_assertpermission.html":"",
|
||||
"content/base/test/test_mixed_content_blocker.html":"",
|
||||
|
Loading…
Reference in New Issue
Block a user