Merge m-c to b-i

This commit is contained in:
Phil Ringnalda 2014-08-31 18:44:20 -07:00
commit 9def110412
330 changed files with 771 additions and 896 deletions

View File

@ -22,4 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Skia update needs a CLOBBER on all platforms.
dom/ flattening might need a CLOBBER.

View File

@ -55,8 +55,8 @@ function* navigate(usage, options) {
* Check the expected pages have been visited
*/
function* checkPages(usage) {
// 'load' event order. '' is for the initial location
let expectedVisited = [ '', PAGE_2, PAGE_1, PAGE_3 ];
// 'load' event order. 'null' is for the initial location
let expectedVisited = [ 'null', PAGE_2, PAGE_1, PAGE_3 ];
let actualVisited = yield usage._testOnly_visitedPages();
isEqualJson(actualVisited, expectedVisited, 'Visited');
}

View File

@ -321,16 +321,18 @@ Tools.netMonitor = {
Tools.storage = {
id: "storage",
key: l10n("open.commandkey", storageStrings),
key: l10n("storage.commandkey", storageStrings),
ordinal: 9,
accesskey: l10n("open.accesskey", storageStrings),
accesskey: l10n("storage.accesskey", storageStrings),
modifiers: "shift",
visibilityswitch: "devtools.storage.enabled",
icon: "chrome://browser/skin/devtools/tool-storage.svg",
invertIconForLightTheme: true,
url: "chrome://browser/content/devtools/storage.xul",
label: l10n("storage.label", storageStrings),
tooltip: l10n("storage.tooltip", storageStrings),
menuLabel: l10n("storage.menuLabel", storageStrings),
panelLabel: l10n("storage.panelLabel", storageStrings),
tooltip: l10n("storage.tooltip2", storageStrings),
inMenu: true,
isTargetSupported: function(target) {

View File

@ -9,29 +9,32 @@
# A good criteria is the language in which you'd find the best documentation
# on web development on the web.
# LOCALIZATION NOTE (chromeWindowTitle): This is the title of the Storage
# 'chrome' window. That is, the main window with all the cookies, etc.
# The argument is either the content document's title or its href if no title
# is available.
chromeWindowTitle=Storage [%S]
# LOCALIZATION NOTE (open.commandkey): This the key to use in
# LOCALIZATION NOTE (storage.commandkey): This the key to use in
# conjunction with shift to open the storage editor
open.commandkey=VK_F9
storage.commandkey=VK_F9
# LOCALIZATION NOTE (open.accesskey): The access key used to open the storage
# LOCALIZATION NOTE (storage.accesskey): The access key used to open the storage
# editor.
open.accesskey=d
storage.accesskey=a
# LOCALIZATION NOTE (storage.label):
# This string is displayed in the title of the tab when the storage editor is
# displayed inside the developer tools window and in the Developer Tools Menu.
# This string is displayed as the label of the tab in the developer tools window
storage.label=Storage
# LOCALIZATION NOTE (storage.menuLabel):
# This string is displayed in the Tools menu as a shortcut to open the devtools
# with the Storage Inspector tab selected.
storage.menuLabel=Storage Inspector
# LOCALIZATION NOTE (storage.panelLabel):
# This string is used as the aria-label for the iframe of the Storage Inspector
# tool in developer tools toolbox.
storage.panelLabel=Storage Panel
# LOCALIZATION NOTE (storage.tooltip):
# This string is displayed in the tooltip of the tab when the storage editor is
# displayed inside the developer tools window.
storage.tooltip=Storage Inspector (Cookies, Local Storage ...)
storage.tooltip2=Storage Inspector (Cookies, Local Storage )
# LOCALIZATION NOTE (tree.emptyText):
# This string is displayed when the Storage Tree is empty. This can happen when
@ -59,11 +62,20 @@ table.headers.cookies.path=Path
table.headers.cookies.host=Domain
table.headers.cookies.expires=Expires on
table.headers.cookies.value=Value
table.headers.cookies.lastAccessed:Last accessed on
table.headers.cookies.creationTime:Created on
table.headers.cookies.isHttpOnly:isHttpOnly
table.headers.cookies.isSecure:isSecure
table.headers.cookies.isDomain:isDomain
table.headers.cookies.lastAccessed=Last accessed on
table.headers.cookies.creationTime=Created on
# LOCALIZATION NOTE (table.headers.cookies.isHttpOnly):
# This string is used in the header for the column which denotes whether a
# cookie is HTTP only or not.
table.headers.cookies.isHttpOnly=isHttpOnly
# LOCALIZATION NOTE (table.headers.cookies.isSecure):
# This string is used in the header for the column which denotes whether a
# cookie can be accessed via a secure channel only or not.
table.headers.cookies.isSecure=isSecure
# LOCALIZATION NOTE (table.headers.cookies.isDomain):
# This string is used in the header for the column which denotes whether a
# cookie is a domain cookie only or not.
table.headers.cookies.isDomain=isDomain
table.headers.localStorage.name=Key
table.headers.localStorage.value=Value

View File

@ -1592,7 +1592,6 @@ public:
static nsresult GetUTFOrigin(nsIPrincipal* aPrincipal,
nsString& aOrigin);
static nsresult GetUTFOrigin(nsIURI* aURI, nsString& aOrigin);
static void GetUTFNonNullOrigin(nsIURI* aURI, nsString& aOrigin);
/**
* This method creates and dispatches "command" event, which implements

View File

@ -41,7 +41,9 @@ public:
NS_IMETHOD NewChannel(nsIURI *aURI, nsIChannel * *_retval) MOZ_OVERRIDE;
NS_IMETHOD AllowPort(int32_t port, const char * scheme, bool *_retval) MOZ_OVERRIDE;
// If principal is not null, its origin will be used to generate the URI.
static nsresult GenerateURIString(const nsACString &aScheme,
nsIPrincipal* aPrincipal,
nsACString &aUri);
// Methods for managing uri->object mapping

View File

@ -282,7 +282,7 @@ Link::GetOrigin(nsAString &aOrigin, ErrorResult& aError)
}
nsString origin;
nsContentUtils::GetUTFNonNullOrigin(uri, origin);
nsContentUtils::GetUTFOrigin(uri, origin);
aOrigin.Assign(origin);
}

View File

@ -5830,19 +5830,6 @@ nsContentUtils::GetUTFOrigin(nsIURI* aURI, nsString& aOrigin)
return NS_OK;
}
/* static */
void
nsContentUtils::GetUTFNonNullOrigin(nsIURI* aURI, nsString& aOrigin)
{
aOrigin.Truncate();
nsString origin;
nsresult rv = GetUTFOrigin(aURI, origin);
if (NS_SUCCEEDED(rv) && !origin.EqualsLiteral("null")) {
aOrigin.Assign(origin);
}
}
/* static */
nsIDocument*
nsContentUtils::GetDocumentFromScriptContext(nsIScriptContext *aScriptContext)

View File

@ -301,7 +301,7 @@ nsHostObjectProtocolHandler::AddDataEntry(const nsACString& aScheme,
{
Init();
nsresult rv = GenerateURIString(aScheme, aUri);
nsresult rv = GenerateURIString(aScheme, aPrincipal, aUri);
NS_ENSURE_SUCCESS(rv, rv);
if (!gDataTable) {
@ -340,6 +340,7 @@ nsHostObjectProtocolHandler::RemoveDataEntry(const nsACString& aUri)
nsresult
nsHostObjectProtocolHandler::GenerateURIString(const nsACString &aScheme,
nsIPrincipal* aPrincipal,
nsACString& aUri)
{
nsresult rv;
@ -354,8 +355,20 @@ nsHostObjectProtocolHandler::GenerateURIString(const nsACString &aScheme,
char chars[NSID_LENGTH];
id.ToProvidedString(chars);
aUri += aScheme;
aUri += NS_LITERAL_CSTRING(":");
aUri = aScheme;
aUri.Append(':');
if (aPrincipal) {
nsAutoString origin;
rv = nsContentUtils::GetUTFOrigin(aPrincipal, origin);
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
AppendUTF16toUTF8(origin, aUri);
aUri.Append('/');
}
aUri += Substring(chars + 1, chars + NSID_LENGTH - 2);
return NS_OK;

View File

@ -508,6 +508,10 @@ MediaStreamGraphImpl::UpdateStreamOrder()
stream->AsSourceStream()->NeedsMixing()) {
shouldAEC = true;
}
// If this is a AudioNodeStream, force a AudioCallbackDriver.
if (stream->AsAudioNodeStream()) {
audioTrackPresent = true;
}
for (StreamBuffer::TrackIter tracks(stream->GetStreamBuffer(), MediaSegment::AUDIO);
!tracks.IsEnded(); tracks.Next()) {
audioTrackPresent = true;

View File

@ -267,7 +267,8 @@ MediaEngineWebRTC::EnumerateVideoDevices(MediaSourceType aMediaSource,
nsRefPtr<MediaEngineWebRTCVideoSource> vSource;
NS_ConvertUTF8toUTF16 uuid(uniqueId);
if (mVideoSources.Get(uuid, getter_AddRefs(vSource))) {
// We've already seen this device, just append.
// We've already seen this device, just refresh and append.
vSource->Refresh(i);
aVSources->AppendElement(vSource.get());
} else {
vSource = new MediaEngineWebRTCVideoSource(videoEngine, i, aMediaSource);

View File

@ -214,6 +214,8 @@ public:
return NS_OK;
}
void Refresh(int aIndex);
protected:
~MediaEngineWebRTCVideoSource() { Shutdown(); }

View File

@ -700,6 +700,25 @@ MediaEngineWebRTCVideoSource::Shutdown()
mInitDone = false;
}
void MediaEngineWebRTCVideoSource::Refresh(int aIndex) {
// NOTE: mCaptureIndex might have changed when allocated!
// Use aIndex to update information, but don't change mCaptureIndex!!
#ifdef MOZ_B2G_CAMERA
// Caller looked up this source by uniqueId; since deviceName == uniqueId nothing else changes
#else
// Caller looked up this source by uniqueId, so it shouldn't change
const uint32_t KMaxDeviceNameLength = 128;
char deviceName[KMaxDeviceNameLength];
if (mViECapture->GetCaptureDevice(aIndex,
deviceName, KMaxDeviceNameLength,
nullptr, 0)) {
return;
}
CopyUTF8toUTF16(deviceName, mDeviceName);
#endif
}
#ifdef MOZ_B2G_CAMERA
// All these functions must be run on MainThread!

View File

@ -4,6 +4,35 @@
# 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/.
DIRS += ['interfaces', 'src']
DIRS += ['interfaces']
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
EXPORTS.mozilla.dom += [
'Activity.h',
]
SOURCES += [
'Activity.cpp',
]
EXTRA_COMPONENTS += [
'Activities.manifest',
'ActivityMessageConfigurator.js',
'ActivityProxy.js',
'ActivityRequestHandler.js',
'ActivityWrapper.js',
]
EXTRA_JS_MODULES += [
'ActivitiesService.jsm',
'ActivitiesServiceFilter.jsm',
]
FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [
'/dom/base',
]
FINAL_LIBRARY = 'xul'

View File

@ -1,34 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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 += [
'Activity.h',
]
SOURCES += [
'Activity.cpp',
]
EXTRA_COMPONENTS += [
'Activities.manifest',
'ActivityMessageConfigurator.js',
'ActivityProxy.js',
'ActivityRequestHandler.js',
'ActivityWrapper.js',
]
EXTRA_JS_MODULES += [
'ActivitiesService.jsm',
'ActivitiesServiceFilter.jsm',
]
FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [
'/dom/base',
]
FINAL_LIBRARY = 'xul'

View File

@ -4,10 +4,53 @@
# 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/.
DIRS += ['src']
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
EXPORTS.mozilla.dom += [
'InterAppComm.h',
]
SOURCES += [
'InterAppComm.cpp',
]
EXTRA_COMPONENTS += [
'AppsService.js',
'AppsService.manifest',
'InterAppComm.manifest',
'InterAppCommService.js',
'InterAppConnection.js',
'InterAppMessagePort.js',
'Webapps.js',
'Webapps.manifest',
]
EXTRA_JS_MODULES += [
'AppDownloadManager.jsm',
'AppsServiceChild.jsm',
'FreeSpaceWatcher.jsm',
'InterAppCommService.jsm',
'OfflineCacheInstaller.jsm',
'PermissionsInstaller.jsm',
'PermissionsTable.jsm',
'StoreTrustAnchor.jsm',
]
EXTRA_PP_JS_MODULES += [
'AppsUtils.jsm',
'OperatorApps.jsm',
'ScriptPreloader.jsm',
'Webapps.jsm',
]
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/js/xpconnect/wrappers',
]

View File

@ -1,51 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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 += [
'InterAppComm.h',
]
SOURCES += [
'InterAppComm.cpp',
]
EXTRA_COMPONENTS += [
'AppsService.js',
'AppsService.manifest',
'InterAppComm.manifest',
'InterAppCommService.js',
'InterAppConnection.js',
'InterAppMessagePort.js',
'Webapps.js',
'Webapps.manifest',
]
EXTRA_JS_MODULES += [
'AppDownloadManager.jsm',
'AppsServiceChild.jsm',
'FreeSpaceWatcher.jsm',
'InterAppCommService.jsm',
'OfflineCacheInstaller.jsm',
'PermissionsInstaller.jsm',
'PermissionsTable.jsm',
'StoreTrustAnchor.jsm',
]
EXTRA_PP_JS_MODULES += [
'AppsUtils.jsm',
'OperatorApps.jsm',
'ScriptPreloader.jsm',
'Webapps.jsm',
]
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/js/xpconnect/wrappers',
]

View File

@ -203,16 +203,6 @@ URL::RevokeObjectURL(const GlobalObject& aGlobal, const nsAString& aURL)
}
}
nsIPrincipal*
URL::GetPrincipalFromURL(const GlobalObject& aGlobal, const nsAString& aURL,
ErrorResult& aRv)
{
MOZ_ASSERT(nsContentUtils::IsCallerChrome());
NS_LossyConvertUTF16toASCII asciiurl(aURL);
return nsHostObjectProtocolHandler::GetDataEntryPrincipal(asciiurl);
}
void
URL::GetHref(nsString& aHref, ErrorResult& aRv) const
{
@ -252,7 +242,18 @@ URL::SetHref(const nsAString& aHref, ErrorResult& aRv)
void
URL::GetOrigin(nsString& aOrigin, ErrorResult& aRv) const
{
nsContentUtils::GetUTFNonNullOrigin(mURI, aOrigin);
nsCOMPtr<nsIURIWithPrincipal> uriWithPrincipal = do_QueryInterface(mURI);
if (uriWithPrincipal) {
nsCOMPtr<nsIPrincipal> principal;
uriWithPrincipal->GetPrincipal(getter_AddRefs(principal));
if (principal) {
nsContentUtils::GetUTFOrigin(principal, aOrigin);
return;
}
}
nsContentUtils::GetUTFOrigin(mURI, aOrigin);
}
void

View File

@ -69,9 +69,6 @@ public:
ErrorResult& aError);
static void RevokeObjectURL(const GlobalObject& aGlobal,
const nsAString& aURL);
static nsIPrincipal* GetPrincipalFromURL(const GlobalObject& aGlobal,
const nsAString& aURL,
ErrorResult& aError);
void GetHref(nsString& aHref, ErrorResult& aRv) const;

View File

@ -150,15 +150,15 @@ LOCAL_INCLUDES += [
'../bluetooth',
'../events',
'../media',
'../network/src',
'../src/geolocation',
'../src/storage',
'../network',
'../time',
'../workers',
'../xbl',
'/content/base/src',
'/content/html/document/src',
'/content/xul/document/src',
'/dom/geolocation',
'/dom/storage',
'/layout/base',
'/layout/generic',
'/layout/style',

View File

@ -13,9 +13,9 @@ this.checkFromJSM = function checkFromJSM(ok, is) {
var url = URL.createObjectURL(blob);
ok(url, "URL is created!");
var p = URL.getPrincipalFromURL(url);
ok(p, "Principal exists.");
ok(p instanceof Components.interfaces.nsIPrincipal, "Principal is a nsIPrincipal");
var u = new URL(url);
ok(u, "URL created");
is(u.origin, "null", "Url doesn't have an origin if created in a JSM");
URL.revokeObjectURL(url);
ok(true, "URL is revoked");

View File

@ -324,14 +324,8 @@
var blob = new Blob(['a']);
var url = URL.createObjectURL(blob);
ok(!('getPrincipalFromURL' in URL), "URL.getPrincipalFromURL is not exposed");
var fakeP = SpecialPowers.wrap(URL).getPrincipalFromURL("hello world!");
ok(!fakeP, "Principal doesn't exists.");
var p = SpecialPowers.wrap(URL).getPrincipalFromURL(url);
ok(p, "Principal exists.");
ok(p.URI, "Principal.URI exists.");
is(p.URI.spec, window.location.href, "Principal.URI is correct");
var u = new URL(url);
ok(u.origin, 'http://mochi.test:8888', "The URL generated from a blob URI has an origin");
</script>
</body>
</html>

View File

@ -54,8 +54,8 @@ LOCAL_INCLUDES += [
'/dom/bluetooth',
'/dom/camera',
'/dom/canvas',
'/dom/geolocation',
'/dom/indexedDB',
'/dom/src/geolocation',
'/dom/workers',
'/dom/xbl',
'/dom/xml',

View File

@ -113,7 +113,7 @@ FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [
'../base',
'../network/src',
'../network',
'../system/gonk',
]

View File

@ -120,7 +120,7 @@ FAIL_ON_WARNINGS = True
LOCAL_INCLUDES += [
'../base',
'../network/src',
'../network',
'../system/gonk',
]

View File

@ -4,4 +4,16 @@
# 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/.
DIRS += ['interfaces', 'src']
DIRS += ['interfaces']
EXPORTS.mozilla.dom += [
'CellBroadcast.h',
]
SOURCES += [
'CellBroadcast.cpp',
]
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -1,17 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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 += [
'CellBroadcast.h',
]
SOURCES += [
'CellBroadcast.cpp',
]
FAIL_ON_WARNINGS = True
FINAL_LIBRARY = 'xul'

View File

@ -7,4 +7,15 @@
if CONFIG["MOZ_B2G"]:
MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
DIRS += ['src']
EXTRA_COMPONENTS += [
'DownloadsAPI.manifest',
]
EXTRA_PP_COMPONENTS = [
'DownloadsAPI.js',
]
EXTRA_PP_JS_MODULES += [
'DownloadsAPI.jsm',
'DownloadsIPC.jsm',
]

View File

@ -1,18 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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/.
EXTRA_COMPONENTS += [
'DownloadsAPI.manifest',
]
EXTRA_PP_COMPONENTS = [
'DownloadsAPI.js',
]
EXTRA_PP_JS_MODULES += [
'DownloadsAPI.jsm',
'DownloadsIPC.jsm',
]

View File

@ -133,7 +133,7 @@ LOCAL_INCLUDES += [
'/content/xul/content/src',
'/dom/base',
'/dom/settings',
'/dom/src/storage',
'/dom/storage',
'/dom/workers',
'/dom/xml',
'/js/xpconnect/wrappers',

View File

@ -4,4 +4,25 @@
# 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/.
DIRS += ['interfaces', 'src']
DIRS += ['interfaces']
EXPORTS.mozilla.dom += [
'Icc.h',
'IccManager.h',
]
SOURCES += [
'Icc.cpp',
'IccListener.cpp',
'IccManager.cpp',
]
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'/dom/system/gonk',
]

View File

@ -1,27 +0,0 @@
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# 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.h',
'IccManager.h',
]
SOURCES += [
'Icc.cpp',
'IccListener.cpp',
'IccManager.cpp',
]
FAIL_ON_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../../system/gonk',
]

View File

@ -76,7 +76,7 @@ LOCAL_INCLUDES += [
'/db/sqlite3/src',
'/dom/base',
'/dom/quota',
'/dom/src/storage',
'/dom/storage',
'/xpcom/build',
]

View File

@ -100,8 +100,6 @@ include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
'../src/geolocation',
'../src/storage',
'/chrome',
'/content/base/src',
'/content/media/webspeech/synth/ipc',
@ -112,9 +110,11 @@ LOCAL_INCLUDES += [
'/dom/devicestorage',
'/dom/filesystem',
'/dom/fmradio/ipc',
'/dom/geolocation',
'/dom/indexedDB',
'/dom/indexedDB/ipc',
'/dom/mobilemessage/src/ipc',
'/dom/mobilemessage/ipc',
'/dom/storage',
'/extensions/cookie',
'/hal/sandbox',
'/js/ipc',

Some files were not shown because too many files have changed in this diff Show More