Merge b2g-inbound to m-c

This commit is contained in:
Wes Kocher 2013-10-22 17:59:54 -04:00
commit b1e7c3445b
22 changed files with 156 additions and 143 deletions

View File

@ -749,7 +749,7 @@ pref("memory_info_dumper.watch_fifo.directory", "/data/local");
pref("general.useragent.enable_overrides", true);
// See ua-update.json.in for the packaged UA override list
pref("general.useragent.updates.enabled", true);
pref("general.useragent.updates.url", "");
pref("general.useragent.updates.url", "https://dynamicua.cdn.mozilla.net/0/%APP_ID%");
pref("general.useragent.updates.interval", 604800); // 1 week
pref("general.useragent.updates.retry", 86400); // 1 day

View File

@ -3,12 +3,8 @@
// Send these sites a custom user-agent. Bugs to remove each override after
// evangelism are included.
{
// bug 802981, maps.google.com
"maps.google.com": "\\(Mobile#(Android; Mobile",
// bug 826330, uol.com.br
"uol.com.br": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826332, live.com
"live.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 826335, globo.com
"globo.com": "\\(Mobile#(Android; Mobile",
// bug 826338, yahoo.com
@ -41,8 +37,6 @@
"noticias.uol.com.br": "\\(Mobile#(Android; Mobile",
// bug 826720, olx.com.br
"olx.com.br": "\\(Mobile#(Android; Mobile",
// bug 826736, bancobrasil.com.br
"bancobrasil.com.br": "\\(Mobile#(Android; Mobile",
// bug 826845, techtudo.com.br
"techtudo.com.br": "\\(Mobile#(Android; Mobile",
// bug 826958, ebay.com
@ -95,8 +89,6 @@
"money.pl": "\\(Mobile#(Android; Mobile",
// bug 828371, ingbank.pl
"ingbank.pl": "\\(Mobile#(Android; Mobile",
// bug 828376, plotek.pl
"plotek.pl": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 828378, wyborcza.pl
"wyborcza.pl": "\\(Mobile#(Android; Mobile",
// bug 828380, deser.pl
@ -131,10 +123,6 @@
"bumeran.com.ve": "\\(Mobile#(Android; Mobile",
// bug 828448, petardas.com
"petardas.com": "\\(Mobile#(Android; Mobile",
// bug 827869, mail.google.com
"mail.google.com": "\\(Mobile#(Android; Mobile",
// bug 843109, enfemenino.com
"enfemenino.com": "\\(Mobile#(Android; Mobile",
// bug 843112, movil.bankinter.es
"movil.bankinter.es": "\\(Mobile#(Android; Mobile",
// bug 843114, einforma.com
@ -155,18 +143,12 @@
"iphonejuegosgratis.com": "\\(Mobile#(Android; Mobile",
// bug 843132, comunio.es
"comunio.es": "\\(Mobile#(Android; Mobile",
// bug 843134, news.google.com
"news.google.com": "\\(Mobile#(Android; Mobile",
// bug 843136, deviantart.com
"deviantart.com": "\\(Mobile#(Android; Mobile",
// bug 843137, nytimes.com
"nytimes.com": "\\(Mobile#(Android; Mobile",
// bug 843139, consumersearch.com
"consumersearch.com": "\\(Mobile#(Android; Mobile",
// bug 843141, foodily.com
"foodily.com": "\\(Mobile#(Android; Mobile",
// bug 843197, icanhas.cheezburger.com
"icanhas.cheezburger.com": "\\(Mobile#(Android; Mobile",
// bug 843151, citibank.com
"citibank.com": "\\(Mobile#(Android; Mobile",
// bug 843153, games.com
@ -225,8 +207,6 @@
"vatera.hu": "\\(Mobile#(Android; Mobile",
// bug 878255, 24sata.hr
"24sata.hr": "\\(Mobile#(Android; Mobile",
// bug 878256, bet365.com
"bet365.com": "\\(Mobile#(Android; Mobile",
// bug 878258, blackhatteam.com
"blackhatteam.com": "\\(Mobile#(Android; Mobile",
// bug 878260, cdm.me
@ -255,8 +235,6 @@
"banorte.com": "\\(Mobile#(Android; Mobile",
// bug 878634, buenastareas.com
"buenastareas.com": "\\(Mobile#(Android; Mobile",
// bug 878635, cnn.com
"cnn.com": "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19",
// bug 878637, eluniversal.com.mx
"eluniversal.com.mx": "\\(Mobile#(Android; Mobile",
// bug 878640, hootsuite.com

View File

@ -1,4 +1,4 @@
{
"revision": "175b7a89aa5f39aa2b2263029ab086ac1833a636",
"revision": "ef355aa8244d698a5b226ac4ef2408a2eb0812bb",
"repo_path": "/integration/gaia-central"
}

View File

@ -175,13 +175,6 @@
@BINPATH@/components/dom_apps.xpt
@BINPATH@/components/dom_base.xpt
@BINPATH@/components/dom_system.xpt
#ifdef MOZ_B2G_RIL
@BINPATH@/components/dom_voicemail.xpt
@BINPATH@/components/dom_wifi.xpt
@BINPATH@/components/dom_system_gonk.xpt
@BINPATH@/components/dom_icc.xpt
@BINPATH@/components/dom_wappush.xpt
#endif
#ifdef MOZ_B2G_BT
@BINPATH@/components/dom_bluetooth.xpt
#endif
@ -446,19 +439,6 @@
@BINPATH@/components/contentSecurityPolicy.js
@BINPATH@/components/contentAreaDropListener.manifest
@BINPATH@/components/contentAreaDropListener.js
#ifdef MOZ_B2G_RIL
@BINPATH@/components/RadioInterfaceLayer.manifest
@BINPATH@/components/RadioInterfaceLayer.js
@BINPATH@/components/MmsService.manifest
@BINPATH@/components/MmsService.js
@BINPATH@/components/RILContentHelper.js
@BINPATH@/components/MobileMessageDatabaseService.manifest
@BINPATH@/components/MobileMessageDatabaseService.js
@BINPATH@/components/WifiWorker.js
@BINPATH@/components/WifiWorker.manifest
@BINPATH@/components/DOMWifiManager.js
@BINPATH@/components/DOMWifiManager.manifest
#endif
@BINPATH@/browser/components/BrowserProfileMigrators.manifest
@BINPATH@/browser/components/ProfileMigrator.js
@BINPATH@/browser/components/ChromeProfileMigrator.js

View File

@ -37,9 +37,10 @@
#include "nsDOMEvent.h"
#include "nsGlobalWindow.h"
#ifdef MOZ_B2G_RIL
#include "IccManager.h"
#include "mozilla/dom/IccManager.h"
#include "MobileConnection.h"
#include "mozilla/dom/CellBroadcast.h"
#include "mozilla/dom/Telephony.h"
#include "mozilla/dom/Voicemail.h"
#endif
#include "nsIIdleObserver.h"
@ -53,9 +54,6 @@
#ifdef MOZ_MEDIA_NAVIGATOR
#include "MediaManager.h"
#endif
#ifdef MOZ_B2G_RIL
#include "mozilla/dom/Telephony.h"
#endif
#ifdef MOZ_B2G_BT
#include "BluetoothManager.h"
#endif
@ -140,15 +138,13 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(Navigator)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBatteryManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPowerManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileMessageManager)
#ifdef MOZ_B2G_RIL
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVoicemail)
#endif
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConnection)
#ifdef MOZ_B2G_RIL
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMobileConnection)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCellBroadcast)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIccManager)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mTelephony)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mVoicemail)
#endif
#ifdef MOZ_B2G_BT
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mBluetooth)
@ -213,16 +209,6 @@ Navigator::Invalidate()
mMobileMessageManager = nullptr;
}
#ifdef MOZ_B2G_RIL
if (mTelephony) {
mTelephony = nullptr;
}
if (mVoicemail) {
mVoicemail = nullptr;
}
#endif
if (mConnection) {
mConnection->Shutdown();
mConnection = nullptr;
@ -242,6 +228,14 @@ Navigator::Invalidate()
mIccManager->Shutdown();
mIccManager = nullptr;
}
if (mTelephony) {
mTelephony = nullptr;
}
if (mVoicemail) {
mVoicemail = nullptr;
}
#endif
#ifdef MOZ_B2G_BT
@ -1229,7 +1223,7 @@ Navigator::GetMozIccManager(ErrorResult& aRv)
}
NS_ENSURE_TRUE(mWindow->GetDocShell(), nullptr);
mIccManager = new icc::IccManager();
mIccManager = new IccManager();
mIccManager->Init(mWindow);
}

View File

@ -70,12 +70,6 @@ class NavigatorUserMediaErrorCallback;
class MozGetUserMediaDevicesSuccessCallback;
#endif // MOZ_MEDIA_NAVIGATOR
namespace icc {
#ifdef MOZ_B2G_RIL
class IccManager;
#endif
}
namespace network {
class Connection;
#ifdef MOZ_B2G_RIL
@ -91,6 +85,7 @@ class BluetoothManager;
#ifdef MOZ_B2G_RIL
class CellBroadcast;
class IccManager;
class Telephony;
class Voicemail;
#endif
@ -331,15 +326,13 @@ private:
#endif
nsRefPtr<PowerManager> mPowerManager;
nsRefPtr<MobileMessageManager> mMobileMessageManager;
#ifdef MOZ_B2G_RIL
nsRefPtr<Telephony> mTelephony;
nsRefPtr<Voicemail> mVoicemail;
#endif
nsRefPtr<network::Connection> mConnection;
#ifdef MOZ_B2G_RIL
nsRefPtr<network::MobileConnection> mMobileConnection;
nsRefPtr<CellBroadcast> mCellBroadcast;
nsRefPtr<icc::IccManager> mIccManager;
nsRefPtr<IccManager> mIccManager;
nsRefPtr<Telephony> mTelephony;
nsRefPtr<Voicemail> mVoicemail;
#endif
#ifdef MOZ_B2G_BT
nsCOMPtr<bluetooth::BluetoothManager> mBluetooth;

View File

@ -783,8 +783,7 @@ DOMInterfaces = {
},
'MozStkCommandEvent' : {
'nativeType': 'mozilla::dom::icc::StkCommandEvent',
'headerFile': 'StkCommandEvent.h',
'nativeType': 'mozilla::dom::StkCommandEvent',
},
'MozTimeManager': {
@ -1872,4 +1871,4 @@ addExternalIface('CameraReleaseCallback', nativeType='nsICameraReleaseCallback',
addExternalIface('CameraStartRecordingCallback', nativeType='nsICameraStartRecordingCallback', headerFile='nsIDOMCameraManager.h')
addExternalIface('CameraPreviewStateChange', nativeType='nsICameraPreviewStateChange', headerFile='nsIDOMCameraManager.h')
addExternalIface('CameraPreviewStreamCallback', nativeType='nsICameraPreviewStreamCallback', headerFile='nsIDOMCameraManager.h')
addExternalIface('CameraRecorderStateChange', nativeType='nsICameraRecorderStateChange', headerFile='nsIDOMCameraManager.h')
addExternalIface('CameraRecorderStateChange', nativeType='nsICameraRecorderStateChange', headerFile='nsIDOMCameraManager.h')

View File

@ -95,12 +95,6 @@ LOCAL_INCLUDES += \
$(NULL)
endif
ifdef MOZ_B2G_RIL
LOCAL_INCLUDES += \
-I$(topsrcdir)/dom/icc/src \
$(NULL)
endif
ABS_DIST := $(abspath $(DIST))
EXTRA_EXPORT_MDDEPEND_FILES := $(addsuffix .pp,$(binding_dependency_trackers))

View File

@ -41,7 +41,6 @@ ifdef MOZ_B2G_RIL
DOM_SRCDIRS += \
dom/system/gonk \
dom/wifi \
dom/icc/src \
$(NULL)
endif

View File

@ -623,6 +623,23 @@ dictionary MozStkLanguageSelectionEvent
DOMString language;
};
dictionary MozStkBrowserTerminationEvent
{
/**
* The type of this event.
* It shall be nsIDOMMozIccManager.STK_EVENT_TYPE_BROWSER_TERMINATION
*/
unsigned short eventType;
/**
* This object shall contain the browser termination cause.
* See TZ 102 223 8.51. It shall be one of following:
* - nsIDOMMozIccManager.STK_BROWSER_TERMINATION_CAUSE_USER
* - nsIDOMMozIccManager.STK_BROWSER_TERMINATION_CAUSE_ERROR
*/
unsigned short terminationCause;
};
dictionary MozStkGeneralEvent
{
/**

View File

@ -9,7 +9,7 @@ interface nsIDOMDOMRequest;
interface nsIDOMEventListener;
interface nsIDOMMozIccInfo;
[scriptable, builtinclass, uuid(6b5875dc-de44-4681-84a1-9ea12d60fbe2)]
[scriptable, builtinclass, uuid(b403e307-e4ff-47a0-ac1e-c97b042b4595)]
interface nsIDOMMozIccManager : nsIDOMEventTarget
{
/**
@ -215,6 +215,12 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget
const unsigned short STK_TIMER_DEACTIVATE = 0x01;
const unsigned short STK_TIMER_GET_CURRENT_VALUE = 0x02;
/**
* Browser Termination Cause
*/
const unsigned short STK_BROWSER_TERMINATION_CAUSE_USER = 0x00;
const unsigned short STK_BROWSER_TERMINATION_CAUSE_ERROR = 0x01;
/**
* Send the response back to ICC after an attempt to execute STK Proactive
* Command.
@ -260,6 +266,7 @@ interface nsIDOMMozIccManager : nsIDOMEventTarget
* - MozStkCallEvent
* - MozStkLanguageSelectionEvent
* - MozStkGeneralEvent
* - MozStkBrowserTerminationEvent
*/
void sendStkEventDownload(in jsval event);

View File

@ -2,17 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/dom/IccManager.h"
#include "GeneratedEvents.h"
#include "mozilla/dom/StkCommandEvent.h"
#include "mozilla/Services.h"
#include "nsIDOMClassInfo.h"
#include "nsIDOMIccInfo.h"
#include "GeneratedEvents.h"
#include "IccManager.h"
#include "SimToolKit.h"
#include "StkCommandEvent.h"
#define NS_RILCONTENTHELPER_CONTRACTID "@mozilla.org/ril/content-helper;1"
using namespace mozilla::dom::icc;
using namespace mozilla::dom;
class IccManager::Listener : public nsIIccListener
{
@ -38,7 +39,7 @@ public:
NS_IMPL_ISUPPORTS1(IccManager::Listener, nsIIccListener)
DOMCI_DATA(MozIccManager, mozilla::dom::icc::IccManager)
DOMCI_DATA(MozIccManager, IccManager)
NS_INTERFACE_MAP_BEGIN(IccManager)
NS_INTERFACE_MAP_ENTRY(nsIDOMMozIccManager)
@ -277,4 +278,4 @@ NS_IMETHODIMP
IccManager::NotifyIccInfoChanged()
{
return DispatchTrustedEvent(NS_LITERAL_STRING("iccinfochange"));
}
}

View File

@ -2,8 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_icc_IccManager_h
#define mozilla_dom_icc_IccManager_h
#ifndef mozilla_dom_IccManager_h
#define mozilla_dom_IccManager_h
#include "nsCycleCollectionParticipant.h"
#include "nsDOMEventTargetHelper.h"
@ -12,7 +12,6 @@
namespace mozilla {
namespace dom {
namespace icc {
class IccManager : public nsDOMEventTargetHelper
, public nsIDOMMozIccManager
@ -42,8 +41,7 @@ private:
nsRefPtr<Listener> mListener;
};
} // namespace icc
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_icc_IccManager_h
#endif // mozilla_dom_IccManager_h

View File

@ -2,19 +2,18 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "SimToolKit.h"
#include "StkCommandEvent.h"
#include "mozilla/dom/StkCommandEvent.h"
#include "nsJSON.h"
#include "jsapi.h"
#include "jsfriendapi.h"
#include "nsJSON.h"
#include "SimToolKit.h"
namespace mozilla {
namespace dom {
namespace icc {
already_AddRefed<StkCommandEvent>
StkCommandEvent::Create(mozilla::dom::EventTarget* aOwner,
StkCommandEvent::Create(EventTarget* aOwner,
const nsAString& aMessage)
{
nsRefPtr<StkCommandEvent> event = new StkCommandEvent(aOwner);
@ -45,6 +44,5 @@ StkCommandEvent::GetCommand(JSContext* aCx, JS::Value* aCommand)
return NS_OK;
}
}
}
}
} // namespace dom
} // namespace mozilla

View File

@ -2,16 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_icc_stkcommandevent_h
#define mozilla_dom_icc_stkcommandevent_h
#ifndef mozilla_dom_StkCommandEvent_h
#define mozilla_dom_StkCommandEvent_h
#include "mozilla/dom/MozStkCommandEventBinding.h"
#include "nsDOMEvent.h"
#include "SimToolKit.h"
#include "mozilla/dom/MozStkCommandEventBinding.h"
namespace mozilla {
namespace dom {
namespace icc {
class StkCommandEvent : public nsDOMEvent,
public nsIDOMMozStkCommandEvent
@ -49,10 +48,10 @@ public:
virtual JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE
{
return mozilla::dom::MozStkCommandEventBinding::Wrap(aCx, aScope, this);
return MozStkCommandEventBinding::Wrap(aCx, aScope, this);
}
JS::Value GetCommand(JSContext* aCx, mozilla::ErrorResult& aRv)
JS::Value GetCommand(JSContext* aCx, ErrorResult& aRv)
{
JS::Rooted<JS::Value> retVal(aCx);
aRv = GetCommand(aCx, retVal.address());
@ -60,7 +59,7 @@ public:
}
private:
StkCommandEvent(mozilla::dom::EventTarget* aOwner)
StkCommandEvent(EventTarget* aOwner)
: nsDOMEvent(aOwner, nullptr, nullptr)
{
SetIsDOMBinding();
@ -70,8 +69,7 @@ private:
{ }
};
}
}
}
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_icc_stkcommandevent_h
#endif // mozilla_dom_StkCommandEvent_h

View File

@ -4,7 +4,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
EXPORTS.mozilla.dom.icc += [
EXPORTS.mozilla.dom += [
'IccManager.h',
'StkCommandEvent.h',
]

View File

@ -4,20 +4,11 @@
VPATH = $(srcdir)
ifdef MOZ_B2G_RIL
endif
include $(topsrcdir)/dom/dom-config.mk
LOCAL_INCLUDES = \
-I$(topsrcdir)/content/events/src \
$(NULL)
ifdef MOZ_B2G_RIL
LOCAL_INCLUDES += \
-I$(topsrcdir)/dom/icc/src \
$(NULL)
endif
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -712,6 +712,7 @@ this.COMPREHENSIONTLV_TAG_DATE_TIME_ZONE = 0x26;
this.COMPREHENSIONTLV_TAG_IMMEDIATE_RESPONSE = 0x2b;
this.COMPREHENSIONTLV_TAG_LANGUAGE = 0x2d;
this.COMPREHENSIONTLV_TAG_URL = 0x31;
this.COMPREHENSIONTLV_TAG_BROWSER_TERMINATION_CAUSE = 0x34;
this.COMPREHENSIONTLV_TAG_ACCESS_TECH = 0x3f;
this.COMPREHENSIONTLV_TAG_SERVICE_RECORD = 0x41;
this.COMPREHENSIONTLV_TAG_IMEISV = 0x62;
@ -964,6 +965,10 @@ this.STK_TIMER_START = 0x00;
this.STK_TIMER_DEACTIVATE = 0x01;
this.STK_TMIER_GET_CURRENT_VALUE = 0x02;
// Browser Termination Cause.
this.STK_BROWSER_TERMINATION_CAUSE_USER = 0x00;
this.STK_BROWSER_TERMINATION_CAUSE_ERROR = 0x01;
/**
* Supported Terminal Facilities.
*
@ -1016,7 +1021,7 @@ this.STK_TERMINAL_SUPPORT_EVENT_IDLE_SCREEN_AVAILABLE = 1;
this.STK_TERMINAL_SUPPORT_EVENT_CARD_READER_STATUS = 0;
this.STK_TERMINAL_SUPPORT_EVENT_LANGUAGE_SELECTION = 1;
this.STK_TERMINAL_SUPPORT_EVENT_BROWSER_TERMINATION = 0;
this.STK_TERMINAL_SUPPORT_EVENT_BROWSER_TERMINATION = 1;
this.STK_TERMINAL_SUPPORT_EVENT_DATA_AVAILABLE = 0;
this.STK_TERMINAL_SUPPORT_EVENT_CHANNEL_STATUS = 0;

View File

@ -2727,6 +2727,13 @@ let RIL = {
};
command.language = command.event.language;
break;
case STK_EVENT_TYPE_BROWSER_TERMINATION:
command.deviceId = {
sourceId: STK_DEVICE_ID_ME,
destinationId: STK_DEVICE_ID_SIM
};
command.terminationCause = command.event.terminationCause;
break;
}
this.sendICCEnvelopeCommand(command);
},
@ -2746,6 +2753,7 @@ let RIL = {
* @param [optional] cause
* @param [optional] timerId
* @param [optional] timerValue
* @param [optional] terminationCause
*/
sendICCEnvelopeCommand: function sendICCEnvelopeCommand(options) {
if (DEBUG) {
@ -2853,6 +2861,14 @@ let RIL = {
ComprehensionTlvHelper.writeLanguageTlv(options.language);
}
// Browser Termination
if (options.terminationCause != null) {
GsmPDUHelper.writeHexOctet(COMPREHENSIONTLV_TAG_BROWSER_TERMINATION_CAUSE |
COMPREHENSIONTLV_FLAG_CR);
GsmPDUHelper.writeHexOctet(1);
GsmPDUHelper.writeHexOctet(options.terminationCause);
}
// Calculate and write BER length to 2nd mark
Buf.stopCalOutgoingSize();

View File

@ -973,3 +973,60 @@ add_test(function test_stk_event_download_idle_screen_available() {
event: event
});
});
/**
* Verify Event Downloaded Command :Browser Termination
*/
add_test(function test_stk_event_download_browser_termination() {
let worker = newUint8SupportOutgoingIndexWorker();
let buf = worker.Buf;
let pduHelper = worker.GsmPDUHelper;
buf.sendParcel = function () {
// Type
do_check_eq(this.readInt32(), REQUEST_STK_SEND_ENVELOPE_COMMAND);
// Token : we don't care
this.readInt32();
// Data Size, 24 = 2 * ( 2+TLV_DEVICE_ID(4)+TLV_EVENT_LIST_SIZE(3)
// +TLV_BROWSER_TERMINATION_CAUSE(3) )
do_check_eq(this.readInt32(), 24);
// BER tag
do_check_eq(pduHelper.readHexOctet(), BER_EVENT_DOWNLOAD_TAG);
// BER length, 10 = TLV_DEVICE_ID(4)+TLV_EVENT_LIST_SIZE(3)
// ++TLV_BROWSER_TERMINATION_CAUSE(3)
do_check_eq(pduHelper.readHexOctet(), 10);
// Device Identities, Type-Length-Value(Source ID-Destination ID)
do_check_eq(pduHelper.readHexOctet(), COMPREHENSIONTLV_TAG_DEVICE_ID |
COMPREHENSIONTLV_FLAG_CR);
do_check_eq(pduHelper.readHexOctet(), 2);
do_check_eq(pduHelper.readHexOctet(), STK_DEVICE_ID_ME);
do_check_eq(pduHelper.readHexOctet(), STK_DEVICE_ID_SIM);
// Event List, Type-Length-Value
do_check_eq(pduHelper.readHexOctet(), COMPREHENSIONTLV_TAG_EVENT_LIST |
COMPREHENSIONTLV_FLAG_CR);
do_check_eq(pduHelper.readHexOctet(), 1);
do_check_eq(pduHelper.readHexOctet(), STK_EVENT_TYPE_BROWSER_TERMINATION);
// Browser Termination Case, Type-Length-Value
do_check_eq(pduHelper.readHexOctet(), COMPREHENSIONTLV_TAG_BROWSER_TERMINATION_CAUSE |
COMPREHENSIONTLV_FLAG_CR);
do_check_eq(pduHelper.readHexOctet(), 1);
do_check_eq(pduHelper.readHexOctet(), STK_BROWSER_TERMINATION_CAUSE_USER);
run_next_test();
};
let event = {
eventType: STK_EVENT_TYPE_BROWSER_TERMINATION,
terminationCause: STK_BROWSER_TERMINATION_CAUSE_USER
};
worker.RIL.sendStkEventDownload({
event: event
});
});

View File

@ -3667,16 +3667,6 @@ nsDisplayScrollLayer::GetScrollLayerCount()
#endif
}
intptr_t
nsDisplayScrollLayer::RemoveScrollLayerCount()
{
intptr_t result = GetScrollLayerCount();
FrameProperties props = mScrolledFrame->Properties();
props.Remove(nsIFrame::ScrollLayerCount());
return result;
}
nsDisplayScrollInfoLayer::nsDisplayScrollInfoLayer(
nsDisplayListBuilder* aBuilder,
nsIFrame* aScrolledFrame,
@ -3688,12 +3678,12 @@ nsDisplayScrollInfoLayer::nsDisplayScrollInfoLayer(
#endif
}
#ifdef NS_BUILD_REFCNT_LOGGING
nsDisplayScrollInfoLayer::~nsDisplayScrollInfoLayer()
{
FrameProperties props = mScrolledFrame->Properties();
props.Remove(nsIFrame::ScrollLayerCount());
MOZ_COUNT_DTOR(nsDisplayScrollInfoLayer);
}
#endif
LayerState
nsDisplayScrollInfoLayer::GetLayerState(nsDisplayListBuilder* aBuilder,
@ -3717,7 +3707,7 @@ nsDisplayScrollInfoLayer::ShouldFlattenAway(nsDisplayListBuilder* aBuilder)
// one nsDisplayScrollLayer (with rendered content) or one
// nsDisplayScrollInfoLayer (with only the metadata) should survive the
// visibility computation.
return RemoveScrollLayerCount() == 1;
return GetScrollLayerCount() == 1;
}
nsDisplayZoom::nsDisplayZoom(nsDisplayListBuilder* aBuilder,

View File

@ -2728,11 +2728,10 @@ public:
// number does not include nsDisplayScrollInfoLayers. If this number is not 1
// after merging, all the nsDisplayScrollLayers should flatten away.
intptr_t GetScrollLayerCount();
intptr_t RemoveScrollLayerCount();
virtual nsIFrame* GetScrolledFrame() { return mScrolledFrame; }
private:
protected:
nsIFrame* mScrollFrame;
nsIFrame* mScrolledFrame;
};
@ -2755,9 +2754,7 @@ public:
nsIFrame* aScrolledFrame, nsIFrame* aScrollFrame);
NS_DISPLAY_DECL_NAME("ScrollInfoLayer", TYPE_SCROLL_INFO_LAYER)
#ifdef NS_BUILD_REFCNT_LOGGING
virtual ~nsDisplayScrollInfoLayer();
#endif
virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
LayerManager* aManager,