This commit is contained in:
Wes Kocher 2015-08-05 16:49:08 -07:00
Родитель 8b98b093e9 4d0e220d7f
Коммит 4fd5119a0c
201 изменённых файлов: 3170 добавлений и 922 удалений

Просмотреть файл

@ -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.
Bug 1186748 needed a CLOBBER again
Bug 1186748 needed a CLOBBER yet again

Просмотреть файл

@ -72,6 +72,7 @@ public:
void Destroy();
virtual void ActorDestroy(ActorDestroyReason aWhy) override
{
CheckDocTree();
if (!mShutdown)
Destroy();
}

Просмотреть файл

@ -325,7 +325,7 @@ public:
protected:
explicit ProxyAccessible(DocAccessibleParent* aThisAsDoc) :
mParent(nullptr), mDoc(aThisAsDoc), mWrapper(0), mID(0),
mRole(roles::DOCUMENT)
mRole(roles::DOCUMENT), mOuterDoc(false)
{ MOZ_COUNT_CTOR(ProxyAccessible); }
protected:

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2d58f4b9206b50b8fda0d5036da6f0c62608db7c"/>

Просмотреть файл

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -137,14 +137,14 @@
<project name="platform_frameworks_base" path="frameworks/base" remote="b2g" revision="04e26ebdc36ca83f4ee3e9e2082b3fcf04c5b971"/>
<project name="platform_frameworks_wilhelm" path="frameworks/wilhelm" remote="b2g" revision="0dbf5baafadf6d233c0a29e392fa3293f0121673"/>
<project name="platform_system_core" path="system/core" remote="b2g" revision="f594bc64eacac490857748b1139ffcb34c856bbd"/>
<project name="platform_external_sepolicy" path="external/sepolicy" remote="b2g" revision="3f6be48a46c54dd8cacaf216ab5b145de5ffefd2"/>
<default remote="caf" revision="refs/tags/android-5.1.0_r1" sync-j="4"/>
<!-- Emulator specific things -->
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="fe7df1bc8dd0fd71571505d7be1c31a4ad1e40fb"/>
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="48132ec0b0dfe9fc29c7c3f0e799066be8999198"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="59e434cbecc02653f44cedeb2ef5cc88dc8bb61b"/>
<project name="platform_external_sepolicy" path="external/sepolicy" remote="b2g" revision="3f6be48a46c54dd8cacaf216ab5b145de5ffefd2"/>
<project name="platform_external_wpa_supplicant_8" path="external/wpa_supplicant_8" remote="b2g" revision="cbda29a58abc4ea1f7f4611fe354ab67b606219d"/>
<project name="platform/development" path="development" revision="0c51f6e0aa2ee57fcb75ec3b2ff6bf754cece63e"/>
<project name="android-sdk" path="sdk" remote="b2g" revision="ff4190dc603f62a7caa48342aa268acf99863c5c"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2210a0276fa000ef7224f26b24f00cb34a372e8d"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="10d289639ea62f2f6fcfb5bbf6121c484e95f767"/>
</manifest>

Просмотреть файл

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="2d58f4b9206b50b8fda0d5036da6f0c62608db7c"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e862ab9177af664f00b4522e2350f4cb13866d73">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

Просмотреть файл

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "581de383687dc441a878d2c91a0167c6ec688fef",
"git_revision": "4ede0c6bf5fb0c2896d5393032b395999a154619",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "a0015e0f59bdec57f732c805238172bd49406ab5",
"revision": "8c8613183a6efdbb9172b2c27ae1e60290398d45",
"repo_path": "integration/gaia-central"
}

Просмотреть файл

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="657894b4a1dc0a926117f4812e0940229f9f676f"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="6ddfd98cdafefaa1b60273d5568b8dbd13730dae"/>

Просмотреть файл

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="07c383a786f188904311a37f6062c2cb84c9b61d">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="581de383687dc441a878d2c91a0167c6ec688fef"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4ede0c6bf5fb0c2896d5393032b395999a154619"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4d9fbc08e87731447c19e96e13d8c7444baafcca"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -137,12 +137,12 @@
<project name="platform_frameworks_base" path="frameworks/base" remote="b2g" revision="04e26ebdc36ca83f4ee3e9e2082b3fcf04c5b971"/>
<project name="platform_frameworks_wilhelm" path="frameworks/wilhelm" remote="b2g" revision="0dbf5baafadf6d233c0a29e392fa3293f0121673"/>
<project name="platform_system_core" path="system/core" remote="b2g" revision="f594bc64eacac490857748b1139ffcb34c856bbd"/>
<project name="platform_external_sepolicy" path="external/sepolicy" remote="b2g" revision="3f6be48a46c54dd8cacaf216ab5b145de5ffefd2"/>
<default remote="caf" revision="refs/tags/android-5.1.0_r1" sync-j="4"/>
<!-- Nexus 5 specific things -->
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="fe7df1bc8dd0fd71571505d7be1c31a4ad1e40fb"/>
<project name="device-hammerhead" path="device/lge/hammerhead" remote="b2g" revision="e728bf3ff61dfab1b97c2416096a3b850b47cf25"/>
<project name="device_lge_hammerhead-kernel" path="device/lge/hammerhead-kernel" remote="b2g" revision="8b3ffcfdd3d3852eca5488628f8bb2a08acbffa7"/>
<project name="platform_external_sepolicy" path="external/sepolicy" remote="b2g" revision="3f6be48a46c54dd8cacaf216ab5b145de5ffefd2"/>
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="5d0ae53d9588c3d70c005aec9be94af9a534de16"/>
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="c15b6e266136cd0cdd9b94d0bbed1962d9dd6672"/>
<project name="platform/hardware/broadcom/libbt" path="hardware/broadcom/libbt" revision="399fe3d3c8f38c599a56becddc456133e62a5d70"/>

Просмотреть файл

@ -7,6 +7,14 @@
"unpack": true
},
{
"size": 11179576,
"digest": "91567ce8e2bb8ab0ebc60c31e90731d88a1ea889fb71bcf55c735746a60fa7610b7e040ea3d8f727b6f692ae3ee703d6f3b30cdbd76fdf5617f77d9c38aa20ed",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",

Просмотреть файл

@ -7,6 +7,14 @@
"unpack": true
},
{
"size": 12057960,
"digest": "6105d6432943141cffb40020dc5ba3a793650bdeb3af9bd5e56d3796c5f03df9962a73e521646cd71fbfb5e266c1e74716ad722fb6055589dfb7d35175bca89e",
"algorithm": "sha512",
"filename": "gtk3.tar.xz",
"setup": "setup.sh",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",

Просмотреть файл

@ -9,6 +9,9 @@ import os
import platform
import sys
import time
import __builtin__
from types import ModuleType
STATE_DIR_FIRST_RUN = '''
@ -327,3 +330,70 @@ def bootstrap(topsrcdir, mozilla_dir=None):
mach.load_commands_from_file(os.path.join(mozilla_dir, path))
return mach
# Hook import such that .pyc/.pyo files without a corresponding .py file in
# the source directory are essentially ignored. See further below for details
# and caveats.
# Objdirs outside the source directory are ignored because in most cases, if
# a .pyc/.pyo file exists there, a .py file will be next to it anyways.
class ImportHook(object):
def __init__(self, original_import):
self._original_import = original_import
# Assume the source directory is the parent directory of the one
# containing this file.
self._source_dir = os.path.normcase(os.path.abspath(
os.path.dirname(os.path.dirname(__file__)))) + os.sep
self._modules = set()
def __call__(self, name, globals=None, locals=None, fromlist=None,
level=-1):
# name might be a relative import. Instead of figuring out what that
# resolves to, which is complex, just rely on the real import.
# Since we don't know the full module name, we can't check sys.modules,
# so we need to keep track of which modules we've already seen to avoid
# to stat() them again when they are imported multiple times.
module = self._original_import(name, globals, locals, fromlist, level)
# Some tests replace modules in sys.modules with non-module instances.
if not isinstance(module, ModuleType):
return module
resolved_name = module.__name__
if resolved_name in self._modules:
return module
self._modules.add(resolved_name)
# Builtin modules don't have a __file__ attribute.
if not hasattr(module, '__file__'):
return module
# Note: module.__file__ is not always absolute.
path = os.path.normcase(os.path.abspath(module.__file__))
# Note: we could avoid normcase and abspath above for non pyc/pyo
# files, but those are actually rare, so it doesn't really matter.
if not path.endswith(('.pyc', '.pyo')):
return module
# Ignore modules outside our source directory
if not path.startswith(self._source_dir):
return module
# If there is no .py corresponding to the .pyc/.pyo module we're
# loading, remove the .pyc/.pyo file, and reload the module.
# Since we already loaded the .pyc/.pyo module, if it had side
# effects, they will have happened already, and loading the module
# with the same name, from another directory may have the same side
# effects (or different ones). We assume it's not a problem for the
# python modules under our source directory (either because it
# doesn't happen or because it doesn't matter).
if not os.path.exists(module.__file__[:-1]):
os.remove(module.__file__)
del sys.modules[module.__name__]
module = self(name, globals, locals, fromlist, level)
return module
# Install our hook
__builtin__.__import__ = ImportHook(__builtin__.__import__)

Просмотреть файл

@ -6,7 +6,7 @@
#include "nsDOMMutationObserver.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "nsError.h"
#include "nsIScriptGlobalObject.h"
#include "nsContentUtils.h"
@ -786,7 +786,7 @@ nsDOMMutationObserver::HandleMutation()
return;
}
mozilla::dom::Sequence<mozilla::dom::OwningNonNull<nsDOMMutationRecord> >
mozilla::dom::Sequence<mozilla::OwningNonNull<nsDOMMutationRecord> >
mutations;
if (mutations.SetCapacity(mPendingMutationCount, mozilla::fallible)) {
// We can't use TakeRecords easily here, because it deals with a

Просмотреть файл

@ -199,7 +199,7 @@
#include "mozilla/dom/HTMLInputElement.h"
#include "mozilla/dom/MediaQueryList.h"
#include "mozilla/dom/NodeFilterBinding.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "mozilla/dom/TabChild.h"
#include "mozilla/dom/UndoManager.h"
#include "mozilla/dom/WebComponentsBinding.h"

Просмотреть файл

@ -94,6 +94,7 @@ class ErrorResult;
class EventStates;
class PendingAnimationTracker;
class SVGAttrAnimationRuleProcessor;
template<typename> class OwningNonNull;
namespace css {
class Loader;
@ -142,7 +143,6 @@ class XPathEvaluator;
class XPathExpression;
class XPathNSResolver;
class XPathResult;
template<typename> class OwningNonNull;
template<typename> class Sequence;
template<typename, typename> class CallbackObjectHolder;
@ -2512,9 +2512,9 @@ public:
already_AddRefed<mozilla::dom::TouchList> CreateTouchList();
already_AddRefed<mozilla::dom::TouchList>
CreateTouchList(mozilla::dom::Touch& aTouch,
const mozilla::dom::Sequence<mozilla::dom::OwningNonNull<mozilla::dom::Touch> >& aTouches);
const mozilla::dom::Sequence<mozilla::OwningNonNull<mozilla::dom::Touch> >& aTouches);
already_AddRefed<mozilla::dom::TouchList>
CreateTouchList(const mozilla::dom::Sequence<mozilla::dom::OwningNonNull<mozilla::dom::Touch> >& aTouches);
CreateTouchList(const mozilla::dom::Sequence<mozilla::OwningNonNull<mozilla::dom::Touch> >& aTouches);
void SetStyleSheetChangeEventsEnabled(bool aValue)
{

Просмотреть файл

@ -21,7 +21,7 @@
#include "nsTArray.h"
#include "nsAutoPtr.h" // for nsRefPtr member variables
#include "mozilla/dom/DOMString.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
class nsWrapperCache;

Просмотреть файл

@ -12806,7 +12806,7 @@ class CGBindingRoot(CGThing):
hasCode = (descriptors or callbackDescriptors or dictionaries or
mainCallbacks or workerCallbacks)
bindingHeaders["mozilla/dom/BindingUtils.h"] = hasCode
bindingHeaders["mozilla/dom/OwningNonNull.h"] = hasCode
bindingHeaders["mozilla/OwningNonNull.h"] = hasCode
bindingHeaders["mozilla/dom/BindingDeclarations.h"] = (
not hasCode and enums)
@ -15550,7 +15550,7 @@ class GlobalGenRoots():
[CGUnionStruct(t, config.getDescriptorProvider(False), True) for t in unionStructs],
"\n")
includes.add("mozilla/dom/OwningNonNull.h")
includes.add("mozilla/OwningNonNull.h")
includes.add("mozilla/dom/UnionMember.h")
includes.add("mozilla/dom/BindingDeclarations.h")
# Need BindingUtils.h for FakeString

Просмотреть файл

@ -31,7 +31,6 @@ EXPORTS.mozilla.dom += [
'MozMap.h',
'NonRefcountedDOMObject.h',
'Nullable.h',
'OwningNonNull.h',
'PrimitiveConversions.h',
'RootedDictionary.h',
'StructuredClone.h',

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothcommon_h
#define mozilla_dom_bluetooth_bluetoothcommon_h
#ifndef mozilla_dom_bluetooth_BluetoothCommon_h
#define mozilla_dom_bluetooth_BluetoothCommon_h
#include "mozilla/Compiler.h"
#include "mozilla/Observer.h"
@ -810,4 +810,4 @@ enum BluetoothGapDataType {
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluetoothcommon_h__
#endif // mozilla_dom_bluetooth_BluetoothCommon_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__
#define mozilla_dom_bluetooth_bluetoothhidmanager_h__
#ifndef mozilla_dom_bluetooth_BluetoothHidManager_h
#define mozilla_dom_bluetooth_BluetoothHidManager_h
#include "BluetoothCommon.h"
#include "BluetoothProfileController.h"
@ -46,4 +46,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif //#ifndef mozilla_dom_bluetooth_bluetoothhidmanager_h__
#endif // mozilla_dom_bluetooth_BluetoothHidManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothinterface_h__
#define mozilla_dom_bluetooth_bluetoothinterface_h__
#ifndef mozilla_dom_bluetooth_BluetoothInterface_h
#define mozilla_dom_bluetooth_BluetoothInterface_h
#include "BluetoothCommon.h"
#include "mozilla/dom/bluetooth/BluetoothTypes.h"
@ -1254,4 +1254,4 @@ protected:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothInterface_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothprofilemanagerbase_h__
#define mozilla_dom_bluetooth_bluetoothprofilemanagerbase_h__
#ifndef mozilla_dom_bluetooth_BluetoothProfileManagerBase_h
#define mozilla_dom_bluetooth_BluetoothProfileManagerBase_h
/**
* Error Messages used in Bluetooth profiles
@ -108,4 +108,4 @@ public: \
END_BLUETOOTH_NAMESPACE
#endif //#ifndef mozilla_dom_bluetooth_bluetoothprofilemanagerbase_h__
#endif // mozilla_dom_bluetooth_BluetoothProfileManagerBase_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothrillistener_h__
#define mozilla_dom_bluetooth_bluetoothrillistener_h__
#ifndef mozilla_dom_bluetooth_BluetoothRilListener_h
#define mozilla_dom_bluetooth_BluetoothRilListener_h
#include "BluetoothCommon.h"
@ -137,4 +137,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothRilListener_h

Просмотреть файл

@ -52,4 +52,4 @@ public: \
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothSocketObserver_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothutils_h
#define mozilla_dom_bluetooth_bluetoothutils_h
#ifndef mozilla_dom_bluetooth_BluetoothUtils_h
#define mozilla_dom_bluetooth_BluetoothUtils_h
#include "BluetoothCommon.h"
#include "js/TypeDecls.h"
@ -159,4 +159,4 @@ DispatchStatusChangedEvent(const nsAString& aType,
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothUtils_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothuuid_h__
#define mozilla_dom_bluetooth_bluetoothuuid_h__
#ifndef mozilla_dom_bluetooth_BluetoothUuid_h
#define mozilla_dom_bluetooth_BluetoothUuid_h
#include "BluetoothCommon.h"
@ -82,4 +82,4 @@ enum BluetoothReservedChannels {
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothUuid_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_obexbase_h__
#define mozilla_dom_bluetooth_obexbase_h__
#ifndef mozilla_dom_bluetooth_ObexBase_h
#define mozilla_dom_bluetooth_ObexBase_h
#include "BluetoothCommon.h"
#include "nsAutoPtr.h"
@ -337,4 +337,4 @@ bool ParseHeaders(const uint8_t* aHeaderStart,
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_ObexBase_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetootha2dpmanager_h__
#define mozilla_dom_bluetooth_bluetootha2dpmanager_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothA2dpManager_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothA2dpManager_h
#include "BluetoothCommon.h"
#include "BluetoothInterface.h"

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothdaemona2dpinterface_h
#define mozilla_dom_bluetooth_bluetoothdaemona2dpinterface_h
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonA2dpInterface_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonA2dpInterface_h
#include "BluetoothDaemonHelpers.h"
#include "BluetoothInterface.h"
@ -162,4 +162,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonA2dpInterface_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothdaemonavrcpinterface_h
#define mozilla_dom_bluetooth_bluetoothdaemonavrcpinterface_h
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonAvrcpInterface_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonAvrcpInterface_h
#include "BluetoothDaemonHelpers.h"
#include "BluetoothInterface.h"
@ -361,4 +361,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonAvrcpInterface_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothdaemongattinterface_h
#define mozilla_dom_bluetooth_bluetoothdaemongattinterface_h
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonGattInterface_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonGattInterface_h
#include "BluetoothDaemonHelpers.h"
#include "BluetoothInterface.h"
@ -1035,4 +1035,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonGattInterface_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothdaemonhandsfreeinterface_h
#define mozilla_dom_bluetooth_bluetoothdaemonhandsfreeinterface_h
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHandsfreeInterface_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHandsfreeInterface_h
#include "BluetoothDaemonHelpers.h"
#include "BluetoothInterface.h"
@ -471,4 +471,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHandsfreeInterface_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluedroid_bluetoothdaemonhelpers_h__
#define mozilla_dom_bluetooth_bluedroid_bluetoothdaemonhelpers_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHelpers_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHelpers_h
#include "BluetoothCommon.h"
#include "mozilla/ArrayUtils.h"
@ -1191,4 +1191,4 @@ public:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonHelpers_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluedroid_bluetoothdaemoninterface_h__
#define mozilla_dom_bluetooth_bluedroid_bluetoothdaemoninterface_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonInterface_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonInterface_h
#include "BluetoothInterface.h"
#include "mozilla/ipc/DaemonSocketConsumer.h"
@ -167,4 +167,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonInterface_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluedroid_bluetoothdaemonsetupinterface_h__
#define mozilla_dom_bluetooth_bluedroid_bluetoothdaemonsetupinterface_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSetupInterface_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSetupInterface_h
#include "BluetoothCommon.h"
@ -27,4 +27,4 @@ protected:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSetupInterface_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluedroid_bluetoothdaemonsocketinterface_h__
#define mozilla_dom_bluetooth_bluedroid_bluetoothdaemonsocketinterface_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSocketInterface_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSocketInterface_h
#include "BluetoothDaemonHelpers.h"
#include "BluetoothInterface.h"
@ -122,4 +122,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSocketInterface_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothgattmanager_h__
#define mozilla_dom_bluetooth_bluetoothgattmanager_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothGattManager_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothGattManager_h
#include "BluetoothCommon.h"
#include "BluetoothInterface.h"
@ -205,4 +205,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothGattManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothoppmanager_h__
#define mozilla_dom_bluetooth_bluetoothoppmanager_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothOppManager_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothOppManager_h
#include "BluetoothCommon.h"
#include "BluetoothProfileManagerBase.h"
@ -219,4 +219,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothOppManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothpbapmanager_h__
#define mozilla_dom_bluetooth_bluetoothpbapmanager_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothPbapManager_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothPbapManager_h
#include "BluetoothCommon.h"
#include "BluetoothProfileManagerBase.h"
@ -99,4 +99,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothPbapManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothservicebluedroid_h__
#define mozilla_dom_bluetooth_bluetoothservicebluedroid_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothServiceBluedroid_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothServiceBluedroid_h
#include "BluetoothCommon.h"
#include "BluetoothInterface.h"
@ -395,4 +395,4 @@ protected:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothServiceBluedroid_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_BluetoothSocket_h
#define mozilla_dom_bluetooth_BluetoothSocket_h
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothSocket_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothSocket_h
#include "BluetoothCommon.h"
#include "mozilla/ipc/DataSocket.h"
@ -98,4 +98,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothSocket_h

Просмотреть файл

@ -4,6 +4,9 @@
* 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_bluetooth_bluedroid_BluetoothSocketMessageWatcher_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothSocketMessageWatcher_h
#include "base/message_loop.h"
#include "BluetoothCommon.h"
@ -107,3 +110,5 @@ private:
};
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothSocketMessageWatcher_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothhfpmanager_h__
#define mozilla_dom_bluetooth_bluetoothhfpmanager_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
#include "BluetoothHfpManagerBase.h"
@ -48,4 +48,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothhfpmanager_h__
#define mozilla_dom_bluetooth_bluetoothhfpmanager_h__
#ifndef mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
#define mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h
#include "BluetoothInterface.h"
#include "BluetoothCommon.h"
@ -228,4 +228,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluedroid_BluetoothHfpManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothadapter_h__
#define mozilla_dom_bluetooth_bluetoothadapter_h__
#ifndef mozilla_dom_bluetooth_BluetoothAdapter_h
#define mozilla_dom_bluetooth_BluetoothAdapter_h
#include "BluetoothCommon.h"
#include "mozilla/Attributes.h"
@ -417,4 +417,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothAdapter_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothclassofdevice_h
#define mozilla_dom_bluetooth_bluetoothclassofdevice_h
#ifndef mozilla_dom_bluetooth_BluetoothClassOfDevice_h
#define mozilla_dom_bluetooth_BluetoothClassOfDevice_h
#include "BluetoothCommon.h"
#include "mozilla/Attributes.h"
@ -90,4 +90,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluetoothclassofdevice_h
#endif // mozilla_dom_bluetooth_BluetoothClassOfDevice_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothdevice_h__
#define mozilla_dom_bluetooth_bluetoothdevice_h__
#ifndef mozilla_dom_bluetooth_BluetoothDevice_h
#define mozilla_dom_bluetooth_BluetoothDevice_h
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
@ -244,4 +244,4 @@ public:
}
};
#endif
#endif // mozilla_dom_bluetooth_BluetoothDevice_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothdiscoveryhandle_h
#define mozilla_dom_bluetooth_bluetoothdiscoveryhandle_h
#ifndef mozilla_dom_bluetooth_BluetoothDiscoveryHandle_h
#define mozilla_dom_bluetooth_BluetoothDiscoveryHandle_h
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
@ -76,4 +76,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluetoothdiscoveryhandle_h
#endif // mozilla_dom_bluetooth_BluetoothDiscoveryHandle_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothgatt_h__
#define mozilla_dom_bluetooth_bluetoothgatt_h__
#ifndef mozilla_dom_bluetooth_BluetoothGatt_h
#define mozilla_dom_bluetooth_BluetoothGatt_h
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
@ -191,4 +191,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothGatt_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothgattcharacteristic_h__
#define mozilla_dom_bluetooth_bluetoothgattcharacteristic_h__
#ifndef mozilla_dom_bluetooth_BluetoothGattCharacteristic_h
#define mozilla_dom_bluetooth_BluetoothGattCharacteristic_h
#include "mozilla/Attributes.h"
#include "mozilla/dom/BluetoothGattCharacteristicBinding.h"
@ -185,4 +185,4 @@ public:
}
};
#endif
#endif // mozilla_dom_bluetooth_BluetoothGattCharacteristic_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothgattdescriptor_h__
#define mozilla_dom_bluetooth_bluetoothgattdescriptor_h__
#ifndef mozilla_dom_bluetooth_BluetoothGattDescriptor_h
#define mozilla_dom_bluetooth_BluetoothGattDescriptor_h
#include "mozilla/Attributes.h"
#include "mozilla/dom/BluetoothGattDescriptorBinding.h"
@ -108,4 +108,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothGattDescriptor_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothgattserver_h__
#define mozilla_dom_bluetooth_bluetoothgattserver_h__
#ifndef mozilla_dom_bluetooth_BluetoothGattServer_h
#define mozilla_dom_bluetooth_BluetoothGattServer_h
#include "mozilla/dom/BluetoothGattServerBinding.h"
#include "mozilla/dom/bluetooth/BluetoothCommon.h"
@ -66,4 +66,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothGattServer_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothgattservice_h__
#define mozilla_dom_bluetooth_bluetoothgattservice_h__
#ifndef mozilla_dom_bluetooth_BluetoothGattService_h
#define mozilla_dom_bluetooth_BluetoothGattService_h
#include "mozilla/Attributes.h"
#include "mozilla/dom/BluetoothGattServiceBinding.h"
@ -179,4 +179,4 @@ public:
}
};
#endif
#endif // mozilla_dom_bluetooth_BluetoothGattService_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothledeviceevent_h
#define mozilla_dom_bluetooth_bluetoothledeviceevent_h
#ifndef mozilla_dom_bluetooth_BluetoothLeDeviceEvent_h
#define mozilla_dom_bluetooth_BluetoothLeDeviceEvent_h
#include "mozilla/Attributes.h"
#include "mozilla/ErrorResult.h"
@ -61,4 +61,4 @@ public:
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluetoothledeviceevent_h
#endif // mozilla_dom_bluetooth_BluetoothLeDeviceEvent_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothmanager_h__
#define mozilla_dom_bluetooth_bluetoothmanager_h__
#ifndef mozilla_dom_bluetooth_BluetoothManager_h
#define mozilla_dom_bluetooth_BluetoothManager_h
#include "BluetoothCommon.h"
#include "mozilla/Attributes.h"
@ -140,4 +140,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothpairinghandle_h
#define mozilla_dom_bluetooth_bluetoothpairinghandle_h
#ifndef mozilla_dom_bluetooth_BluetoothPairingHandle_h
#define mozilla_dom_bluetooth_BluetoothPairingHandle_h
#include "BluetoothCommon.h"
#include "nsWrapperCache.h"
@ -79,4 +79,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluetoothpairinghandle_h
#endif // mozilla_dom_bluetooth_BluetoothPairingHandle_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothpairinglistener_h
#define mozilla_dom_bluetooth_bluetoothpairinglistener_h
#ifndef mozilla_dom_bluetooth_BluetoothPairingListener_h
#define mozilla_dom_bluetooth_BluetoothPairingListener_h
#include "BluetoothCommon.h"
#include "mozilla/Attributes.h"
@ -68,4 +68,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluetoothpairinglistener_h
#endif // mozilla_dom_bluetooth_BluetoothPairingListener_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothprofilecontroller_h__
#define mozilla_dom_bluetooth_bluetoothprofilecontroller_h__
#ifndef mozilla_dom_bluetooth_BluetoothProfileController_h
#define mozilla_dom_bluetooth_BluetoothProfileController_h
#include "BluetoothUuid.h"
#include "nsISupportsImpl.h"
@ -157,4 +157,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothProfileController_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothreplyrunnable_h__
#define mozilla_dom_bluetooth_bluetoothreplyrunnable_h__
#ifndef mozilla_dom_bluetooth_BluetoothReplyRunnable_h
#define mozilla_dom_bluetooth_BluetoothReplyRunnable_h
#include "mozilla/Attributes.h"
#include "BluetoothCommon.h"
@ -90,4 +90,4 @@ protected:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothReplyRunnable_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetootheventservice_h__
#define mozilla_dom_bluetooth_bluetootheventservice_h__
#ifndef mozilla_dom_bluetooth_BluetoothService_h
#define mozilla_dom_bluetooth_BluetoothService_h
#include "BluetoothCommon.h"
#include "BluetoothInterface.h"
@ -564,4 +564,4 @@ protected:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_BluetoothService_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_ipc_bluetoothchild_h__
#define mozilla_dom_bluetooth_ipc_bluetoothchild_h__
#ifndef mozilla_dom_bluetooth_ipc_BluetoothChild_h
#define mozilla_dom_bluetooth_ipc_BluetoothChild_h
#include "mozilla/dom/bluetooth/BluetoothCommon.h"
@ -102,4 +102,4 @@ protected:
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_ipc_bluetoothchild_h__
#endif // mozilla_dom_bluetooth_ipc_BluetoothChild_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__
#define mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__
#ifndef mozilla_dom_bluetooth_ipc_BluetoothMessageUtils_h
#define mozilla_dom_bluetooth_ipc_BluetoothMessageUtils_h
#include "mozilla/dom/bluetooth/BluetoothCommon.h"
#include "ipc/IPCMessageUtils.h"
@ -138,4 +138,4 @@ struct ParamTraits<mozilla::dom::bluetooth::BluetoothGattCharAttribute>
} // namespace IPC
#endif // mozilla_dom_bluetooth_ipc_bluetoothmessageutils_h__
#endif // mozilla_dom_bluetooth_ipc_BluetoothMessageUtils_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_ipc_bluetoothparent_h__
#define mozilla_dom_bluetooth_ipc_bluetoothparent_h__
#ifndef mozilla_dom_bluetooth_ipc_BluetoothParent_h
#define mozilla_dom_bluetooth_ipc_BluetoothParent_h
#include "mozilla/dom/bluetooth/BluetoothCommon.h"
@ -265,4 +265,4 @@ protected:
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_ipc_bluetoothparent_h__
#endif // mozilla_dom_bluetooth_ipc_BluetoothParent_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_ipc_bluetoothservicechildprocess_h__
#define mozilla_dom_bluetooth_ipc_bluetoothservicechildprocess_h__
#ifndef mozilla_dom_bluetooth_ipc_BluetoothServiceChildProcess_h
#define mozilla_dom_bluetooth_ipc_BluetoothServiceChildProcess_h
#include "BluetoothService.h"
@ -295,4 +295,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_ipc_bluetoothservicechildprocess_h__
#endif // mozilla_dom_bluetooth_ipc_BluetoothServiceChildProcess_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetootha2dpmanager_h__
#define mozilla_dom_bluetooth_bluetootha2dpmanager_h__
#ifndef mozilla_dom_bluetooth_bluez_BluetoothA2dpManager_h
#define mozilla_dom_bluetooth_bluez_BluetoothA2dpManager_h
#include "BluetoothCommon.h"
#include "BluetoothProfileController.h"
@ -87,4 +87,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluez_BluetoothA2dpManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothdbusservice_h__
#define mozilla_dom_bluetooth_bluetoothdbusservice_h__
#ifndef mozilla_dom_bluetooth_bluez_BluetoothDBusService_h
#define mozilla_dom_bluetooth_bluez_BluetoothDBusService_h
#include "mozilla/Attributes.h"
#include "BluetoothCommon.h"
@ -338,4 +338,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluez_BluetoothDBusService_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothhfpmanager_h__
#define mozilla_dom_bluetooth_bluetoothhfpmanager_h__
#ifndef mozilla_dom_bluetooth_bluez_BluetoothHfpManager_h
#define mozilla_dom_bluetooth_bluez_BluetoothHfpManager_h
#include "BluetoothCommon.h"
#include "BluetoothHfpManagerBase.h"
@ -230,4 +230,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluez_BluetoothHfpManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_bluetoothoppmanager_h__
#define mozilla_dom_bluetooth_bluetoothoppmanager_h__
#ifndef mozilla_dom_bluetooth_bluez_BluetoothOppManager_h
#define mozilla_dom_bluetooth_bluez_BluetoothOppManager_h
#include "BluetoothCommon.h"
#include "BluetoothProfileManagerBase.h"
@ -228,4 +228,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluez_BluetoothOppManager_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_BluetoothSocket_h
#define mozilla_dom_bluetooth_BluetoothSocket_h
#ifndef mozilla_dom_bluetooth_bluez_BluetoothSocket_h
#define mozilla_dom_bluetooth_bluez_BluetoothSocket_h
#include "BluetoothCommon.h"
#include "mozilla/ipc/DataSocket.h"
@ -135,4 +135,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluez_BluetoothSocket_h

Просмотреть файл

@ -4,8 +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/. */
#ifndef mozilla_dom_bluetooth_BluetoothUnixSocketConnector_h
#define mozilla_dom_bluetooth_BluetoothUnixSocketConnector_h
#ifndef mozilla_dom_bluetooth_bluez_BluetoothUnixSocketConnector_h
#define mozilla_dom_bluetooth_bluez_BluetoothUnixSocketConnector_h
#include <bluetooth/bluetooth.h>
#include "BluetoothCommon.h"
@ -61,4 +61,4 @@ private:
END_BLUETOOTH_NAMESPACE
#endif
#endif // mozilla_dom_bluetooth_bluez_BluetoothUnixSocketConnector_h

Просмотреть файл

@ -6723,7 +6723,7 @@ class OpenDatabaseOp final
class VersionChangeOp;
const OptionalContentId mOptionalContentParentId;
OptionalContentId mOptionalContentParentId;
nsRefPtr<FullDatabaseMetadata> mMetadata;
@ -7239,7 +7239,7 @@ class ObjectStoreAddOrPutRequestOp final
const nsCString mOrigin;
const PersistenceType mPersistenceType;
const bool mOverwrite;
const bool mObjectStoreMayHaveIndexes;
bool mObjectStoreMayHaveIndexes;
private:
// Only created by TransactionBase.
@ -7357,7 +7357,7 @@ class ObjectStoreDeleteRequestOp final
const ObjectStoreDeleteParams mParams;
ObjectStoreDeleteResponse mResponse;
const bool mObjectStoreMayHaveIndexes;
bool mObjectStoreMayHaveIndexes;
private:
ObjectStoreDeleteRequestOp(TransactionBase* aTransaction,
@ -7383,7 +7383,7 @@ class ObjectStoreClearRequestOp final
const ObjectStoreClearParams mParams;
ObjectStoreClearResponse mResponse;
const bool mObjectStoreMayHaveIndexes;
bool mObjectStoreMayHaveIndexes;
private:
ObjectStoreClearRequestOp(TransactionBase* aTransaction,
@ -18790,15 +18790,12 @@ OpenDatabaseOp::OpenDatabaseOp(Factory* aFactory,
, mVersionChangeOp(nullptr)
, mTelemetryId(0)
{
auto& optionalContentParentId =
const_cast<OptionalContentId&>(mOptionalContentParentId);
if (mContentParent) {
// This is a little scary but it looks safe to call this off the main thread
// for now.
optionalContentParentId = mContentParent->ChildID();
mOptionalContentParentId = mContentParent->ChildID();
} else {
optionalContentParentId = void_t();
mOptionalContentParentId = void_t();
}
}
@ -22634,7 +22631,7 @@ ObjectStoreAddOrPutRequestOp::ObjectStoreAddOrPutRequestOp(
aTransaction->GetMetadataForObjectStoreId(mParams.objectStoreId());
MOZ_ASSERT(mMetadata);
const_cast<bool&>(mObjectStoreMayHaveIndexes) = mMetadata->HasLiveIndexes();
mObjectStoreMayHaveIndexes = mMetadata->HasLiveIndexes();
}
nsresult
@ -23565,7 +23562,7 @@ ObjectStoreDeleteRequestOp::ObjectStoreDeleteRequestOp(
aTransaction->GetMetadataForObjectStoreId(mParams.objectStoreId());
MOZ_ASSERT(metadata);
const_cast<bool&>(mObjectStoreMayHaveIndexes) = metadata->HasLiveIndexes();
mObjectStoreMayHaveIndexes = metadata->HasLiveIndexes();
}
nsresult
@ -23657,7 +23654,7 @@ ObjectStoreClearRequestOp::ObjectStoreClearRequestOp(
aTransaction->GetMetadataForObjectStoreId(mParams.objectStoreId());
MOZ_ASSERT(metadata);
const_cast<bool&>(mObjectStoreMayHaveIndexes) = metadata->HasLiveIndexes();
mObjectStoreMayHaveIndexes = metadata->HasLiveIndexes();
}
nsresult

Просмотреть файл

@ -87,6 +87,52 @@ UpdateStreamBlocking(MediaStream* aStream, bool aBlocking)
}
}
/*
* All MediaStream-related data is protected by the decoder's monitor.
* We have at most one DecodedStreamDaata per MediaDecoder. Its stream
* is used as the input for each ProcessedMediaStream created by calls to
* captureStream(UntilEnded). Seeking creates a new source stream, as does
* replaying after the input as ended. In the latter case, the new source is
* not connected to streams created by captureStreamUntilEnded.
*/
class DecodedStreamData {
public:
DecodedStreamData(SourceMediaStream* aStream, bool aPlaying);
~DecodedStreamData();
bool IsFinished() const;
int64_t GetPosition() const;
void SetPlaying(bool aPlaying);
/* The following group of fields are protected by the decoder's monitor
* and can be read or written on any thread.
*/
// Count of audio frames written to the stream
int64_t mAudioFramesWritten;
// mNextVideoTime is the end timestamp for the last packet sent to the stream.
// Therefore video packets starting at or after this time need to be copied
// to the output stream.
int64_t mNextVideoTime; // microseconds
int64_t mNextAudioTime; // microseconds
// The last video image sent to the stream. Useful if we need to replicate
// the image.
nsRefPtr<layers::Image> mLastVideoImage;
gfx::IntSize mLastVideoImageDisplaySize;
// This is set to true when the stream is initialized (audio and
// video tracks added).
bool mStreamInitialized;
bool mHaveSentFinish;
bool mHaveSentFinishAudio;
bool mHaveSentFinishVideo;
// The decoder is responsible for calling Destroy() on this stream.
const nsRefPtr<SourceMediaStream> mStream;
nsRefPtr<DecodedStreamGraphListener> mListener;
bool mPlaying;
// True if we need to send a compensation video frame to ensure the
// StreamTime going forward.
bool mEOSVideoCompensation;
};
DecodedStreamData::DecodedStreamData(SourceMediaStream* aStream, bool aPlaying)
: mAudioFramesWritten(0)
, mNextVideoTime(-1)
@ -191,7 +237,10 @@ DecodedStream::DecodedStream(MediaQueue<MediaData>& aAudioQueue,
, mAudioQueue(aAudioQueue)
, mVideoQueue(aVideoQueue)
{
//
}
DecodedStream::~DecodedStream()
{
}
void

Просмотреть файл

@ -7,29 +7,27 @@
#ifndef DecodedStream_h_
#define DecodedStream_h_
#include "mozilla/nsRefPtr.h"
#include "nsTArray.h"
#include "MediaInfo.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/Maybe.h"
#include "mozilla/nsRefPtr.h"
#include "mozilla/ReentrantMonitor.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/gfx/Point.h"
#include "mozilla/CheckedInt.h"
#include "mozilla/ReentrantMonitor.h"
#include "mozilla/Maybe.h"
namespace mozilla {
class MediaData;
class AudioSegment;
class MediaStream;
class MediaInputPort;
class SourceMediaStream;
class ProcessedMediaStream;
class DecodedStream;
class DecodedStreamGraphListener;
class OutputStreamListener;
class ReentrantMonitor;
class DecodedStreamData;
class MediaData;
class MediaInputPort;
class MediaStream;
class MediaStreamGraph;
class OutputStreamListener;
class ProcessedMediaStream;
class ReentrantMonitor;
template <class T> class MediaQueue;
@ -37,52 +35,6 @@ namespace layers {
class Image;
} // namespace layers
/*
* All MediaStream-related data is protected by the decoder's monitor.
* We have at most one DecodedStreamDaata per MediaDecoder. Its stream
* is used as the input for each ProcessedMediaStream created by calls to
* captureStream(UntilEnded). Seeking creates a new source stream, as does
* replaying after the input as ended. In the latter case, the new source is
* not connected to streams created by captureStreamUntilEnded.
*/
class DecodedStreamData {
public:
DecodedStreamData(SourceMediaStream* aStream, bool aPlaying);
~DecodedStreamData();
bool IsFinished() const;
int64_t GetPosition() const;
void SetPlaying(bool aPlaying);
/* The following group of fields are protected by the decoder's monitor
* and can be read or written on any thread.
*/
// Count of audio frames written to the stream
int64_t mAudioFramesWritten;
// mNextVideoTime is the end timestamp for the last packet sent to the stream.
// Therefore video packets starting at or after this time need to be copied
// to the output stream.
int64_t mNextVideoTime; // microseconds
int64_t mNextAudioTime; // microseconds
// The last video image sent to the stream. Useful if we need to replicate
// the image.
nsRefPtr<layers::Image> mLastVideoImage;
gfx::IntSize mLastVideoImageDisplaySize;
// This is set to true when the stream is initialized (audio and
// video tracks added).
bool mStreamInitialized;
bool mHaveSentFinish;
bool mHaveSentFinishAudio;
bool mHaveSentFinishVideo;
// The decoder is responsible for calling Destroy() on this stream.
const nsRefPtr<SourceMediaStream> mStream;
nsRefPtr<DecodedStreamGraphListener> mListener;
bool mPlaying;
// True if we need to send a compensation video frame to ensure the
// StreamTime going forward.
bool mEOSVideoCompensation;
};
class OutputStreamData {
public:
~OutputStreamData();
@ -119,7 +71,7 @@ public:
bool SendData(double aVolume, bool aIsSameOrigin);
protected:
virtual ~DecodedStream() {}
virtual ~DecodedStream();
private:
ReentrantMonitor& GetReentrantMonitor() const;

Просмотреть файл

@ -13,6 +13,18 @@
#include "mozilla/Endian.h"
#include "VideoUtils.h"
#include "TimeUnits.h"
#include "prenv.h"
#ifdef PR_LOGGING
PRLogModuleInfo* gMP3DemuxerLog;
#define MP3DEMUXER_LOG(msg, ...) \
MOZ_LOG(gMP3DemuxerLog, LogLevel::Debug, ("MP3Demuxer " msg, ##__VA_ARGS__))
#define MP3DEMUXER_LOGV(msg, ...) \
MOZ_LOG(gMP3DemuxerLog, LogLevel::Verbose, ("MP3Demuxer " msg, ##__VA_ARGS__))
#else
#define MP3DEMUXER_LOG(msg, ...)
#define MP3DEMUXER_LOGV(msg, ...)
#endif
using media::TimeUnit;
using media::TimeIntervals;
@ -37,10 +49,13 @@ MP3Demuxer::InitInternal() {
nsRefPtr<MP3Demuxer::InitPromise>
MP3Demuxer::Init() {
if (!InitInternal()) {
MP3DEMUXER_LOG("MP3Demuxer::Init() failure: waiting for data");
return InitPromise::CreateAndReject(
DemuxerFailureReason::WAITING_FOR_DATA, __func__);
}
MP3DEMUXER_LOG("MP3Demuxer::Init() successful");
return InitPromise::CreateAndResolve(NS_OK, __func__);
}
@ -81,12 +96,15 @@ void
MP3Demuxer::NotifyDataArrived(uint32_t aLength, int64_t aOffset) {
// TODO: bug 1169485.
NS_WARNING("Unimplemented function NotifyDataArrived");
MP3DEMUXER_LOGV("NotifyDataArrived(%u, %" PRId64 ") mOffset=%" PRId64,
aLength, aOffset, mTrackDemuxer->GetResourceOffset());
}
void
MP3Demuxer::NotifyDataRemoved() {
// TODO: bug 1169485.
NS_WARNING("Unimplemented function NotifyDataRemoved");
MP3DEMUXER_LOGV("NotifyDataRemoved()");
}
@ -96,6 +114,12 @@ MP3TrackDemuxer::MP3TrackDemuxer(MediaResource* aSource)
: mSource(aSource)
{
Reset();
#ifdef PR_LOGGING
if (!gMP3DemuxerLog) {
gMP3DemuxerLog = PR_NewLogModule("MP3Demuxer");
}
#endif
}
bool
@ -104,6 +128,10 @@ MP3TrackDemuxer::Init() {
FastSeek(TimeUnit());
// Read the first frame to fetch sample rate and other meta data.
nsRefPtr<MediaRawData> frame(GetNextFrame(FindNextFrame()));
MP3DEMUXER_LOG("Init StreamLength()=%" PRId64 " first-frame-found=%d",
StreamLength(), !!frame);
if (!frame) {
return false;
}
@ -121,6 +149,10 @@ MP3TrackDemuxer::Init() {
mInfo->mMimeType = "audio/mpeg";
mInfo->mDuration = Duration().ToMicroseconds();
MP3DEMUXER_LOG("Init mInfo={mRate=%d mChannels=%d mBitDepth=%d mDuration=%" PRId64 "}",
mInfo->mRate, mInfo->mChannels, mInfo->mBitDepth,
mInfo->mDuration);
return mSamplesPerSecond && mChannels;
}
@ -165,6 +197,11 @@ MP3TrackDemuxer::Seek(TimeUnit aTime) {
TimeUnit
MP3TrackDemuxer::FastSeek(TimeUnit aTime) {
MP3DEMUXER_LOG("FastSeek(%" PRId64 ") avgFrameLen=%f mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " mOffset=%" PRIu64,
aTime, AverageFrameLength(), mNumParsedFrames, mFrameIndex,
mOffset);
if (!aTime.ToMicroseconds()) {
// Quick seek to the beginning of the stream.
mOffset = mFirstFrameOffset;
@ -182,6 +219,10 @@ MP3TrackDemuxer::FastSeek(TimeUnit aTime) {
mOffset = mFirstFrameOffset + numFrames * AverageFrameLength();
mFrameIndex = numFrames;
MP3DEMUXER_LOG("FastSeek mSamplesPerSecond=%d mSamplesPerFrame=%d "
"numFrames=%" PRId64,
mSamplesPerSecond, mSamplesPerFrame, numFrames);
mParser.EndFrameSession();
return Duration(mFrameIndex);
@ -189,6 +230,11 @@ MP3TrackDemuxer::FastSeek(TimeUnit aTime) {
TimeUnit
MP3TrackDemuxer::ScanUntil(TimeUnit aTime) {
MP3DEMUXER_LOG("ScanUntil(%" PRId64 ") avgFrameLen=%f mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " mOffset=%" PRIu64,
aTime, AverageFrameLength(), mNumParsedFrames, mFrameIndex,
mOffset);
if (!aTime.ToMicroseconds()) {
return FastSeek(aTime);
}
@ -200,13 +246,30 @@ MP3TrackDemuxer::ScanUntil(TimeUnit aTime) {
MediaByteRange nextRange = FindNextFrame();
while (SkipNextFrame(nextRange) && Duration(mFrameIndex + 1) < aTime) {
nextRange = FindNextFrame();
MP3DEMUXER_LOGV("ScanUntil* avgFrameLen=%f mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " mOffset=%" PRIu64 " Duration=%" PRId64,
aTime, AverageFrameLength(), mNumParsedFrames, mFrameIndex,
mOffset, Duration(mFrameIndex + 1));
}
MP3DEMUXER_LOG("ScanUntil End avgFrameLen=%f mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " mOffset=%" PRIu64,
aTime, AverageFrameLength(), mNumParsedFrames, mFrameIndex,
mOffset);
return Duration(mFrameIndex);
}
nsRefPtr<MP3TrackDemuxer::SamplesPromise>
MP3TrackDemuxer::GetSamples(int32_t aNumSamples) {
MP3DEMUXER_LOGV("GetSamples(%d) Begin mOffset=%" PRIu64 " mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d "
"mChannels=%d",
aNumSamples,
mOffset, mNumParsedFrames, mFrameIndex, mTotalFrameLen, mSamplesPerFrame,
mSamplesPerSecond, mChannels);
if (!aNumSamples) {
return SamplesPromise::CreateAndReject(
DemuxerFailureReason::DEMUXER_ERROR, __func__);
@ -223,6 +286,15 @@ MP3TrackDemuxer::GetSamples(int32_t aNumSamples) {
frames->mSamples.AppendElement(frame);
}
MP3DEMUXER_LOGV("GetSamples() End mSamples.Size()=%d aNumSamples=%d mOffset=%" PRIu64
" mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d "
"mChannels=%d",
frames->mSamples.Length(), aNumSamples,
mOffset, mNumParsedFrames, mFrameIndex, mTotalFrameLen, mSamplesPerFrame,
mSamplesPerSecond, mChannels);
if (frames->mSamples.IsEmpty()) {
return SamplesPromise::CreateAndReject(
DemuxerFailureReason::END_OF_STREAM, __func__);
@ -232,6 +304,8 @@ MP3TrackDemuxer::GetSamples(int32_t aNumSamples) {
void
MP3TrackDemuxer::Reset() {
MP3DEMUXER_LOG("Reset()");
mOffset = 0;
mFirstFrameOffset = 0;
mNumParsedFrames = 0;
@ -259,6 +333,7 @@ MP3TrackDemuxer::GetResourceOffset() const {
TimeIntervals
MP3TrackDemuxer::GetBuffered() {
// TODO: bug 1169485.
MP3DEMUXER_LOG("MP3TrackDemuxer::GetBuffered()");
NS_WARNING("Unimplemented function GetBuffered");
return TimeIntervals();
}
@ -306,6 +381,13 @@ MediaByteRange
MP3TrackDemuxer::FindNextFrame() {
static const int BUFFER_SIZE = 4096;
MP3DEMUXER_LOGV("FindNext() Begin mOffset=%" PRIu64 " mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d "
"mChannels=%d",
mOffset, mNumParsedFrames, mFrameIndex, mTotalFrameLen, mSamplesPerFrame,
mSamplesPerSecond, mChannels);
uint8_t buffer[BUFFER_SIZE];
int32_t read = 0;
const uint8_t* frameBeg = nullptr;
@ -320,9 +402,20 @@ MP3TrackDemuxer::FindNextFrame() {
}
if (frameBeg == bufferEnd || !mParser.CurrentFrame().Length()) {
MP3DEMUXER_LOG("FindNext() Exit frameBeg=%p bufferEnd=%p "
"mParser.CurrentFrame().Length()=%d ",
frameBeg, bufferEnd, mParser.CurrentFrame().Length());
return { 0, 0 };
}
MP3DEMUXER_LOGV("FindNext() End mOffset=%" PRIu64 " mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64 " bufferEnd=%p frameBeg=%p"
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d "
"mChannels=%d",
mOffset, mNumParsedFrames, mFrameIndex, bufferEnd, frameBeg,
mTotalFrameLen, mSamplesPerFrame,
mSamplesPerSecond, mChannels);
const int64_t nextBeg = mOffset - (bufferEnd - frameBeg) + 1;
return { nextBeg, nextBeg + mParser.CurrentFrame().Length() };
}
@ -337,11 +430,19 @@ MP3TrackDemuxer::SkipNextFrame(const MediaByteRange& aRange) {
UpdateState(aRange);
MP3DEMUXER_LOGV("SkipNext() End mOffset=%" PRIu64 " mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d "
"mChannels=%d",
mOffset, mNumParsedFrames, mFrameIndex, mTotalFrameLen, mSamplesPerFrame,
mSamplesPerSecond, mChannels);
return true;
}
already_AddRefed<MediaRawData>
MP3TrackDemuxer::GetNextFrame(const MediaByteRange& aRange) {
MP3DEMUXER_LOG("GetNext() Begin({mStart=%" PRId64 " Length()=%" PRId64 "})");
if (!aRange.Length()) {
return nullptr;
}
@ -351,12 +452,14 @@ MP3TrackDemuxer::GetNextFrame(const MediaByteRange& aRange) {
nsAutoPtr<MediaRawDataWriter> frameWriter(frame->CreateWriter());
if (!frameWriter->SetSize(aRange.Length())) {
MP3DEMUXER_LOG("GetNext() Exit failed to allocated media buffer");
return nullptr;
}
const uint32_t read = Read(frameWriter->mData, frame->mOffset, frame->mSize);
if (read != aRange.Length()) {
MP3DEMUXER_LOG("GetNext() Exit read=%u frame->mSize=%u", read, frame->mSize);
return nullptr;
}
@ -375,6 +478,13 @@ MP3TrackDemuxer::GetNextFrame(const MediaByteRange& aRange) {
mFirstFrameOffset = frame->mOffset;
}
MP3DEMUXER_LOGV("GetNext() End mOffset=%" PRIu64 " mNumParsedFrames=%" PRIu64
" mFrameIndex=%" PRId64
" mTotalFrameLen=%" PRIu64 " mSamplesPerFrame=%d mSamplesPerSecond=%d "
"mChannels=%d",
mOffset, mNumParsedFrames, mFrameIndex, mTotalFrameLen, mSamplesPerFrame,
mSamplesPerSecond, mChannels);
return frame.forget();
}
@ -405,6 +515,8 @@ MP3TrackDemuxer::UpdateState(const MediaByteRange& aRange) {
int32_t
MP3TrackDemuxer::Read(uint8_t* aBuffer, int64_t aOffset, int32_t aSize) {
MP3DEMUXER_LOGV("MP3TrackDemuxer::Read(%p %" PRId64 " %d)", aBuffer, aOffset, aSize);
const int64_t streamLen = StreamLength();
if (mInfo && streamLen > 0) {
// Prevent blocking reads after successful initialization.
@ -412,6 +524,7 @@ MP3TrackDemuxer::Read(uint8_t* aBuffer, int64_t aOffset, int32_t aSize) {
}
uint32_t read = 0;
MP3DEMUXER_LOGV("MP3TrackDemuxer::Read -> ReadAt(%d)", aSize);
const nsresult rv = mSource->ReadAt(aOffset, reinterpret_cast<char*>(aBuffer),
static_cast<uint32_t>(aSize), &read);
NS_ENSURE_SUCCESS(rv, 0);
@ -833,6 +946,9 @@ static const int FLAGS_END = VERSION_END + FLAGS_LEN;
static const int SIZE_END = FLAGS_END + SIZE_LEN;
static const uint8_t ID[ID_LEN] = {'I', 'D', '3'};
static const uint8_t MIN_MAJOR_VER = 2;
static const uint8_t MAX_MAJOR_VER = 4;
} // namespace id3_header
const uint8_t*
@ -912,17 +1028,20 @@ ID3Parser::ID3Header::IsValid(int aPos) const {
return true;
}
const uint8_t c = mRaw[aPos];
if (aPos < id3_header::ID_END) {
return id3_header::ID[aPos] == c;
}
if (aPos < id3_header::VERSION_END) {
return c < 0xFF;
}
if (aPos < id3_header::FLAGS_END) {
return true;
}
if (aPos < id3_header::SIZE_END) {
return c < 0x80;
switch (aPos) {
case 0: case 1: case 2:
// Expecting "ID3".
return id3_header::ID[aPos] == c;
case 3:
return MajorVersion() >= id3_header::MIN_MAJOR_VER &&
MajorVersion() <= id3_header::MAX_MAJOR_VER;
case 4:
return MinorVersion() < 0xFF;
case 5:
// Validate flags for supported versions, see bug 949036.
return ((0xFF >> MajorVersion()) & c) == 0;
case 6: case 7: case 8: case 9:
return c < 0x80;
}
return true;
}

Просмотреть файл

@ -3,6 +3,6 @@
<head>
</head>
<body>
<video src="789075.webm" onloadedmetadata="document.documentElement.className=undefined"></video>
<video src="789075.webm" preload="metadata" onloadedmetadata="document.documentElement.className=undefined"></video>
</body>
</html>

Просмотреть файл

@ -12,6 +12,6 @@ function boom()
</head>
<body>
<video id="a" src="cors.webm" crossorigin onloadedmetadata="boom();">
<video id="a" src="cors.webm" crossorigin preload="metadata" onloadedmetadata="boom();">
</body>
</html>

Просмотреть файл

@ -1,5 +1,5 @@
skip-if(Android||B2G) load 0-timescale.html # bug 1048628 for Android
skip-if(Android||B2G) load 459439-1.html # bug 888557
skip-if(Android||B2G) load 0-timescale.html # bug 1048628
skip-if(Android) load 459439-1.html # bug 888557
load 466607-1.html
load 466945-1.html
load 468763-1.html
@ -10,8 +10,8 @@ load 492286-1.xhtml
load 495794-1.html
load 576612-1.html
load 752784-1.html
skip-if(Android||B2G) load 789075-1.html # bug 1048926
skip-if(Android||B2G) HTTP load 795892-1.html # bug 1048926
load 789075-1.html
HTTP load 795892-1.html
load 844563.html
load 846612.html
load 852838.html
@ -71,25 +71,24 @@ load 995289.html
load 1012609.html
load 1015662.html
load 1020205.html
skip-if(Android||B2G) test-pref(media.navigator.permission.disabled,true) load 1028458.html # bug 1048863
load 1041466.html
load 1045650.html
skip-if(Android||B2G) test-pref(media.navigator.permission.disabled,true) load 1028458.html # bug 1048863
load 1080986.html
load 1122218.html
load 1127188.html
load 1157994.html
load 1158427.html
load 1185176.html
load 1185192.html
load analyser-channels-1.html
load audiocontext-double-suspend.html
load buffer-source-ended-1.html
load doppler-1.html
HTTP load media-element-source-seek-1.html
load offline-buffer-source-ended-1.html
load oscillator-ended-1.html
load oscillator-ended-2.html
load 1080986.html
load 1158427.html
load 1157994.html
load 1122218.html
load 1127188.html
load audiocontext-double-suspend.html
load 1185176.html
load 1185192.html
include ../../mediasource/test/crashtests/crashtests.list
# This needs to run at the end to avoid leaking busted state into other tests.
skip-if(B2G||winWidget||OSX==1006||OSX==1010&&isDebugBuild) load 691096-1.html
skip-if(B2G) load 691096-1.html # bug 852821

Просмотреть файл

@ -12,7 +12,7 @@
#include "mozilla/dom/HTMLMediaElement.h"
#include "mozilla/dom/AudioContextBinding.h"
#include "mozilla/dom/OfflineAudioContextBinding.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "MediaStreamGraph.h"
#include "AudioChannelService.h"
#include "AudioDestinationNode.h"

Просмотреть файл

@ -2,6 +2,7 @@ ifdef MOZ_WEBSPEECH_MODELS
MODELSPS_KEEP_PATH := 1
MODELSPS_FILES := models/dict/en-US.dic \
models/dict/en-US.dic.dmp \
models/en-US/mixture_weights \
models/en-US/feat.params \
models/en-US/mdef \

Двоичные данные
dom/media/webspeech/recognition/models/dict/en-US.dic.dmp Normal file

Двоичный файл не отображается.

Просмотреть файл

@ -60,6 +60,14 @@ XPCOMUtils.defineLazyServiceGetter(this, "gIccService",
"@mozilla.org/icc/iccservice;1",
"nsIIccService");
XPCOMUtils.defineLazyServiceGetter(this, "gDataCallManager",
"@mozilla.org/datacall/manager;1",
"nsIDataCallManager");
XPCOMUtils.defineLazyModuleGetter(this, "gTelephonyUtils",
"resource://gre/modules/TelephonyUtils.jsm",
"TelephonyUtils");
XPCOMUtils.defineLazyGetter(this, "gRadioInterfaceLayer", function() {
let ril = { numRadioInterfaces: 0 };
try {
@ -720,6 +728,105 @@ MobileConnectionProvider.prototype = {
if (isUpdated && !aBatch) {
this.deliverListenerEvent("notifyDataChanged");
}
if (isUpdated) {
this._ensureDataRegistration();
}
},
_dataRegistrationFailed: false,
_ensureDataRegistration: function() {
let isDataRegistered =
this.data &&
this.data.state == RIL.GECKO_MOBILE_CONNECTION_STATE_REGISTERED;
let isVoiceRegistered =
this.voice &&
this.voice.state == RIL.GECKO_MOBILE_CONNECTION_STATE_REGISTERED;
if (isVoiceRegistered && isDataRegistered) {
if (DEBUG) {
this._debug("Voice and data registered.");
}
this._dataRegistrationFailed = false;
return;
}
if (isVoiceRegistered && !isDataRegistered &&
this._clientId == gDataCallManager.dataDefaultServiceId) {
// We have been here before, no more recovery.
if (this._dataRegistrationFailed) {
if (DEBUG) {
this._debug("Voice and data not consistent: " + this.voice.state +
" != " + this.data.state + ".");
}
return;
}
if (DEBUG) {
this._debug("Voice and data not consistent: " + this.voice.state +
" != " + this.data.state + ", try to recover.");
}
this._dataRegistrationFailed = true;
// If there is any ongoing call, wait for them to disconnect.
if (gTelephonyUtils.hasAnyCalls(this._clientId)) {
gTelephonyUtils.waitForNoCalls(this._clientId)
.then(() => {
if (this._dataRegistrationFailed) {
this._recoverDataRegistration();
}
});
return;
}
this._recoverDataRegistration();
}
},
/**
* To recover data registration, get the current preferred network type first,
* then set it to a temporary preferred network type, and last set back to the
* previous preferred network type. This is will cause deregistration and
* registration on both voice and data networks.
*/
_recoverDataRegistration: function() {
if (DEBUG) {
this._debug("Trying to recover data registration...");
}
let currentPreferredNetworkType;
let resetPreferredNetworkType = () => {
this.setPreferredNetworkType(currentPreferredNetworkType, {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionCallback]),
notifySuccess: () => {},
notifyError: aErrorMsg => {}
});
};
let setTemporaryPreferredNetworkType = () => {
this.setPreferredNetworkType(
Ci.nsIMobileConnection.PREFERRED_NETWORK_TYPE_WCDMA_GSM_CDMA_EVDO, {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionCallback]),
notifySuccess: () => resetPreferredNetworkType(),
notifyError: aErrorMsg => resetPreferredNetworkType()
});
};
this.getPreferredNetworkType({
QueryInterface: XPCOMUtils.generateQI([Ci.nsIMobileConnectionCallback]),
notifyGetPreferredNetworkTypeSuccess: networkType => {
currentPreferredNetworkType = networkType;
setTemporaryPreferredNetworkType();
},
notifyError: aErrorMsg => {
currentPreferredNetworkType =
Ci.nsIMobileConnection.PREFERRED_NETWORK_TYPE_LTE_WCDMA_GSM_CDMA_EVDO;
setTemporaryPreferredNetworkType();
}
});
},
updateOperatorInfo: function(aNewInfo, aBatch = false) {

Просмотреть файл

@ -7,7 +7,7 @@
#include "mozilla/dom/Notification.h"
#include "mozilla/dom/AppNotificationServiceOptionsBinding.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/PromiseWorkerProxy.h"
#include "mozilla/Move.h"

Просмотреть файл

@ -11,7 +11,7 @@
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/DOMError.h"
#include "mozilla/dom/DOMException.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "mozilla/dom/PromiseBinding.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/MediaStreamError.h"

Просмотреть файл

@ -149,6 +149,10 @@ DataCallManager.prototype = {
dump("-*- DataCallManager: " + aMsg + "\n");
},
get dataDefaultServiceId() {
return this._dataDefaultClientId;
},
getDataCallHandler: function(aClientId) {
let handler = this._connectionHandlers[aClientId]
if (!handler) {

Просмотреть файл

@ -134,6 +134,12 @@ GonkGPSGeolocationProvider::LocationCallback(GpsLocation* location)
// current time, most notably: the geolocation service which respects maximumAge
// set in the DOM JS.
if (gDebug_isLoggingEnabled) {
nsContentUtils::LogMessageToConsole("geo: GPS got a fix (%f, %f). accuracy: %f",
location->latitude,
location->longitude,
location->accuracy);
}
NS_DispatchToMainThread(new UpdateLocationEvent(somewhere));
}
@ -141,11 +147,78 @@ GonkGPSGeolocationProvider::LocationCallback(GpsLocation* location)
void
GonkGPSGeolocationProvider::StatusCallback(GpsStatus* status)
{
if (gDebug_isLoggingEnabled) {
switch (status->status) {
case GPS_STATUS_NONE:
nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_NONE\n");
break;
case GPS_STATUS_SESSION_BEGIN:
nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_SESSION_BEGIN\n");
break;
case GPS_STATUS_SESSION_END:
nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_SESSION_END\n");
break;
case GPS_STATUS_ENGINE_ON:
nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_ENGINE_ON\n");
break;
case GPS_STATUS_ENGINE_OFF:
nsContentUtils::LogMessageToConsole("geo: GPS_STATUS_ENGINE_OFF\n");
break;
default:
nsContentUtils::LogMessageToConsole("geo: Unknown GPS status\n");
break;
}
}
}
void
GonkGPSGeolocationProvider::SvStatusCallback(GpsSvStatus* sv_info)
{
if (gDebug_isLoggingEnabled) {
static int numSvs = 0;
static uint32_t numEphemeris = 0;
static uint32_t numAlmanac = 0;
static uint32_t numUsedInFix = 0;
unsigned int i = 1;
uint32_t svAlmanacCount = 0;
for (i = 1; i > 0; i <<= 1) {
if (i & sv_info->almanac_mask) {
svAlmanacCount++;
}
}
uint32_t svEphemerisCount = 0;
for (i = 1; i > 0; i <<= 1) {
if (i & sv_info->ephemeris_mask) {
svEphemerisCount++;
}
}
uint32_t svUsedCount = 0;
for (i = 1; i > 0; i <<= 1) {
if (i & sv_info->used_in_fix_mask) {
svUsedCount++;
}
}
// Log the message only if the the status changed.
if (sv_info->num_svs != numSvs ||
svAlmanacCount != numAlmanac ||
svEphemerisCount != numEphemeris ||
svUsedCount != numUsedInFix) {
nsContentUtils::LogMessageToConsole(
"geo: Number of SVs have (visibility, almanac, ephemeris): (%d, %d, %d)."
" %d of these SVs were used in fix.\n",
sv_info->num_svs, svAlmanacCount, svEphemerisCount, svUsedCount);
numSvs = sv_info->num_svs;
numAlmanac = svAlmanacCount;
numEphemeris = svEphemerisCount;
numUsedInFix = svUsedCount;
}
}
}
void

Просмотреть файл

@ -55,9 +55,11 @@ interface nsIDataCallHandler : nsISupports
void updateRILNetworkInterface();
};
[scriptable, uuid(aac54873-5771-4093-a72b-fe39967c6607)]
[scriptable, uuid(2c46e37d-88dc-4d25-bb37-e1c0d3e9cb5f)]
interface nsIDataCallManager : nsISupports
{
readonly attribute long dataDefaultServiceId;
/**
* Get the corresponding data call handler.
*

Просмотреть файл

@ -1831,7 +1831,7 @@ void
nsEditor::NotifyEditorObservers(NotificationForEditorObservers aNotification)
{
// Copy the observers since EditAction()s can modify mEditorObservers.
nsTArray<mozilla::dom::OwningNonNull<nsIEditorObserver>> observers(mEditorObservers);
nsTArray<mozilla::OwningNonNull<nsIEditorObserver>> observers(mEditorObservers);
switch (aNotification) {
case eNotifyEditorObserversOfEnd:
mIsInEditAction = false;
@ -3831,6 +3831,33 @@ nsEditor::IsPreformatted(nsIDOMNode *aNode, bool *aResult)
// a new element, for instance, if that's why you were splitting
// the node.
//
int32_t
nsEditor::SplitNodeDeep(nsIContent& aNode, nsIContent& aSplitPointParent,
int32_t aSplitPointOffset,
EmptyContainers aEmptyContainers,
nsIContent** outLeftNode,
nsIContent** outRightNode)
{
int32_t offset;
nsCOMPtr<nsIDOMNode> leftNodeDOM, rightNodeDOM;
nsresult res = SplitNodeDeep(aNode.AsDOMNode(),
aSplitPointParent.AsDOMNode(), aSplitPointOffset, &offset,
aEmptyContainers == EmptyContainers::no, address_of(leftNodeDOM),
address_of(rightNodeDOM));
NS_ENSURE_SUCCESS(res, -1);
if (outLeftNode) {
nsCOMPtr<nsIContent> leftNode = do_QueryInterface(leftNodeDOM);
MOZ_ASSERT(!leftNodeDOM || leftNode);
leftNode.forget(outLeftNode);
}
if (outRightNode) {
nsCOMPtr<nsIContent> rightNode = do_QueryInterface(rightNodeDOM);
MOZ_ASSERT(!rightNodeDOM || rightNode);
rightNode.forget(outRightNode);
}
return offset;
}
nsresult
nsEditor::SplitNodeDeep(nsIDOMNode *aNode,
nsIDOMNode *aSplitPointParent,

Просмотреть файл

@ -7,7 +7,7 @@
#define __editor_h__
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc.
#include "mozilla/dom/OwningNonNull.h" // for OwningNonNull
#include "mozilla/OwningNonNull.h" // for OwningNonNull
#include "mozilla/dom/Text.h"
#include "nsAutoPtr.h" // for nsRefPtr
#include "nsCOMPtr.h" // for already_AddRefed, nsCOMPtr
@ -638,13 +638,17 @@ public:
nsresult IsPreformatted(nsIDOMNode *aNode, bool *aResult);
nsresult SplitNodeDeep(nsIDOMNode *aNode,
nsIDOMNode *aSplitPointParent,
int32_t aSplitPointOffset,
int32_t *outOffset,
bool aNoEmptyContainers = false,
nsCOMPtr<nsIDOMNode> *outLeftNode = 0,
nsCOMPtr<nsIDOMNode> *outRightNode = 0);
enum class EmptyContainers { no, yes };
int32_t SplitNodeDeep(nsIContent& aNode, nsIContent& aSplitPointParent,
int32_t aSplitPointOffset,
EmptyContainers aEmptyContainers =
EmptyContainers::yes,
nsIContent** outLeftNode = nullptr,
nsIContent** outRightNode = nullptr);
nsresult SplitNodeDeep(nsIDOMNode* aNode, nsIDOMNode* aSplitPointParent,
int32_t aSplitPointOffset, int32_t* outOffset, bool aNoEmptyContainers =
false, nsCOMPtr<nsIDOMNode>* outLeftNode = nullptr, nsCOMPtr<nsIDOMNode>*
outRightNode = nullptr);
::DOMPoint JoinNodeDeep(nsIContent& aLeftNode, nsIContent& aRightNode);
nsresult GetString(const nsAString& name, nsAString& value);
@ -848,11 +852,11 @@ protected:
// various listeners
// Listens to all low level actions on the doc
nsTArray<mozilla::dom::OwningNonNull<nsIEditActionListener>> mActionListeners;
nsTArray<mozilla::OwningNonNull<nsIEditActionListener>> mActionListeners;
// Just notify once per high level change
nsTArray<mozilla::dom::OwningNonNull<nsIEditorObserver>> mEditorObservers;
nsTArray<mozilla::OwningNonNull<nsIEditorObserver>> mEditorObservers;
// Listen to overall doc state (dirty or not, just created, etc)
nsTArray<mozilla::dom::OwningNonNull<nsIDocumentStateListener>> mDocStateListeners;
nsTArray<mozilla::OwningNonNull<nsIDocumentStateListener>> mDocStateListeners;
nsSelectionState mSavedSel; // cached selection for nsAutoSelectionReset
nsRangeUpdater mRangeUpdater; // utility class object for maintaining preserved ranges

Просмотреть файл

@ -5,7 +5,7 @@
#include "nsEditorUtils.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "mozilla/dom/Selection.h"
#include "nsComponentManagerUtils.h"
#include "nsError.h"

Просмотреть файл

@ -20,8 +20,8 @@ class nsIContentIterator;
class nsIDOMDocument;
class nsRange;
namespace mozilla {
namespace dom {
template <class T> class OwningNonNull;
namespace dom {
class Selection;
} // namespace dom
} // namespace mozilla
@ -181,7 +181,7 @@ class MOZ_STACK_CLASS nsDOMIterator
nsresult Init(nsRange& aRange);
void AppendList(const nsBoolDomIterFunctor& functor,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& arrayOfNodes) const;
nsTArray<mozilla::OwningNonNull<nsINode>>& arrayOfNodes) const;
protected:
nsCOMPtr<nsIContentIterator> mIter;
};

Просмотреть файл

@ -7,7 +7,7 @@
#include <string.h>
#include "mozilla/dom/DocumentFragment.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Base64.h"
#include "mozilla/BasicEvents.h"
@ -402,9 +402,12 @@ nsHTMLEditor::DoInsertHTMLWithContext(const nsAString & aInputString,
// Are we in a text node? If so, split it.
if (IsTextNode(parentNode))
{
nsCOMPtr<nsIContent> parentContent = do_QueryInterface(parentNode);
NS_ENSURE_STATE(parentContent || !parentNode);
offsetOfNewNode = SplitNodeDeep(*parentContent, *parentContent,
offsetOfNewNode);
NS_ENSURE_STATE(offsetOfNewNode != -1);
nsCOMPtr<nsIDOMNode> temp;
rv = SplitNodeDeep(parentNode, parentNode, offsetOfNewNode, &offsetOfNewNode);
NS_ENSURE_SUCCESS(rv, rv);
rv = parentNode->GetParentNode(getter_AddRefs(temp));
NS_ENSURE_SUCCESS(rv, rv);
parentNode = temp;
@ -684,12 +687,15 @@ nsHTMLEditor::DoInsertHTMLWithContext(const nsAString & aInputString,
// nudging selection point beyond it? Because it might have ended in a BR
// that is not visible. If so, the code above just placed selection
// inside that. So I split it instead.
nsCOMPtr<nsIDOMNode> leftLink;
int32_t linkOffset;
rv = SplitNodeDeep(link, selNode, selOffset, &linkOffset, true, address_of(leftLink));
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIContent> linkContent = do_QueryInterface(link);
NS_ENSURE_STATE(linkContent || !link);
nsCOMPtr<nsIContent> selContent = do_QueryInterface(selNode);
NS_ENSURE_STATE(selContent || !selNode);
nsCOMPtr<nsIContent> leftLink;
SplitNodeDeep(*linkContent, *selContent, selOffset,
EmptyContainers::no, getter_AddRefs(leftLink));
if (leftLink) {
selNode = GetNodeLocation(leftLink, &selOffset);
selNode = GetNodeLocation(GetAsDOMNode(leftLink), &selOffset);
selection->Collapse(selNode, selOffset+1);
}
}

Просмотреть файл

@ -13,7 +13,7 @@
#include "mozilla/Preferences.h"
#include "mozilla/dom/Selection.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "mozilla/mozalloc.h"
#include "nsAString.h"
#include "nsAlgorithm.h"
@ -1650,7 +1650,7 @@ nsHTMLEditRules::StandardBreakImpl(nsIDOMNode* aNode, int32_t aOffset,
} else {
NS_ENSURE_STATE(mHTMLEditor);
nsWSRunObject wsObj(mHTMLEditor, node, aOffset);
int32_t visOffset = 0, newOffset;
int32_t visOffset = 0;
WSType wsType;
nsCOMPtr<nsINode> node_(do_QueryInterface(node)), visNode;
wsObj.PriorVisibleNode(node_, aOffset, address_of(visNode),
@ -1671,12 +1671,12 @@ nsHTMLEditRules::StandardBreakImpl(nsIDOMNode* aNode, int32_t aOffset,
res = linkNode->GetParentNode(getter_AddRefs(linkParent));
NS_ENSURE_SUCCESS(res, res);
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->SplitNodeDeep(linkNode, node, aOffset,
&newOffset, true);
NS_ENSURE_SUCCESS(res, res);
// reset {node,aOffset} to the point where link was split
nsCOMPtr<nsIContent> linkNodeContent = do_QueryInterface(linkNode);
NS_ENSURE_STATE(linkNodeContent || !linkNode);
aOffset = mHTMLEditor->SplitNodeDeep(*linkNodeContent,
*node_->AsContent(), aOffset, nsHTMLEditor::EmptyContainers::no);
NS_ENSURE_STATE(aOffset != -1);
node = linkParent;
aOffset = newOffset;
}
node_ = do_QueryInterface(node);
nsCOMPtr<Element> br =
@ -1748,10 +1748,10 @@ nsresult
nsHTMLEditRules::SplitMailCites(Selection* aSelection, bool* aHandled)
{
NS_ENSURE_TRUE(aSelection && aHandled, NS_ERROR_NULL_POINTER);
nsCOMPtr<nsIDOMNode> leftCite, rightCite;
nsCOMPtr<nsIContent> leftCite, rightCite;
nsCOMPtr<nsINode> selNode;
nsCOMPtr<Element> citeNode;
int32_t selOffset, newOffset;
int32_t selOffset;
NS_ENSURE_STATE(mHTMLEditor);
nsresult res = mHTMLEditor->GetStartNodeAndOffset(aSelection, getter_AddRefs(selNode), &selOffset);
NS_ENSURE_SUCCESS(res, res);
@ -1785,11 +1785,11 @@ nsHTMLEditRules::SplitMailCites(Selection* aSelection, bool* aHandled)
}
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->SplitNodeDeep(GetAsDOMNode(citeNode),
GetAsDOMNode(selNode), selOffset,
&newOffset, true, address_of(leftCite),
address_of(rightCite));
NS_ENSURE_SUCCESS(res, res);
NS_ENSURE_STATE(selNode->IsContent());
int32_t newOffset = mHTMLEditor->SplitNodeDeep(*citeNode,
*selNode->AsContent(), selOffset, nsHTMLEditor::EmptyContainers::no,
getter_AddRefs(leftCite), getter_AddRefs(rightCite));
NS_ENSURE_STATE(newOffset != -1);
selNode = citeNode->GetParentNode();
NS_ENSURE_STATE(mHTMLEditor);
nsCOMPtr<Element> brNode = mHTMLEditor->CreateBR(selNode, newOffset);
@ -3457,15 +3457,16 @@ nsHTMLEditRules::WillMakeBasicBlock(Selection* aSelection,
if (tString.EqualsLiteral("normal") ||
tString.IsEmpty() ) // we are removing blocks (going to "body text")
{
nsCOMPtr<nsIDOMNode> curBlock = parent->AsDOMNode();
if (!IsBlockNode(curBlock)) {
nsCOMPtr<Element> curBlock;
if (IsBlockNode(GetAsDOMNode(parent))) {
curBlock = parent->AsElement();
} else {
NS_ENSURE_STATE(mHTMLEditor);
curBlock = dont_AddRef(GetAsDOMNode(
mHTMLEditor->GetBlockNodeParent(parent).take()));
curBlock = mHTMLEditor->GetBlockNodeParent(parent);
}
nsCOMPtr<nsIDOMNode> curBlockPar;
NS_ENSURE_TRUE(curBlock, NS_ERROR_NULL_POINTER);
curBlock->GetParentNode(getter_AddRefs(curBlockPar));
nsCOMPtr<nsIDOMNode> curBlockPar =
GetAsDOMNode(curBlock->GetParentNode());
if (nsHTMLEditUtils::IsFormatNode(curBlock))
{
// if the first editable node after selection is a br, consume it. Otherwise
@ -3483,9 +3484,10 @@ nsHTMLEditRules::WillMakeBasicBlock(Selection* aSelection,
}
// do the splits!
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->SplitNodeDeep(curBlock, parent->AsDOMNode(), offset,
&offset, true);
NS_ENSURE_SUCCESS(res, res);
offset = mHTMLEditor->SplitNodeDeep(*curBlock, *parent->AsContent(),
offset,
nsHTMLEditor::EmptyContainers::no);
NS_ENSURE_STATE(offset != -1);
// put a br at the split point
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->CreateBR(curBlockPar, offset, address_of(brNode));
@ -4336,38 +4338,49 @@ nsHTMLEditRules::SplitBlock(nsIDOMNode *aBlock,
{
NS_ENSURE_TRUE(aBlock && aStartChild && aEndChild, NS_ERROR_NULL_POINTER);
nsCOMPtr<nsIDOMNode> leftNode, rightNode;
int32_t startOffset, endOffset, offset;
nsresult res;
nsCOMPtr<nsIContent> leftNode, rightNode;
int32_t startOffset, endOffset;
// get split point location
nsCOMPtr<nsIDOMNode> startParent = nsEditor::GetNodeLocation(aStartChild, &startOffset);
// do the splits!
nsCOMPtr<nsIContent> block = do_QueryInterface(aBlock);
NS_ENSURE_STATE(block || !aBlock);
nsCOMPtr<nsIContent> startParentContent = do_QueryInterface(startParent);
NS_ENSURE_STATE(startParentContent || !startParent);
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->SplitNodeDeep(aBlock, startParent, startOffset, &offset,
true, address_of(leftNode), address_of(rightNode));
NS_ENSURE_SUCCESS(res, res);
if (rightNode) aBlock = rightNode;
mHTMLEditor->SplitNodeDeep(*block, *startParentContent, startOffset,
nsHTMLEditor::EmptyContainers::no,
getter_AddRefs(leftNode),
getter_AddRefs(rightNode));
if (rightNode) {
aBlock = GetAsDOMNode(rightNode);
}
// remember left portion of block if caller requested
if (aLeftNode)
*aLeftNode = leftNode;
*aLeftNode = GetAsDOMNode(leftNode);
// get split point location
nsCOMPtr<nsIDOMNode> endParent = nsEditor::GetNodeLocation(aEndChild, &endOffset);
endOffset++; // want to be after lastBQChild
// do the splits!
nsCOMPtr<nsIContent> endParentContent = do_QueryInterface(endParent);
NS_ENSURE_STATE(endParentContent || !endParent);
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->SplitNodeDeep(aBlock, endParent, endOffset, &offset,
true, address_of(leftNode), address_of(rightNode));
NS_ENSURE_SUCCESS(res, res);
if (leftNode) aBlock = leftNode;
mHTMLEditor->SplitNodeDeep(*block, *endParentContent, endOffset,
nsHTMLEditor::EmptyContainers::no,
getter_AddRefs(leftNode),
getter_AddRefs(rightNode));
if (leftNode) {
aBlock = GetAsDOMNode(leftNode);
}
// remember right portion of block if caller requested
if (aRightNode)
*aRightNode = rightNode;
*aRightNode = GetAsDOMNode(rightNode);
if (aMiddleNode)
*aMiddleNode = aBlock;
@ -4542,8 +4555,10 @@ nsHTMLEditRules::CreateStyleForInsertText(Selection* aSelection,
if (mHTMLEditor->IsTextNode(node)) {
// if we are in a text node, split it
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->SplitNodeDeep(node, node, offset, &offset);
NS_ENSURE_SUCCESS(res, res);
nsCOMPtr<nsIContent> content = do_QueryInterface(node);
NS_ENSURE_STATE(content || !node);
offset = mHTMLEditor->SplitNodeDeep(*content, *content, offset);
NS_ENSURE_STATE(offset != -1);
node->GetParentNode(getter_AddRefs(tmp));
node = tmp;
}
@ -4706,7 +4721,7 @@ nsHTMLEditRules::WillAlign(Selection* aSelection,
// consume a trailing br, if any. This is to keep an alignment from
// creating extra lines, if possible.
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->GetNextHTMLNode(parent->AsDOMNode(), offset,
res = mHTMLEditor->GetNextHTMLNode(GetAsDOMNode(parent), offset,
address_of(brNode));
NS_ENSURE_SUCCESS(res, res);
if (brNode && nsTextEditUtils::IsBreak(brNode))
@ -4715,7 +4730,7 @@ nsHTMLEditRules::WillAlign(Selection* aSelection,
// we are putting our div is not a block, then the br we
// found is in same block we are, so its safe to consume it.
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->GetNextHTMLSibling(parent->AsDOMNode(), offset,
res = mHTMLEditor->GetNextHTMLSibling(GetAsDOMNode(parent), offset,
address_of(sib));
NS_ENSURE_SUCCESS(res, res);
if (!IsBlockNode(sib))
@ -4730,14 +4745,14 @@ nsHTMLEditRules::WillAlign(Selection* aSelection,
offset);
NS_ENSURE_STATE(theDiv);
// remember our new block for postprocessing
mNewBlock = theDiv->AsDOMNode();
mNewBlock = GetAsDOMNode(theDiv);
// set up the alignment on the div, using HTML or CSS
nsCOMPtr<nsIDOMElement> divElem = do_QueryInterface(theDiv);
res = AlignBlock(divElem, alignType, true);
NS_ENSURE_SUCCESS(res, res);
*aHandled = true;
// put in a moz-br so that it won't get deleted
res = CreateMozBR(theDiv->AsDOMNode(), 0);
res = CreateMozBR(GetAsDOMNode(theDiv), 0);
NS_ENSURE_SUCCESS(res, res);
res = aSelection->Collapse(theDiv, 0);
selectionResetter.Abort(); // don't reset our selection in this case.
@ -4836,7 +4851,7 @@ nsHTMLEditRules::WillAlign(Selection* aSelection,
curDiv = mHTMLEditor->CreateNode(nsGkAtoms::div, curParent, offset);
NS_ENSURE_STATE(curDiv);
// remember our new block for postprocessing
mNewBlock = curDiv->AsDOMNode();
mNewBlock = GetAsDOMNode(curDiv);
// set up the alignment on the div
nsCOMPtr<nsIDOMElement> divElem = do_QueryInterface(curDiv);
res = AlignBlock(divElem, alignType, true);
@ -4872,7 +4887,7 @@ nsHTMLEditRules::AlignInnerBlocks(nsINode& aNode, const nsAString* alignType)
// Now that we have the list, align their contents as requested
for (auto& node : nodeArray) {
nsresult res = AlignBlockContents(node->AsDOMNode(), alignType);
nsresult res = AlignBlockContents(GetAsDOMNode(node), alignType);
NS_ENSURE_SUCCESS(res, res);
}
@ -5762,7 +5777,7 @@ nsHTMLEditRules::GetNodesForOperation(nsTArray<nsRefPtr<nsRange>>& aArrayOfRange
nsCOMPtr<nsIEditor> kungFuDeathGrip(mHTMLEditor);
int32_t rangeCount = aArrayOfRanges.Length();
nsresult res;
nsresult res = NS_OK;
// Bust up any inlines that cross our range endpoints, but only if we are
// allowed to touch content.
@ -5795,7 +5810,7 @@ nsHTMLEditRules::GetNodesForOperation(nsTArray<nsRefPtr<nsRange>>& aArrayOfRange
// Gather up a list of all the nodes
for (auto& range : aArrayOfRanges) {
nsDOMSubtreeIterator iter;
nsresult res = iter.Init(*range);
res = iter.Init(*range);
NS_ENSURE_SUCCESS(res, res);
if (aOutArrayOfNodes.Length() == 0) {
iter.AppendList(nsTrivialFunctor(), aOutArrayOfNodes);
@ -5862,7 +5877,7 @@ nsHTMLEditRules::GetNodesForOperation(nsTArray<nsRefPtr<nsRange>>& aArrayOfRange
IsInlineNode(GetAsDOMNode(node)) && mHTMLEditor->IsContainer(node) &&
!mHTMLEditor->IsTextNode(node)) {
nsTArray<OwningNonNull<nsINode>> arrayOfInlines;
res = BustUpInlinesAtBRs(*node, arrayOfInlines);
res = BustUpInlinesAtBRs(*node->AsContent(), arrayOfInlines);
NS_ENSURE_SUCCESS(res, res);
// Put these nodes in aOutArrayOfNodes, replacing the current node
@ -6074,52 +6089,51 @@ nsHTMLEditRules::GetParagraphFormatNodes(nsTArray<OwningNonNull<nsINode>>& outAr
nsresult
nsHTMLEditRules::BustUpInlinesAtRangeEndpoints(nsRangeStore &item)
{
nsresult res = NS_OK;
bool isCollapsed = ((item.startNode == item.endNode) && (item.startOffset == item.endOffset));
nsCOMPtr<nsIDOMNode> endInline =
GetHighestInlineParent(GetAsDOMNode(item.endNode));
nsCOMPtr<nsIContent> endInline =
do_QueryInterface(GetHighestInlineParent(GetAsDOMNode(item.endNode)));
// if we have inline parents above range endpoints, split them
if (endInline && !isCollapsed)
{
nsCOMPtr<nsIDOMNode> resultEndNode;
int32_t resultEndOffset;
endInline->GetParentNode(getter_AddRefs(resultEndNode));
nsCOMPtr<nsINode> resultEndNode = endInline->GetParentNode();
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->SplitNodeDeep(endInline, GetAsDOMNode(item.endNode),
item.endOffset, &resultEndOffset, true);
NS_ENSURE_SUCCESS(res, res);
// item.endNode must be content if endInline isn't null
int32_t resultEndOffset =
mHTMLEditor->SplitNodeDeep(*endInline, *item.endNode->AsContent(),
item.endOffset,
nsEditor::EmptyContainers::no);
NS_ENSURE_TRUE(resultEndOffset != -1, NS_ERROR_FAILURE);
// reset range
item.endNode = do_QueryInterface(resultEndNode);
item.endNode = resultEndNode;
item.endOffset = resultEndOffset;
}
nsCOMPtr<nsIDOMNode> startInline =
GetHighestInlineParent(GetAsDOMNode(item.startNode));
nsCOMPtr<nsIContent> startInline =
do_QueryInterface(GetHighestInlineParent(GetAsDOMNode(item.startNode)));
if (startInline)
{
nsCOMPtr<nsIDOMNode> resultStartNode;
int32_t resultStartOffset;
startInline->GetParentNode(getter_AddRefs(resultStartNode));
nsCOMPtr<nsINode> resultStartNode = startInline->GetParentNode();
NS_ENSURE_STATE(mHTMLEditor);
res = mHTMLEditor->SplitNodeDeep(startInline, GetAsDOMNode(item.startNode),
item.startOffset, &resultStartOffset,
true);
NS_ENSURE_SUCCESS(res, res);
int32_t resultStartOffset =
mHTMLEditor->SplitNodeDeep(*startInline, *item.startNode->AsContent(),
item.startOffset,
nsEditor::EmptyContainers::no);
NS_ENSURE_TRUE(resultStartOffset != -1, NS_ERROR_FAILURE);
// reset range
item.startNode = do_QueryInterface(resultStartNode);
item.startNode = resultStartNode;
item.startOffset = resultStartOffset;
}
return res;
return NS_OK;
}
nsresult
nsHTMLEditRules::BustUpInlinesAtBRs(nsINode& aNode,
nsHTMLEditRules::BustUpInlinesAtBRs(nsIContent& aNode,
nsTArray<OwningNonNull<nsINode>>& aOutArrayOfNodes)
{
NS_ENSURE_STATE(mHTMLEditor);
@ -6139,43 +6153,41 @@ nsHTMLEditRules::BustUpInlinesAtBRs(nsINode& aNode,
// Else we need to bust up inNode along all the breaks
nsCOMPtr<nsINode> inlineParentNode = aNode.GetParentNode();
nsCOMPtr<nsIDOMNode> splitDeepNode = GetAsDOMNode(&aNode);
nsCOMPtr<nsIDOMNode> leftDOMNode, rightDOMNode;
nsCOMPtr<nsIContent> splitDeepNode = &aNode;
nsCOMPtr<nsIContent> leftNode, rightNode;
for (uint32_t i = 0; i < arrayOfBreaks.Length(); i++) {
OwningNonNull<Element> breakNode = *arrayOfBreaks[i]->AsElement();
NS_ENSURE_TRUE(splitDeepNode, NS_ERROR_NULL_POINTER);
nsCOMPtr<nsINode> splitParentNode = breakNode->GetParentNode();
int32_t splitOffset = splitParentNode ?
splitParentNode->IndexOf(breakNode) : -1;
NS_ENSURE_TRUE(breakNode->GetParent(), NS_ERROR_NULL_POINTER);
OwningNonNull<nsIContent> splitParentNode = *breakNode->GetParent();
int32_t splitOffset = splitParentNode->IndexOf(breakNode);
int32_t resultOffset;
nsresult res = mHTMLEditor->SplitNodeDeep(splitDeepNode,
GetAsDOMNode(splitParentNode), splitOffset, &resultOffset, false,
address_of(leftDOMNode), address_of(rightDOMNode));
NS_ENSURE_SUCCESS(res, res);
int32_t resultOffset =
mHTMLEditor->SplitNodeDeep(*splitDeepNode, splitParentNode, splitOffset,
nsHTMLEditor::EmptyContainers::yes,
getter_AddRefs(leftNode),
getter_AddRefs(rightNode));
NS_ENSURE_STATE(resultOffset != -1);
// Put left node in node list
if (leftDOMNode) {
if (leftNode) {
// Might not be a left node. A break might have been at the very
// beginning of inline container, in which case SplitNodeDeep would not
// actually split anything
nsCOMPtr<nsINode> leftNode = do_QueryInterface(leftDOMNode);
NS_ENSURE_STATE(leftNode);
aOutArrayOfNodes.AppendElement(*leftNode);
}
// Move break outside of container and also put in node list
res = mHTMLEditor->MoveNode(breakNode, inlineParentNode, resultOffset);
nsresult res = mHTMLEditor->MoveNode(breakNode, inlineParentNode,
resultOffset);
NS_ENSURE_SUCCESS(res, res);
aOutArrayOfNodes.AppendElement(*breakNode);
// Now rightNode becomes the new node to split
splitDeepNode = rightDOMNode;
splitDeepNode = rightNode;
}
// Now tack on remaining rightNode, if any, to the list
if (rightDOMNode) {
nsCOMPtr<nsINode> rightNode = do_QueryInterface(rightDOMNode);
NS_ENSURE_STATE(rightNode);
if (rightNode) {
aOutArrayOfNodes.AppendElement(*rightNode);
}
return NS_OK;

Просмотреть файл

@ -192,13 +192,13 @@ protected:
nsresult DidAbsolutePosition();
nsresult AlignInnerBlocks(nsINode& aNode, const nsAString* alignType);
nsresult AlignBlockContents(nsIDOMNode *aNode, const nsAString *alignType);
nsresult AppendInnerFormatNodes(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aArray,
nsresult AppendInnerFormatNodes(nsTArray<mozilla::OwningNonNull<nsINode>>& aArray,
nsINode* aNode);
nsresult GetFormatString(nsIDOMNode *aNode, nsAString &outFormat);
enum class Lists { no, yes };
enum class Tables { no, yes };
void GetInnerContent(nsINode& aNode,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aOutArrayOfNodes,
nsTArray<mozilla::OwningNonNull<nsINode>>& aOutArrayOfNodes,
int32_t* aIndex, Lists aLists = Lists::yes,
Tables aTables = Tables::yes);
already_AddRefed<nsIDOMNode> IsInListItem(nsIDOMNode* aNode);
@ -269,38 +269,38 @@ protected:
void PromoteRange(nsRange& aRange, EditAction inOperationType);
enum class TouchContent { no, yes };
nsresult GetNodesForOperation(nsTArray<nsRefPtr<nsRange>>& aArrayOfRanges,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aOutArrayOfNodes,
nsTArray<mozilla::OwningNonNull<nsINode>>& aOutArrayOfNodes,
EditAction aOperationType,
TouchContent aTouchContent = TouchContent::yes);
void GetChildNodesForOperation(nsINode& aNode,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& outArrayOfNodes);
nsTArray<mozilla::OwningNonNull<nsINode>>& outArrayOfNodes);
nsresult GetNodesFromPoint(::DOMPoint aPoint,
EditAction aOperation,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& outArrayOfNodes,
nsTArray<mozilla::OwningNonNull<nsINode>>& outArrayOfNodes,
TouchContent aTouchContent);
nsresult GetNodesFromSelection(mozilla::dom::Selection& aSelection,
EditAction aOperation,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& outArrayOfNodes,
nsTArray<mozilla::OwningNonNull<nsINode>>& outArrayOfNodes,
TouchContent aTouchContent = TouchContent::yes);
enum class EntireList { no, yes };
nsresult GetListActionNodes(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aOutArrayOfNodes,
nsresult GetListActionNodes(nsTArray<mozilla::OwningNonNull<nsINode>>& aOutArrayOfNodes,
EntireList aEntireList,
TouchContent aTouchContent = TouchContent::yes);
void GetDefinitionListItemTypes(mozilla::dom::Element* aElement, bool* aDT, bool* aDD);
nsresult GetParagraphFormatNodes(
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& outArrayOfNodes,
nsTArray<mozilla::OwningNonNull<nsINode>>& outArrayOfNodes,
TouchContent aTouchContent = TouchContent::yes);
void LookInsideDivBQandList(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aNodeArray);
void LookInsideDivBQandList(nsTArray<mozilla::OwningNonNull<nsINode>>& aNodeArray);
nsresult BustUpInlinesAtRangeEndpoints(nsRangeStore &inRange);
nsresult BustUpInlinesAtBRs(nsINode& aNode,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aOutArrayOfNodes);
nsresult BustUpInlinesAtBRs(nsIContent& aNode,
nsTArray<mozilla::OwningNonNull<nsINode>>& aOutArrayOfNodes);
nsCOMPtr<nsIDOMNode> GetHighestInlineParent(nsIDOMNode* aNode);
void MakeTransitionList(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aNodeArray,
void MakeTransitionList(nsTArray<mozilla::OwningNonNull<nsINode>>& aNodeArray,
nsTArray<bool>& aTransitionArray);
nsresult RemoveBlockStyle(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aNodeArray);
nsresult ApplyBlockStyle(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aNodeArray,
nsresult RemoveBlockStyle(nsTArray<mozilla::OwningNonNull<nsINode>>& aNodeArray);
nsresult ApplyBlockStyle(nsTArray<mozilla::OwningNonNull<nsINode>>& aNodeArray,
nsIAtom& aBlockTag);
nsresult MakeBlockquote(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aNodeArray);
nsresult MakeBlockquote(nsTArray<mozilla::OwningNonNull<nsINode>>& aNodeArray);
nsresult SplitAsNeeded(nsIAtom& aTag, nsCOMPtr<nsINode>& inOutParent,
int32_t& inOutOffset);
nsresult AddTerminatingBR(nsIDOMNode *aBlock);
@ -336,7 +336,7 @@ protected:
nsresult ConfirmSelectionInBody();
nsresult InsertMozBRIfNeeded(nsIDOMNode *aNode);
bool IsEmptyInline(nsIDOMNode *aNode);
bool ListIsEmptyLine(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& arrayOfNodes);
bool ListIsEmptyLine(nsTArray<mozilla::OwningNonNull<nsINode>>& arrayOfNodes);
nsresult RemoveAlignment(nsIDOMNode * aNode, const nsAString & aAlignType, bool aChildrenOnly);
nsresult MakeSureElemStartsOrEndsOnCR(nsIDOMNode *aNode, bool aStarts);
nsresult AlignBlock(nsIDOMElement * aElement, const nsAString * aAlignType, bool aContentsOnly);

Просмотреть файл

@ -53,9 +53,9 @@ class nsRange;
struct PropItem;
namespace mozilla {
template<class T> class OwningNonNull;
namespace dom {
class DocumentFragment;
template<class T> class OwningNonNull;
} // namespace dom
namespace widget {
struct IMEState;
@ -596,7 +596,7 @@ protected:
mozilla::dom::DocumentFragment** aFragment,
bool aTrustedInput);
void CreateListOfNodesToPaste(mozilla::dom::DocumentFragment& aFragment,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& outNodeList,
nsTArray<mozilla::OwningNonNull<nsINode>>& outNodeList,
nsINode* aStartNode,
int32_t aStartOffset,
nsINode* aEndNode,
@ -605,16 +605,16 @@ protected:
nsIDOMNode *aNode);
enum class StartOrEnd { start, end };
void GetListAndTableParents(StartOrEnd aStartOrEnd,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aNodeList,
nsTArray<mozilla::dom::OwningNonNull<mozilla::dom::Element>>& outArray);
int32_t DiscoverPartialListsAndTables(nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aPasteNodes,
nsTArray<mozilla::dom::OwningNonNull<mozilla::dom::Element>>& aListsAndTables);
nsTArray<mozilla::OwningNonNull<nsINode>>& aNodeList,
nsTArray<mozilla::OwningNonNull<mozilla::dom::Element>>& outArray);
int32_t DiscoverPartialListsAndTables(nsTArray<mozilla::OwningNonNull<nsINode>>& aPasteNodes,
nsTArray<mozilla::OwningNonNull<mozilla::dom::Element>>& aListsAndTables);
nsINode* ScanForListAndTableStructure(StartOrEnd aStartOrEnd,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aNodes,
nsTArray<mozilla::OwningNonNull<nsINode>>& aNodes,
mozilla::dom::Element& aListOrTable);
void ReplaceOrphanedStructure(StartOrEnd aStartOrEnd,
nsTArray<mozilla::dom::OwningNonNull<nsINode>>& aNodeArray,
nsTArray<mozilla::dom::OwningNonNull<mozilla::dom::Element>>& aListAndTableArray,
nsTArray<mozilla::OwningNonNull<nsINode>>& aNodeArray,
nsTArray<mozilla::OwningNonNull<mozilla::dom::Element>>& aListAndTableArray,
int32_t aHighWaterMark);
/* small utility routine to test if a break node is visible to user */
@ -764,7 +764,7 @@ protected:
// Data members
protected:
nsTArray<mozilla::dom::OwningNonNull<nsIContentFilter>> mContentFilters;
nsTArray<mozilla::OwningNonNull<nsIContentFilter>> mContentFilters;
nsRefPtr<TypeInState> mTypeInState;
@ -854,7 +854,7 @@ protected:
nsCOMPtr<nsISelectionListener> mSelectionListenerP;
nsCOMPtr<nsIDOMEventListener> mResizeEventListenerP;
nsTArray<mozilla::dom::OwningNonNull<nsIHTMLObjectResizeListener>> mObjectResizeEventListeners;
nsTArray<mozilla::OwningNonNull<nsIHTMLObjectResizeListener>> mObjectResizeEventListeners;
int32_t mOriginalX;
int32_t mOriginalY;

Просмотреть файл

@ -5,7 +5,7 @@
#include "nsWSRunObject.h"
#include "mozilla/dom/OwningNonNull.h"
#include "mozilla/OwningNonNull.h"
#include "mozilla/Assertions.h"
#include "mozilla/Casting.h"
#include "mozilla/mozalloc.h"

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше