--HG--
extra : commitid : 7MLK0J5XhL0
This commit is contained in:
Wes Kocher 2016-01-29 13:44:12 -08:00
Родитель 56f1c17b71 a704c0a7d6
Коммит 86864105dc
309 изменённых файлов: 1728 добавлений и 1520 удалений

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

@ -1466,7 +1466,7 @@ HyperTextAccessible::CaretLineNumber()
break;
// Add lines for the sibling frames before the caret
nsIFrame *sibling = parentFrame->GetFirstPrincipalChild();
nsIFrame *sibling = parentFrame->PrincipalChildList().FirstChild();
while (sibling && sibling != caretFrame) {
nsAutoLineIterator lineIterForSibling = sibling->GetLineIterator();
if (lineIterForSibling) {

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

@ -281,7 +281,6 @@ int main(int argc, _CONST char* argv[])
int result;
{
ScopedLogging log;
mozilla::LogModule::Init();
char **_argv;
/*

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="be4b291a90b371b41b62ade68c31ad173bb87baa">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="d3c9acb642baee501cff89e4efdb16b0c7480760">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="d3c9acb642baee501cff89e4efdb16b0c7480760">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk-specific things and forks -->
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="660169a3d7e034a892359e39135e8c2785a6ad6f">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="d3c9acb642baee501cff89e4efdb16b0c7480760">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="be4b291a90b371b41b62ade68c31ad173bb87baa">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<default remote="caf" revision="refs/tags/android-4.0.4_r2.1" sync-j="4"/>
<!-- Gonk-specific things and forks -->
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="d3c9acb642baee501cff89e4efdb16b0c7480760">
<copyfile dest="Makefile" src="core/root.mk"/>
@ -135,7 +137,7 @@
<!-- Flame specific things -->
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="1bb28abbc215f45220620af5cd60a8ac1be93722"/>
<project name="device/qcom/common" path="device/qcom/common" revision="2501e5940ba69ece7654ff85611c76ae5bda299c"/>
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="205ac4204bbbb2098a8046444acba551ba5dc75a"/>
<project name="device-flame" path="device/t2m/flame" remote="b2g" revision="8a066f7fa7410e32b58def35f322aa33f03db283"/>
<project name="codeaurora_kernel_msm" path="kernel" remote="b2g" revision="1e562fa3ac618fe136d3515bb14a070b4153e0cd"/>
<project name="kernel_lk" path="bootable/bootloader/lk" remote="b2g" revision="fda40423ffa573dc6cafd3780515010cb2a086be"/>
<project name="platform_bootable_recovery" path="bootable/recovery" remote="b2g" revision="d5e53ed6f22fa06052351dc03510af9473af01ea"/>

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

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0",
"git_revision": "4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "256902cd676226f40965b353e0ec12e9b0372290",
"revision": "07d30dcbe75d2c053a6e98697fd2e362fb786ca9",
"repo_path": "integration/gaia-central"
}

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="d3c9acb642baee501cff89e4efdb16b0c7480760">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="660169a3d7e034a892359e39135e8c2785a6ad6f">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -21,10 +21,12 @@
<!--
B2G repositories for all targets
-->
<project name="gaia" path="gaia" remote="mozillaorg" revision="77c0e08caa0dda8c6e50f6e7cbad9f79b320a3b0"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="4f0e2a1a42a2d049b6fe8f4f095cdcdf0fd5465c"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="4eb8f37d2239ea7746462aa603f585116a9eaa92"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="99c333dab00ed79baff9e1cf76b320aee8e1c123"/>
<project name="platform_hardware_libhardware_moz" path="hardware/libhardware_moz" remote="b2g" revision="fdf3a143dc777e5f9d33a88373af7ea161d3b440"/>
<project name="platform_system_libpdu" path="system/libpdu" remote="b2g" revision="ac4e539dbd73522c466ebffba53edea61702082f"/>
<project name="platform_system_sensorsd" path="system/sensorsd" remote="b2g" revision="3799a1cb57f08e9468d1cec6c74f8abe93ddae36"/>
<!-- B2G specific things. -->
<project name="platform_build" path="build" remote="b2g" revision="be4b291a90b371b41b62ade68c31ad173bb87baa">
<copyfile dest="Makefile" src="core/root.mk"/>

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

@ -18,6 +18,6 @@ export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/unix/mozconfig.rust"
. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

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

@ -10,6 +10,6 @@ STRIP_FLAGS="--strip-debug"
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/unix/mozconfig.rust"
. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

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

@ -40,7 +40,7 @@ whitelist['nightly']['linux64'] += [
'STRIP_FLAGS="--strip-debug"',
'ac_add_options --with-ccache=/usr/bin/ccache',
'. "$topsrcdir/build/mozconfig.cache"',
'. "$topsrcdir/build/unix/mozconfig.rust"',
'. "$topsrcdir/build/mozconfig.rust"',
]
whitelist['nightly']['macosx-universal'] += [
@ -67,6 +67,7 @@ whitelist['nightly']['win32'] += [
whitelist['nightly']['win64'] += [
'. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"',
'. "$topsrcdir/build/mozconfig.cache"',
'. "$topsrcdir/build/mozconfig.rust"',
]
for platform in all_platforms:

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

@ -30,5 +30,7 @@ ac_add_options --with-branding=browser/branding/nightly
. $topsrcdir/build/win64/mozconfig.vs2013
. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

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

@ -7,5 +7,7 @@ ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

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

@ -6,6 +6,14 @@
"filename": "mozmake.exe"
},
{
"size": 72442063,
"digest": "899da5af9b322ba63ec04de06f92b5bb82a2700f9fe03001e75fdc6f678a435cd66a474190fd93863327456270aef5649d3788aa50d852121059ced99a6004db",
"algorithm": "sha512",
"visibility": "public",
"filename": "rustc.tar.bz2",
"unpack": true
},
{
"size": 167175,
"digest": "0b71a936edf5bd70cf274aaa5d7abc8f77fe8e7b5593a208f805cc9436fac646b9c4f0b43c2b10de63ff3da671497d35536077ecbc72dba7f8159a38b580f831",
"algorithm": "sha512",

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

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

@ -3503,7 +3503,7 @@ MOZ_ARG_WITH_BOOL(system-nss,
_USE_SYSTEM_NSS=1 )
if test -n "$_USE_SYSTEM_NSS"; then
AM_PATH_NSS(3.20.1, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
AM_PATH_NSS(3.22, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
fi
if test -n "$MOZ_NATIVE_NSS"; then
@ -9200,6 +9200,7 @@ export MOZ_APP_NAME
export MOZ_APP_REMOTINGNAME
export DONT_POPULATE_VIRTUALENV=1
export PYTHON
export RUSTC
export MOZILLA_CENTRAL_PATH=$_topsrcdir
export STLPORT_CPPFLAGS
export STLPORT_LIBS

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

@ -266,9 +266,9 @@ static uint32_t gValidateOrigin = 0xffffffff;
#define NS_EVENT_STARVATION_DELAY_HINT 2000
#ifdef DEBUG
static mozilla::LazyLogModule gDocShellLog("nsDocShell");
static PRLogModuleInfo* gDocShellLog;
#endif
static mozilla::LazyLogModule gDocShellLeakLog("nsDocShellLeak");;
static PRLogModuleInfo* gDocShellLeakLog;
const char kBrandBundleURL[] = "chrome://branding/locale/brand.properties";
const char kAppstringsBundleURL[] = "chrome://global/locale/appstrings.properties";
@ -818,7 +818,17 @@ nsDocShell::nsDocShell()
CallGetService(NS_URIFIXUP_CONTRACTID, &sURIFixup);
}
MOZ_LOG(gDocShellLeakLog, LogLevel::Debug, ("DOCSHELL %p created\n", this));
#ifdef DEBUG
if (!gDocShellLog) {
gDocShellLog = PR_NewLogModule("nsDocShell");
}
#endif
if (!gDocShellLeakLog) {
gDocShellLeakLog = PR_NewLogModule("nsDocShellLeak");
}
if (gDocShellLeakLog) {
MOZ_LOG(gDocShellLeakLog, LogLevel::Debug, ("DOCSHELL %p created\n", this));
}
#ifdef DEBUG
// We're counting the number of |nsDocShells| to help find leaks

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

@ -59,9 +59,16 @@ int32_t nsSHistory::sHistoryMaxTotalViewers = -1;
// entries were touched, so that we can evict older entries first.
static uint32_t gTouchCounter = 0;
static LazyLogModule gSHistoryLog("nsSHistory");
#define LOG(format) MOZ_LOG(gSHistoryLog, mozilla::LogLevel::Debug, format)
static PRLogModuleInfo*
GetSHistoryLog()
{
static PRLogModuleInfo* sLog;
if (!sLog) {
sLog = PR_NewLogModule("nsSHistory");
}
return sLog;
}
#define LOG(format) MOZ_LOG(GetSHistoryLog(), mozilla::LogLevel::Debug, format)
// This macro makes it easier to print a log message which includes a URI's
// spec. Example use:
@ -71,7 +78,7 @@ static LazyLogModule gSHistoryLog("nsSHistory");
//
#define LOG_SPEC(format, uri) \
PR_BEGIN_MACRO \
if (MOZ_LOG_TEST(gSHistoryLog, LogLevel::Debug)) { \
if (MOZ_LOG_TEST(GetSHistoryLog(), LogLevel::Debug)) { \
nsAutoCString _specStr(NS_LITERAL_CSTRING("(null)"));\
if (uri) { \
uri->GetSpec(_specStr); \
@ -89,7 +96,7 @@ static LazyLogModule gSHistoryLog("nsSHistory");
//
#define LOG_SHENTRY_SPEC(format, shentry) \
PR_BEGIN_MACRO \
if (MOZ_LOG_TEST(gSHistoryLog, LogLevel::Debug)) { \
if (MOZ_LOG_TEST(GetSHistoryLog(), LogLevel::Debug)) { \
nsCOMPtr<nsIURI> uri; \
shentry->GetURI(getter_AddRefs(uri)); \
LOG_SPEC(format, uri); \

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

@ -11,7 +11,6 @@
#include <algorithm>
#include <math.h>
#include "prprf.h"
#include "DecoderTraits.h"
#include "harfbuzz/hb.h"
#include "imgICache.h"
@ -3525,7 +3524,7 @@ nsContentUtils::ReportToConsoleNonLocalized(const nsAString& aErrorText,
}
void
nsContentUtils::LogMessageToConsole(const char* aMsg, ...)
nsContentUtils::LogMessageToConsole(const char* aMsg)
{
if (!sConsoleService) { // only need to bother null-checking here
CallGetService(NS_CONSOLESERVICE_CONTRACTID, &sConsoleService);
@ -3533,17 +3532,7 @@ nsContentUtils::LogMessageToConsole(const char* aMsg, ...)
return;
}
}
va_list args;
va_start(args, aMsg);
char* formatted = PR_vsmprintf(aMsg, args);
va_end(args);
if (!formatted) {
return;
}
sConsoleService->LogStringMessage(NS_ConvertUTF8toUTF16(formatted).get());
PR_smprintf_free(formatted);
sConsoleService->LogStringMessage(NS_ConvertUTF8toUTF16(aMsg).get());
}
bool
@ -6928,7 +6917,7 @@ nsContentUtils::GetAdjustedOffsetInTextControl(nsIFrame* aOffsetFrame,
// has the text frames (containing the content) as its children. This will
// be the case if we click to the right of any of the text frames, or at the
// bottom of the text area.
nsIFrame* firstChild = aOffsetFrame->GetFirstPrincipalChild();
nsIFrame* firstChild = aOffsetFrame->PrincipalChildList().FirstChild();
if (firstChild) {
// In this case, the passed-in offset is incorrect, and we want the length
// of the entire content in the text control frame.
@ -6941,7 +6930,7 @@ nsContentUtils::GetAdjustedOffsetInTextControl(nsIFrame* aOffsetFrame,
// frame. Our offset should therefore be the length of the first child of
// our parent.
int32_t aOutOffset =
aOffsetFrame->GetParent()->GetFirstPrincipalChild()->GetContent()->Length();
aOffsetFrame->GetParent()->PrincipalChildList().FirstChild()->GetContent()->Length();
return aOutOffset;
}

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

@ -893,8 +893,8 @@ public:
uint32_t aLineNumber = 0,
uint32_t aColumnNumber = 0);
static void LogMessageToConsole(const char* aMsg, ...);
static void LogMessageToConsole(const char* aMsg);
/**
* Get the localized string named |aKey| in properties file |aFile|.
*/

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

@ -106,7 +106,6 @@
#include "HTMLImageElement.h"
#include "mozilla/css/ImageLoader.h"
#include "mozilla/layers/APZCTreeManager.h" // for layers::ZoomToRectBehavior
#include "mozilla/dom/Promise.h"
#ifdef XP_WIN
#undef GetClassName
@ -2151,29 +2150,26 @@ nsDOMWindowUtils::GetLayerManagerRemote(bool* retval)
}
NS_IMETHODIMP
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(JS::MutableHandle<JS::Value> aPromise)
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(nsAString& aRetval)
{
nsCOMPtr<nsPIDOMWindow> window = do_QueryReferent(mWindow);
NS_ENSURE_STATE(window);
nsCOMPtr<nsIGlobalObject> parentObject = do_QueryInterface(window);
NS_ENSURE_STATE(parentObject);
#ifdef MOZ_FMP4
nsCOMPtr<nsIWidget> widget = GetWidget();
NS_ENSURE_STATE(widget);
if (!widget)
return NS_ERROR_FAILURE;
LayerManager *mgr = widget->GetLayerManager();
NS_ENSURE_STATE(mgr);
RefPtr<Promise> promise =
MP4Decoder::IsVideoAccelerated(mgr->GetCompositorBackendType(), parentObject);
NS_ENSURE_STATE(promise);
aPromise.setObject(*promise->GetWrapper());
#else
ErrorResult rv;
RefPtr<Promise> promise = Promise::Create(parentObject, rv);
if (rv.Failed()) {
return rv.StealNSResult();
if (!mgr)
return NS_ERROR_FAILURE;
nsCString failureReason;
if (MP4Decoder::IsVideoAccelerated(mgr->GetCompositorBackendType(), failureReason)) {
aRetval.AssignLiteral("Yes");
} else {
aRetval.AssignLiteral("No; ");
AppendUTF8toUTF16(failureReason, aRetval);
}
promise.MaybeResolve(NS_LITERAL_STRING("No; Compiled without MP4 support."));
aPromise.setObject(*promise->GetWrapper());
#else
aRetval.AssignLiteral("No; Compiled without MP4 support.");
#endif
return NS_OK;
}

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

@ -331,12 +331,10 @@ LineHasNonEmptyContentWorker(nsIFrame* aFrame)
// Look for non-empty frames, but ignore inline and br frames.
// For inline frames, descend into the children, if any.
if (aFrame->GetType() == nsGkAtoms::inlineFrame) {
nsIFrame* child = aFrame->GetFirstPrincipalChild();
while (child) {
for (nsIFrame* child : aFrame->PrincipalChildList()) {
if (LineHasNonEmptyContentWorker(child)) {
return true;
}
child = child->GetNextSibling();
}
} else {
if (aFrame->GetType() != nsGkAtoms::brFrame &&

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

@ -9885,13 +9885,11 @@ static nsCanvasFrame* FindCanvasFrame(nsIFrame* aFrame)
return canvasFrame;
}
nsIFrame* kid = aFrame->GetFirstPrincipalChild();
while (kid) {
for (nsIFrame* kid : aFrame->PrincipalChildList()) {
canvasFrame = FindCanvasFrame(kid);
if (canvasFrame) {
return canvasFrame;
}
kid = kid->GetNextSibling();
}
return nullptr;

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

@ -3335,7 +3335,7 @@ IsLastNonemptyRowGroupOfTable(nsIFrame* aFrame)
}
for (nsIFrame* c = aFrame; c; c = c->GetNextContinuation()) {
for (nsIFrame* next = c->GetNextSibling(); next; next = next->GetNextSibling()) {
if (next->GetFirstPrincipalChild()) {
if (next->PrincipalChildList().FirstChild()) {
return false;
}
}

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

@ -141,7 +141,7 @@ ValidateGLSLVariableName(const nsAString& name, WebGLContext* webgl, const char*
if (name.IsEmpty())
return false;
const uint32_t maxSize = 256;
const uint32_t maxSize = webgl->IsWebGL2() ? 1024 : 256;
if (name.Length() > maxSize) {
webgl->ErrorInvalidValue("%s: Identifier is %d characters long, exceeds the"
" maximum allowed length of %d characters.",

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

@ -2917,9 +2917,7 @@ HTMLInputElement::Focus(ErrorResult& aError)
// tab to the next one.
nsIFrame* frame = GetPrimaryFrame();
if (frame) {
for (nsIFrame* childFrame = frame->GetFirstPrincipalChild();
childFrame;
childFrame = childFrame->GetNextSibling()) {
for (nsIFrame* childFrame : frame->PrincipalChildList()) {
// See if the child is a button control.
nsCOMPtr<nsIFormControl> formCtrl =
do_QueryInterface(childFrame->GetContent());

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

@ -3058,41 +3058,36 @@ class HTMLMediaElement::StreamSizeListener : public MediaStreamListener {
public:
explicit StreamSizeListener(HTMLMediaElement* aElement) :
mElement(aElement),
mMutex("HTMLMediaElement::StreamSizeListener")
mInitialSizeFound(false)
{}
void Forget() { mElement = nullptr; }
void ReceivedSize()
void ReceivedSize(gfx::IntSize aSize)
{
if (!mElement) {
return;
}
gfx::IntSize size;
{
MutexAutoLock lock(mMutex);
size = mInitialSize;
}
RefPtr<HTMLMediaElement> deathGrip = mElement;
mElement->UpdateInitialMediaSize(size);
mElement->UpdateInitialMediaSize(aSize);
}
virtual void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
StreamTime aTrackOffset,
uint32_t aTrackEvents,
const MediaSegment& aQueuedMedia,
MediaStream* aInputStream,
TrackID aInputTrackID) override
void NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID,
StreamTime aTrackOffset,
uint32_t aTrackEvents,
const MediaSegment& aQueuedMedia,
MediaStream* aInputStream,
TrackID aInputTrackID) override
{
MutexAutoLock lock(mMutex);
if (mInitialSize != gfx::IntSize(0,0) ||
aQueuedMedia.GetType() != MediaSegment::VIDEO) {
if (mInitialSizeFound || aQueuedMedia.GetType() != MediaSegment::VIDEO) {
return;
}
const VideoSegment& video = static_cast<const VideoSegment&>(aQueuedMedia);
for (VideoSegment::ConstChunkIterator c(video); !c.IsEnded(); c.Next()) {
if (c->mFrame.GetIntrinsicSize() != gfx::IntSize(0,0)) {
mInitialSize = c->mFrame.GetIntrinsicSize();
nsCOMPtr<nsIRunnable> event =
NS_NewRunnableMethod(this, &StreamSizeListener::ReceivedSize);
NS_NewRunnableMethodWithArgs<gfx::IntSize>(
this, &StreamSizeListener::ReceivedSize,
c->mFrame.GetIntrinsicSize());
aGraph->DispatchToMainThreadAfterStreamStateUpdate(event.forget());
}
}
@ -3102,9 +3097,8 @@ private:
// These fields may only be accessed on the main thread
HTMLMediaElement* mElement;
// mMutex protects the fields below; they can be accessed on any thread
Mutex mMutex;
gfx::IntSize mInitialSize;
// These fields may only be accessed on the MSG thread
bool mInitialSizeFound;
};
class HTMLMediaElement::MediaStreamTracksAvailableCallback:
@ -3174,9 +3168,7 @@ void HTMLMediaElement::UpdateSrcMediaStreamPlaying(uint32_t aFlags)
mMediaStreamListener = new StreamListener(this,
"HTMLMediaElement::mMediaStreamListener");
mMediaStreamSizeListener = new StreamSizeListener(this);
stream->AddListener(mMediaStreamListener);
stream->AddListener(mMediaStreamSizeListener);
mWatchManager.Watch(*mMediaStreamListener,
&HTMLMediaElement::UpdateReadyStateInternal);
@ -3193,7 +3185,6 @@ void HTMLMediaElement::UpdateSrcMediaStreamPlaying(uint32_t aFlags)
mSrcStreamPausedCurrentTime = CurrentTime();
stream->RemoveListener(mMediaStreamListener);
stream->RemoveListener(mMediaStreamSizeListener);
stream->RemoveAudioOutput(this);
VideoFrameContainer* container = GetVideoFrameContainer();
@ -3209,8 +3200,6 @@ void HTMLMediaElement::UpdateSrcMediaStreamPlaying(uint32_t aFlags)
mMediaStreamListener->Forget();
mMediaStreamListener = nullptr;
mMediaStreamSizeListener->Forget();
mMediaStreamSizeListener = nullptr;
}
}
@ -3229,6 +3218,9 @@ void HTMLMediaElement::SetupSrcMediaStreamPlayback(DOMMediaStream* aStream)
RefPtr<MediaStream> stream = GetSrcMediaStream();
if (stream) {
stream->SetAudioChannelType(mAudioChannel);
mMediaStreamSizeListener = new StreamSizeListener(this);
stream->AddListener(mMediaStreamSizeListener);
}
UpdateSrcMediaStreamPlaying();
@ -3255,6 +3247,15 @@ void HTMLMediaElement::EndSrcMediaStreamPlayback()
UpdateSrcMediaStreamPlaying(REMOVING_SRC_STREAM);
if (mMediaStreamSizeListener) {
RefPtr<MediaStream> stream = GetSrcMediaStream();
if (stream) {
stream->RemoveListener(mMediaStreamSizeListener);
}
mMediaStreamSizeListener->Forget();
mMediaStreamSizeListener = nullptr;
}
mSrcStream->UnregisterTrackListener(mMediaStreamTrackListener);
mMediaStreamTrackListener = nullptr;
@ -3403,6 +3404,10 @@ void HTMLMediaElement::MetadataLoaded(const MediaInfo* aInfo,
if (IsVideo() && HasVideo()) {
DispatchAsyncEvent(NS_LITERAL_STRING("resize"));
}
NS_ASSERTION(!HasVideo() ||
(mMediaInfo.mVideo.mDisplay.width > 0 &&
mMediaInfo.mVideo.mDisplay.height > 0),
"Video resolution must be known on 'loadedmetadata'");
DispatchAsyncEvent(NS_LITERAL_STRING("loadedmetadata"));
if (mDecoder && mDecoder->IsTransportSeekable() && mDecoder->IsMediaSeekable()) {
ProcessMediaFragmentURI();
@ -4160,6 +4165,16 @@ void HTMLMediaElement::UpdateInitialMediaSize(const nsIntSize& aSize)
if (!mMediaInfo.HasVideo()) {
UpdateMediaSize(aSize);
}
if (!mMediaStreamSizeListener) {
return;
}
RefPtr<MediaStream> stream = GetSrcMediaStream();
if (stream) {
stream->RemoveListener(mMediaStreamSizeListener);
}
mMediaStreamSizeListener->Forget();
mMediaStreamSizeListener = nullptr;
}
void HTMLMediaElement::SuspendOrResumeElement(bool aPauseElement, bool aSuspendEvents)

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

@ -1111,7 +1111,7 @@ nsGenericHTMLElement::GetFormControlFrame(bool aFlushFrames)
// If we have generated content, the primary frame will be a
// wrapper frame.. out real frame will be in its child list.
for (frame = frame->GetFirstPrincipalChild();
for (frame = frame->PrincipalChildList().FirstChild();
frame;
frame = frame->GetNextSibling()) {
form_frame = do_QueryFrame(frame);

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

@ -2168,7 +2168,7 @@ nsTextEditorState::InitializeKeyboardEventListeners()
TrustedEventsAtSystemGroupBubble());
}
mSelCon->SetScrollableFrame(do_QueryFrame(mBoundFrame->GetFirstPrincipalChild()));
mSelCon->SetScrollableFrame(do_QueryFrame(mBoundFrame->PrincipalChildList().FirstChild()));
}
void

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

@ -49,7 +49,7 @@ interface nsIJSRAIIHelper;
interface nsIContentPermissionRequest;
interface nsIObserver;
[scriptable, uuid(46b44e33-13c2-4eb3-bf80-76a4e0857ccc)]
[scriptable, uuid(ca6a458c-82e7-4979-886e-6d214eac6f0b)]
interface nsIDOMWindowUtils : nsISupports {
/**
@ -1334,12 +1334,11 @@ interface nsIDOMWindowUtils : nsISupports {
readonly attribute boolean layerManagerRemote;
/**
* Returns a Promise that will be resolved with a string once the capabilities
* of the h264 decoder have been determined.
* Success does not mean that all h264 video decoding will be done
* True if we can initialize a hardware-backed h264 decoder for a simple
* test video, does not mean that all h264 video decoding will be done
* in hardware.
*/
readonly attribute jsval supportsHardwareH264Decoding;
readonly attribute AString supportsHardwareH264Decoding;
/**
* Record (and return) frame-intervals for frames which were presented

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

@ -182,46 +182,23 @@ MP4Decoder::IsEnabled()
return Preferences::GetBool("media.mp4.enabled");
}
// sTestH264ExtraData represents the content of the avcC atom found in
// an AVC1 h264 video. It contains the H264 SPS and PPS NAL.
// the structure of the avcC atom is as follow:
// write(0x1); // version, always 1
// write(sps[0].data[1]); // profile
// write(sps[0].data[2]); // compatibility
// write(sps[0].data[3]); // level
// write(0xFC | 3); // reserved (6 bits), NULA length size - 1 (2 bits)
// write(0xE0 | 1); // reserved (3 bits), num of SPS (5 bits)
// write_word(sps[0].size); // 2 bytes for length of SPS
// for(size_t i=0 ; i < sps[0].size ; ++i)
// write(sps[0].data[i]); // data of SPS
// write(&b, pps.size()); // num of PPS
// for(size_t i=0 ; i < pps.size() ; ++i) {
// write_word(pps[i].size); // 2 bytes for length of PPS
// for(size_t j=0 ; j < pps[i].size ; ++j)
// write(pps[i].data[j]); // data of PPS
// }
// }
// here we have a h264 Baseline, 640x360
// We use a 640x360 extradata, as some video framework (Apple VT) will never
// attempt to use hardware decoding for small videos.
static const uint8_t sTestH264ExtraData[] = {
0x01, 0x42, 0xc0, 0x1e, 0xff, 0xe1, 0x00, 0x17, 0x67, 0x42,
0xc0, 0x1e, 0xbb, 0x40, 0x50, 0x17, 0xfc, 0xb8, 0x08, 0x80,
0x00, 0x00, 0x32, 0x00, 0x00, 0x0b, 0xb5, 0x07, 0x8b, 0x17,
0x50, 0x01, 0x00, 0x04, 0x68, 0xce, 0x32, 0xc8
0x01, 0x64, 0x00, 0x0a, 0xff, 0xe1, 0x00, 0x17, 0x67, 0x64,
0x00, 0x0a, 0xac, 0xd9, 0x44, 0x26, 0x84, 0x00, 0x00, 0x03,
0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0xc8, 0x3c, 0x48, 0x96,
0x58, 0x01, 0x00, 0x06, 0x68, 0xeb, 0xe3, 0xcb, 0x22, 0xc0
};
static already_AddRefed<MediaDataDecoder>
CreateTestH264Decoder(layers::LayersBackend aBackend,
VideoInfo& aConfig,
FlushableTaskQueue* aTaskQueue)
VideoInfo& aConfig)
{
aConfig.mMimeType = "video/avc";
aConfig.mId = 1;
aConfig.mDuration = 40000;
aConfig.mMediaTime = 0;
aConfig.mDisplay = nsIntSize(640, 360);
aConfig.mImage = nsIntRect(0, 0, 640, 360);
aConfig.mDisplay = nsIntSize(64, 64);
aConfig.mImage = nsIntRect(0, 0, 64, 64);
aConfig.mExtraData = new MediaByteBuffer();
aConfig.mExtraData->AppendElements(sTestH264ExtraData,
MOZ_ARRAY_LENGTH(sTestH264ExtraData));
@ -230,60 +207,23 @@ CreateTestH264Decoder(layers::LayersBackend aBackend,
RefPtr<PDMFactory> platform = new PDMFactory();
RefPtr<MediaDataDecoder> decoder(
platform->CreateDecoder(aConfig, aTaskQueue, nullptr, aBackend, nullptr));
platform->CreateDecoder(aConfig, nullptr, nullptr, aBackend, nullptr));
return decoder.forget();
}
/* static */ already_AddRefed<dom::Promise>
MP4Decoder::IsVideoAccelerated(layers::LayersBackend aBackend, nsIGlobalObject* aParent)
/* static */ bool
MP4Decoder::IsVideoAccelerated(layers::LayersBackend aBackend, nsACString& aFailureReason)
{
MOZ_ASSERT(NS_IsMainThread());
ErrorResult rv;
RefPtr<dom::Promise> promise;
promise = dom::Promise::Create(aParent, rv);
if (rv.Failed()) {
rv.SuppressException();
return nullptr;
}
RefPtr<FlushableTaskQueue> taskQueue =
new FlushableTaskQueue(GetMediaThreadPool(MediaThreadType::PLATFORM_DECODER));
VideoInfo config;
RefPtr<MediaDataDecoder> decoder(CreateTestH264Decoder(aBackend, config, taskQueue));
RefPtr<MediaDataDecoder> decoder(CreateTestH264Decoder(aBackend, config));
if (!decoder) {
promise->MaybeResolve(NS_LITERAL_STRING("No; Failed to create H264 decoder"));
return promise.forget();
aFailureReason.AssignLiteral("Failed to create H264 decoder");
return false;
}
decoder->Init()
->Then(AbstractThread::MainThread(), __func__,
[promise, decoder, taskQueue] (TrackInfo::TrackType aTrack) {
nsCString failureReason;
bool ok = decoder->IsHardwareAccelerated(failureReason);
nsAutoString result;
if (ok) {
result.AssignLiteral("Yes");
} else {
result.AssignLiteral("No");
if (failureReason.Length()) {
result.AppendLiteral("; ");
AppendUTF8toUTF16(failureReason, result);
}
}
promise->MaybeResolve(result);
decoder->Shutdown();
taskQueue->BeginShutdown();
taskQueue->AwaitShutdownAndIdle();
},
[promise, decoder, taskQueue] (MediaDataDecoder::DecoderFailureReason aResult) {
promise->MaybeResolve(NS_LITERAL_STRING("No; Failed to initialize H264 decoder"));
decoder->Shutdown();
taskQueue->BeginShutdown();
taskQueue->AwaitShutdownAndIdle();
});
return promise.forget();
bool result = decoder->IsHardwareAccelerated(aFailureReason);
decoder->Shutdown();
return result;
}
void

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

@ -8,7 +8,6 @@
#include "MediaDecoder.h"
#include "MediaFormatReader.h"
#include "mozilla/dom/Promise.h"
namespace mozilla {
@ -39,8 +38,7 @@ public:
// Returns true if the MP4 backend is preffed on.
static bool IsEnabled();
static already_AddRefed<dom::Promise>
IsVideoAccelerated(layers::LayersBackend aBackend, nsIGlobalObject* aParent);
static bool IsVideoAccelerated(layers::LayersBackend aBackend, nsACString& aReason);
void GetMozDebugReaderData(nsAString& aString) override;

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

@ -43,6 +43,7 @@ FFVPXRuntimeLinker::Init()
}
MOZ_ASSERT(NS_IsMainThread());
sLinkStatus = LinkStatus_FAILED;
// We retrieve the path of the XUL library as this is where mozavcodec and
// mozavutil libs are located.
@ -85,8 +86,6 @@ FFVPXRuntimeLinker::Init()
sLinkStatus = LinkStatus_SUCCEEDED;
return true;
}
sLinkStatus = LinkStatus_FAILED;
return false;
}

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

@ -54,6 +54,7 @@ skip-if = (toolkit == 'gonk' || buildapp == 'mulet' && debug) # debug-only failu
[test_getUserMedia_callbacks.html]
skip-if = toolkit == 'gonk' || buildapp == 'mulet' # Bug 1063290, intermittent timeout # TC: Bug 1144079 - Re-enable Mulet mochitests and reftests taskcluster-specific disables.
[test_getUserMedia_gumWithinGum.html]
[test_getUserMedia_loadedmetadata.html]
[test_getUserMedia_mediaStreamConstructors.html]
[test_getUserMedia_playAudioTwice.html]
[test_getUserMedia_playVideoAudioTwice.html]

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

@ -0,0 +1,36 @@
<!DOCTYPE HTML>
<html>
<head>
<script type="application/javascript" src="mediaStreamPlayback.js"></script>
</head>
<body>
<pre id="test">
<script type="application/javascript">
createHTML({
title: "getUserMedia in media element should have video dimensions on loadedmetadata",
bug: "1240478"
});
/**
* Tests that assigning a stream to a media element results in the
* "loadedmetadata" event without having to play() the media element.
*
* Also makes sure that the video size has been set on "loadedmetadata".
*/
runTest(function () {
var v = document.createElement("video");
v.preload = "metadata";
var constraints = {video: true, audio: true};
return getUserMedia(constraints).then(stream => new Promise(resolve => {
v.srcObject = stream;
v.onloadedmetadata = resolve;
})).then(() => {
isnot(v.videoWidth, 0, "videoWidth shall be set on 'loadedmetadata'");
isnot(v.videoHeight, 0, "videoHeight shall be set on 'loadedmetadata'");
});
});
</script>
</pre>
</body>
</html>

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

@ -56,6 +56,13 @@
#define FLUSH_AIDE_DATA 0
#undef LOG
#undef ERR
#undef DBG
#define LOG(args...) __android_log_print(ANDROID_LOG_INFO, "GonkGPSGeolocationProvider", ## args)
#define ERR(args...) __android_log_print(ANDROID_LOG_ERROR, "GonkGPSGeolocationProvider", ## args)
#define DBG(args...) __android_log_print(ANDROID_LOG_DEBUG, "GonkGPSGeolocationProvider" , ## args)
using namespace mozilla;
using namespace mozilla::dom;
@ -139,10 +146,10 @@ GonkGPSGeolocationProvider::LocationCallback(GpsLocation* location)
// 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);
DBG("geo: GPS got a fix (%f, %f). accuracy: %f",
location->latitude,
location->longitude,
location->accuracy);
}
RefPtr<UpdateLocationEvent> event = new UpdateLocationEvent(somewhere);
@ -199,7 +206,7 @@ GonkGPSGeolocationProvider::StatusCallback(GpsStatus* status)
break;
}
if (gDebug_isLoggingEnabled){
nsContentUtils::LogMessageToConsole(msgStream);
DBG("%s", msgStream);
}
}
@ -240,7 +247,7 @@ GonkGPSGeolocationProvider::SvStatusCallback(GpsSvStatus* sv_info)
svEphemerisCount != numEphemeris ||
svUsedCount != numUsedInFix) {
nsContentUtils::LogMessageToConsole(
LOG(
"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);
@ -257,8 +264,7 @@ void
GonkGPSGeolocationProvider::NmeaCallback(GpsUtcTime timestamp, const char* nmea, int length)
{
if (gDebug_isLoggingEnabled) {
nsContentUtils::LogMessageToConsole("geo: NMEA: timestamp:\t%lld, length: %d, %s",
timestamp, length, nmea);
DBG("NMEA: timestamp:\t%lld, length: %d, %s", timestamp, length, nmea);
}
}
@ -532,15 +538,13 @@ GonkGPSGeolocationProvider::RequestSettingValue(const char* aKey)
nsCOMPtr<nsISettingsServiceLock> lock;
nsresult rv = ss->CreateLock(nullptr, getter_AddRefs(lock));
if (NS_FAILED(rv)) {
nsContentUtils::LogMessageToConsole(
"geo: error while createLock setting '%s': %d\n", aKey, rv);
ERR("error while createLock setting '%s': %d\n", aKey, rv);
return;
}
rv = lock->Get(aKey, this);
if (NS_FAILED(rv)) {
nsContentUtils::LogMessageToConsole(
"geo: error while get setting '%s': %d\n", aKey, rv);
ERR("error while get setting '%s': %d\n", aKey, rv);
return;
}
}
@ -639,8 +643,8 @@ ConvertToGpsRefLocationType(const nsAString& aConnectionType)
}
if (gDebug_isLoggingEnabled) {
nsContentUtils::LogMessageToConsole("geo: Unsupported connection type %s\n",
NS_ConvertUTF16toUTF8(aConnectionType).get());
DBG("geo: Unsupported connection type %s\n",
NS_ConvertUTF16toUTF8(aConnectionType).get());
}
return AGPS_REF_LOCATION_TYPE_GSM_CELLID;
}
@ -744,8 +748,7 @@ GonkGPSGeolocationProvider::InjectLocation(double latitude,
float accuracy)
{
if (gDebug_isLoggingEnabled) {
nsContentUtils::LogMessageToConsole("geo: injecting location (%f, %f) accuracy: %f",
latitude, longitude, accuracy);
DBG("injecting location (%f, %f) accuracy: %f", latitude, longitude, accuracy);
}
MOZ_ASSERT(NS_IsMainThread());
@ -947,14 +950,12 @@ GonkGPSGeolocationProvider::NetworkLocationUpdate::Update(nsIDOMGeoPosition *pos
(isGPSTempInactive && delta > kMinMLSCoordChangeInMeters))
{
if (gDebug_isLoggingEnabled) {
nsContentUtils::LogMessageToConsole("geo: Using MLS, GPS age:%fs, MLS Delta:%fm\n",
diff_ms / 1000.0, delta);
DBG("Using MLS, GPS age:%fs, MLS Delta:%fm\n", diff_ms / 1000.0, delta);
}
provider->mLocationCallback->Update(position);
} else if (provider->mLastGPSPosition) {
if (gDebug_isLoggingEnabled) {
nsContentUtils::LogMessageToConsole("geo: Using old GPS age:%fs\n",
diff_ms / 1000.0);
DBG("Using old GPS age:%fs\n", diff_ms / 1000.0);
}
// This is a fallback case so that the GPS provider responds with its last
@ -1185,16 +1186,15 @@ GonkGPSGeolocationProvider::Observe(nsISupports* aSubject,
}
if (setting.mKey.EqualsASCII(kSettingDebugGpsIgnored)) {
nsContentUtils::LogMessageToConsole("geo: received mozsettings-changed: ignoring\n");
LOG("received mozsettings-changed: ignoring\n");
gDebug_isGPSLocationIgnored =
setting.mValue.isBoolean() ? setting.mValue.toBoolean() : false;
if (gDebug_isLoggingEnabled) {
nsContentUtils::LogMessageToConsole("geo: Debug: GPS ignored %d\n",
gDebug_isGPSLocationIgnored);
DBG("GPS ignored %d\n", gDebug_isGPSLocationIgnored);
}
return NS_OK;
} else if (setting.mKey.EqualsASCII(kSettingDebugEnabled)) {
nsContentUtils::LogMessageToConsole("geo: received mozsettings-changed: logging\n");
LOG("received mozsettings-changed: logging\n");
gDebug_isLoggingEnabled =
setting.mValue.isBoolean() ? setting.mValue.toBoolean() : false;
return NS_OK;

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

@ -310,8 +310,8 @@ ServiceWorkerRegistrar::ReadData()
}
if (!IsSupportedVersion(version)) {
nsContentUtils::LogMessageToConsole(
"Unsupported service worker registrar version: %s", version.get());
nsContentUtils::LogMessageToConsole(nsPrintfCString(
"Unsupported service worker registrar version: %s", version.get()).get());
return NS_ERROR_FAILURE;
}

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

@ -20,7 +20,7 @@ enum pType {
// set NSPR_LOG_MODULES=negotiateauth:4
// set NSPR_LOG_FILE=negotiateauth.log
//
extern mozilla::LazyLogModule gNegotiateLog;
extern PRLogModuleInfo* gNegotiateLog;
#define LOG(args) MOZ_LOG(gNegotiateLog, mozilla::LogLevel::Debug, args)

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

@ -220,12 +220,13 @@ static const mozilla::Module::ContractIDEntry kAuthContracts[] = {
};
//-----------------------------------------------------------------------------
mozilla::LazyLogModule gNegotiateLog("negotiateauth");
PRLogModuleInfo *gNegotiateLog;
// setup nspr logging ...
static nsresult
InitNegotiateAuth()
{
gNegotiateLog = PR_NewLogModule("negotiateauth");
return NS_OK;
}

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

@ -37,7 +37,7 @@
//-----------------------------------------------------------------------------
// NSPR_LOG_MODULES=gio:5
static mozilla::LazyLogModule sGIOLog("gio");
static PRLogModuleInfo *sGIOLog;
#define LOG(args) MOZ_LOG(sGIOLog, mozilla::LogLevel::Debug, args)
@ -911,6 +911,8 @@ NS_IMPL_ISUPPORTS(nsGIOProtocolHandler, nsIProtocolHandler, nsIObserver)
nsresult
nsGIOProtocolHandler::Init()
{
sGIOLog = PR_NewLogModule("gio");
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
if (prefs)
{

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

@ -26,7 +26,7 @@
using mozilla::LogLevel;
mozilla::LazyLogModule MCD("MCD");
PRLogModuleInfo *MCD;
extern nsresult EvaluateAdminConfigScript(const char *js_buffer, size_t length,
const char *filename,

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

@ -19,7 +19,7 @@
#include "nsIScriptError.h"
#include "jswrapper.h"
extern mozilla::LazyLogModule MCD;
extern PRLogModuleInfo *MCD;
using mozilla::AutoSafeJSContext;
//*****************************************************************************

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

@ -26,7 +26,7 @@
#include "nsXULAppAPI.h"
#include "nsContentUtils.h"
extern mozilla::LazyLogModule MCD;
extern PRLogModuleInfo *MCD;
extern nsresult EvaluateAdminConfigScript(const char *js_buffer, size_t length,
const char *filename,
@ -75,6 +75,8 @@ NS_IMPL_ISUPPORTS(nsReadConfig, nsIReadConfig, nsIObserver)
nsReadConfig::nsReadConfig() :
mRead(false)
{
if (!MCD)
MCD = PR_NewLogModule("MCD");
}
nsresult nsReadConfig::Init()

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

@ -61,10 +61,13 @@ using namespace mozilla::dom;
namespace mozilla {
namespace hal {
mozilla::LogModule *
PRLogModuleInfo *
GetHalLog()
{
static mozilla::LazyLogModule sHalLog("hal");
static PRLogModuleInfo *sHalLog;
if (!sHalLog) {
sHalLog = PR_NewLogModule("hal");
}
return sHalLog;
}

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

@ -20,7 +20,7 @@ namespace mozilla {
namespace hal {
mozilla::LogModule *GetHalLog();
extern PRLogModuleInfo *GetHalLog();
#define HAL_LOG(...) \
MOZ_LOG(mozilla::hal::GetHalLog(), LogLevel::Debug, (__VA_ARGS__))
#define HAL_ERR(...) \

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

@ -42,7 +42,7 @@ Logger::~Logger()
break;
}
MOZ_LOG(gChromiumPRLog, prlevel, ("%s:%i: %s", mFile, mLine, mMsg ? mMsg : "<no message>"));
MOZ_LOG(GetLog(), prlevel, ("%s:%i: %s", mFile, mLine, mMsg ? mMsg : "<no message>"));
if (xpcomlevel != -1)
NS_DebugBreak(xpcomlevel, mMsg, NULL, mFile, mLine);
@ -58,7 +58,15 @@ Logger::printf(const char* fmt, ...)
va_end(args);
}
LazyLogModule Logger::gChromiumPRLog("chromium");
PRLogModuleInfo* Logger::gChromiumPRLog;
PRLogModuleInfo* Logger::GetLog()
{
if (!gChromiumPRLog)
gChromiumPRLog = PR_NewLogModule("chromium");
return gChromiumPRLog;
}
} // namespace mozilla
mozilla::Logger&

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

@ -45,8 +45,8 @@ public:
void printf(const char* fmt, ...);
private:
static mozilla::LazyLogModule gChromiumPRLog;
// static PRLogModuleInfo* GetLog();
static PRLogModuleInfo* gChromiumPRLog;
static PRLogModuleInfo* GetLog();
LogSeverity mSeverity;
const char* mFile;

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

@ -1674,11 +1674,6 @@ class MOZ_STACK_CLASS ModuleValidator
return sigMap_.add(p, &mg_.sig(*sigIndex), *sigIndex);
}
// ModuleGeneratorData limits:
static const unsigned MaxSigs = 4 * 1024;
static const unsigned MaxFuncs = 512 * 1024;
static const unsigned MaxImports = 4 * 1024;
public:
ModuleValidator(ExclusiveContext* cx, AsmJSParser& parser, ParseNode* moduleFunctionNode)
: cx_(cx),

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

@ -322,11 +322,14 @@ DecodeSignatureSection(JSContext* cx, Decoder& d, ModuleGeneratorData* init)
uint32_t sectionStart;
if (!d.startSection(&sectionStart))
return Fail(cx, d, "expected decl section byte size");
return Fail(cx, d, "expected signature section byte size");
uint32_t numSigs;
if (!d.readVarU32(&numSigs))
return Fail(cx, d, "expected number of declarations");
return Fail(cx, d, "expected number of signatures");
if (numSigs > MaxSigs)
return Fail(cx, d, "too many signatures");
if (!init->sigs.resize(numSigs))
return false;
@ -336,6 +339,9 @@ DecodeSignatureSection(JSContext* cx, Decoder& d, ModuleGeneratorData* init)
if (!d.readVarU32(&numArgs))
return Fail(cx, d, "bad number of signature args");
if (numArgs > MaxArgsPerFunc)
return Fail(cx, d, "too many arguments in signature");
ExprType result;
if (!DecodeExprType(cx, d, &result))
return false;
@ -387,6 +393,9 @@ DecodeDeclarationSection(JSContext* cx, Decoder& d, ModuleGeneratorData* init)
if (!d.readVarU32(&numDecls))
return Fail(cx, d, "expected number of declarations");
if (numDecls > MaxFuncs)
return Fail(cx, d, "too many functions");
if (!init->funcSigs.resize(numDecls))
return false;
@ -465,6 +474,9 @@ DecodeImportSection(JSContext* cx, Decoder& d, ModuleGeneratorData* init, Import
if (!d.readVarU32(&numImports))
return Fail(cx, d, "expected number of imports");
if (numImports > MaxImports)
return Fail(cx, d, "too many imports");
for (uint32_t i = 0; i < numImports; i++) {
if (!DecodeImport(cx, d, init, imports))
return false;
@ -526,6 +538,9 @@ DecodeExportsSection(JSContext* cx, Decoder& d, ModuleGenerator& mg, ExportMap*
if (!d.readVarU32(&numExports))
return Fail(cx, d, "expected number of exports");
if (numExports > MaxExports)
return Fail(cx, d, "too many exports");
for (uint32_t i = 0; i < numExports; i++) {
if (!DecodeExport(cx, d, mg, exportMap))
return false;

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

@ -28,6 +28,13 @@ class PropertyName;
namespace wasm {
// Module generator limits
static const unsigned MaxSigs = 4 * 1024;
static const unsigned MaxFuncs = 512 * 1024;
static const unsigned MaxImports = 4 * 1024;
static const unsigned MaxExports = 4 * 1024;
static const unsigned MaxArgsPerFunc = 4 * 1024;
// Module header constants
static const uint32_t MagicNumber = 0x6d736100; // "\0asm"
static const uint32_t EncodingVersion = -1; // experimental

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

@ -49,6 +49,8 @@ function varU32(u32) {
return [u32];
}
const U32MAX_LEB = [255, 255, 255, 255, 15];
function moduleHeaderThen(...rest) {
return [magic0, magic1, magic2, magic3, ver0, ver1, ver2, ver3, ...rest];
}
@ -139,6 +141,12 @@ const trivialSigSection = sigSection([{args:[], ret:VoidCode}]);
const trivialDeclSection = declSection([0]);
const trivialCodeSection = codeSection([{locals:[], body:[0, 0]}]);
assertErrorMessage(() => wasmEval(toBuf(moduleWithSections([ {name: sigSectionStr, body: U32MAX_LEB, } ]))), Error, /too many signatures/);
assertErrorMessage(() => wasmEval(toBuf(moduleWithSections([ {name: sigSectionStr, body: [1, ...U32MAX_LEB], } ]))), Error, /too many arguments in signature/);
assertErrorMessage(() => wasmEval(toBuf(moduleWithSections([trivialSigSection, {name: declSectionStr, body: U32MAX_LEB, }]))), Error, /too many functions/);
assertErrorMessage(() => wasmEval(toBuf(moduleWithSections([trivialSigSection, {name: importSectionStr, body: U32MAX_LEB, }]))), Error, /too many imports/);
assertErrorMessage(() => wasmEval(toBuf(moduleWithSections([trivialSigSection, {name: exportSectionStr, body: U32MAX_LEB, }]))), Error, /too many exports/);
assertThrowsInstanceOf(() => wasmEval(toBuf(moduleWithSections([{name: sigSectionStr, body: [1]}]))), TypeError);
assertThrowsInstanceOf(() => wasmEval(toBuf(moduleWithSections([{name: sigSectionStr, body: [1, 1, 0]}]))), TypeError);

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

@ -31,8 +31,8 @@ ICCompare_Int32::Compiler::generateStubCode(MacroAssembler& masm)
// Compare payload regs of R0 and R1.
Assembler::Condition cond = JSOpToCondition(op, /* signed = */true);
masm.cmp32(R0.payloadReg(), R1.payloadReg());
masm.ma_mov(Imm32(1), R0.payloadReg(), LeaveCC, cond);
masm.ma_mov(Imm32(0), R0.payloadReg(), LeaveCC, Assembler::InvertCondition(cond));
masm.ma_mov(Imm32(1), R0.payloadReg(), cond);
masm.ma_mov(Imm32(0), R0.payloadReg(), Assembler::InvertCondition(cond));
// Result is implicitly boxed already.
masm.tagValue(JSVAL_TYPE_BOOLEAN, R0.payloadReg(), R0);
@ -59,7 +59,7 @@ ICCompare_Double::Compiler::generateStubCode(MacroAssembler& masm)
masm.compareDouble(FloatReg0, FloatReg1);
masm.ma_mov(Imm32(0), dest);
masm.ma_mov(Imm32(1), dest, LeaveCC, cond);
masm.ma_mov(Imm32(1), dest, cond);
masm.tagValue(JSVAL_TYPE_BOOLEAN, dest, R0);
EmitReturnFromIC(masm);

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

@ -90,7 +90,7 @@ CodeGeneratorARM::visitCompare(LCompare* comp)
else
masm.ma_cmp(ToRegister(left), ToOperand(right));
masm.ma_mov(Imm32(0), ToRegister(def));
masm.ma_mov(Imm32(1), ToRegister(def), LeaveCC, cond);
masm.ma_mov(Imm32(1), ToRegister(def), cond);
}
void
@ -1583,8 +1583,8 @@ CodeGeneratorARM::visitNotD(LNotD* ins)
} else {
masm.as_vmrs(pc);
masm.ma_mov(Imm32(0), dest);
masm.ma_mov(Imm32(1), dest, LeaveCC, Assembler::Equal);
masm.ma_mov(Imm32(1), dest, LeaveCC, Assembler::Overflow);
masm.ma_mov(Imm32(1), dest, Assembler::Equal);
masm.ma_mov(Imm32(1), dest, Assembler::Overflow);
}
}
@ -1611,8 +1611,8 @@ CodeGeneratorARM::visitNotF(LNotF* ins)
} else {
masm.as_vmrs(pc);
masm.ma_mov(Imm32(0), dest);
masm.ma_mov(Imm32(1), dest, LeaveCC, Assembler::Equal);
masm.ma_mov(Imm32(1), dest, LeaveCC, Assembler::Overflow);
masm.ma_mov(Imm32(1), dest, Assembler::Equal);
masm.ma_mov(Imm32(1), dest, Assembler::Overflow);
}
}
@ -2183,7 +2183,7 @@ CodeGeneratorARM::visitAsmJSLoadHeap(LAsmJSLoadHeap* ins)
if (mir->isAtomicAccess())
masm.ma_b(masm.asmOnOutOfBoundsLabel(), Assembler::AboveOrEqual);
else
masm.ma_mov(Imm32(0), d, LeaveCC, Assembler::AboveOrEqual);
masm.ma_mov(Imm32(0), d, Assembler::AboveOrEqual);
masm.ma_dataTransferN(IsLoad, size, isSigned, HeapReg, ptrReg, d, Offset, Assembler::Below);
}
memoryBarrier(mir->barrierAfter());

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

@ -272,6 +272,10 @@ void
MacroAssemblerARM::ma_alu(Register src1, Imm32 imm, Register dest,
ALUOp op, SBit s, Condition c)
{
// ma_mov should be used for moves.
MOZ_ASSERT(op != OpMov);
MOZ_ASSERT(op != OpMvn);
// As it turns out, if you ask for a compare-like instruction you *probably*
// want it to set condition codes.
if (dest == InvalidReg)
@ -301,71 +305,18 @@ MacroAssemblerARM::ma_alu(Register src1, Imm32 imm, Register dest,
return;
}
if (HasMOVWT()) {
// If the operation is a move-a-like then we can try to use movw to move
// the bits into the destination. Otherwise, we'll need to fall back on
// a multi-instruction format :(
// movw/movt does not set condition codes, so don't hold your breath.
if (s == LeaveCC && (op == OpMov || op == OpMvn)) {
// ARMv7 supports movw/movt. movw zero-extends its 16 bit argument,
// so we can set the register this way. movt leaves the bottom 16
// bits in tact, so it is unsuitable to move a constant that
if (op == OpMov && ((imm.value & ~ 0xffff) == 0)) {
MOZ_ASSERT(src1 == InvalidReg);
as_movw(dest, Imm16((uint16_t)imm.value), c);
return;
}
// If they asked for a mvn rfoo, imm, where ~imm fits into 16 bits
// then do it.
if (op == OpMvn && (((~imm.value) & ~ 0xffff) == 0)) {
MOZ_ASSERT(src1 == InvalidReg);
as_movw(dest, Imm16((uint16_t)~imm.value), c);
return;
}
// TODO: constant dedup may enable us to add dest, r0, 23 *if* we
// are attempting to load a constant that looks similar to one that
// already exists. If it can't be done with a single movw then we
// *need* to use two instructions since this must be some sort of a
// move operation, we can just use a movw/movt pair and get the
// whole thing done in two moves. This does not work for ops like
// add, since we'd need to do: movw tmp; movt tmp; add dest, tmp,
// src1.
if (op == OpMvn)
imm.value = ~imm.value;
as_movw(dest, Imm16(imm.value & 0xffff), c);
as_movt(dest, Imm16((imm.value >> 16) & 0xffff), c);
return;
}
// If we weren't doing a movalike, a 16 bit immediate will require 2
// instructions. With the same amount of space and (less)time, we can do
// two 8 bit operations, reusing the dest register. e.g.
// movw tmp, 0xffff; add dest, src, tmp ror 4
// vs.
// add dest, src, 0xff0; add dest, dest, 0xf000000f
//
// It turns out that there are some immediates that we miss with the
// second approach. A sample value is: add dest, src, 0x1fffe this can
// be done by movw tmp, 0xffff; add dest, src, tmp lsl 1 since imm8m's
// only get even offsets, we cannot encode this. I'll try to encode as
// two imm8's first, since they are faster. Both operations should take
// 1 cycle, where as add dest, tmp ror 4 takes two cycles to execute.
}
// Either a) this isn't ARMv7 b) this isn't a move start by attempting to
// generate a two instruction form. Some things cannot be made into two-inst
// forms correctly. Namely, adds dest, src, 0xffff. Since we want the
// condition codes (and don't know which ones will be checked), we need to
// assume that the overflow flag will be checked and add{,s} dest, src,
// 0xff00; add{,s} dest, dest, 0xff is not guaranteed to set the overflow
// flag the same as the (theoretical) one instruction variant.
// Start by attempting to generate a two instruction form. Some things
// cannot be made into two-inst forms correctly. Namely, adds dest, src,
// 0xffff. Since we want the condition codes (and don't know which ones
// will be checked), we need to assume that the overflow flag will be
// checked and add{,s} dest, src, 0xff00; add{,s} dest, dest, 0xff is not
// guaranteed to set the overflof flag the same as the (theoretical) one
// instruction variant.
if (alu_dbl(src1, imm, dest, op, s, c))
return;
// And try with its negative.
if (negOp != OpInvalid &&
alu_dbl(src1, negImm, negDest, negOp, s, c))
if (negOp != OpInvalid && alu_dbl(src1, negImm, negDest, negOp, s, c))
return;
// Often this code is called with dest as the ScratchRegister. The register
@ -381,25 +332,7 @@ MacroAssemblerARM::ma_alu(Register src1, Imm32 imm, Register dest,
}
#endif
// Well, damn. We can use two 16 bit mov's, then do the op or we can do a
// single load from a pool then op.
if (HasMOVWT()) {
// Try to load the immediate into a scratch register then use that
as_movw(scratch, Imm16(imm.value & 0xffff), c);
if ((imm.value >> 16) != 0)
as_movt(scratch, Imm16((imm.value >> 16) & 0xffff), c);
} else {
// Going to have to use a load. If the operation is a move, then just
// move it into the destination register
if (op == OpMov) {
as_Imm32Pool(dest, imm.value, c);
return;
} else {
// If this isn't just going into a register, then stick it in a
// temp, and then proceed.
as_Imm32Pool(scratch, imm.value, c);
}
}
ma_mov(imm, scratch, c);
as_alu(dest, src1, O2Reg(scratch), op, s, c);
}
@ -479,17 +412,44 @@ MacroAssemblerARM::ma_mov(Register src, Register dest, SBit s, Assembler::Condit
}
void
MacroAssemblerARM::ma_mov(Imm32 imm, Register dest,
SBit s, Assembler::Condition c)
MacroAssemblerARM::ma_mov(Imm32 imm, Register dest, Assembler::Condition c)
{
ma_alu(InvalidReg, imm, dest, OpMov, s, c);
// Try mov with Imm8 operand.
Imm8 imm8 = Imm8(imm.value);
if (!imm8.invalid) {
as_alu(dest, InvalidReg, imm8, OpMov, LeaveCC, c);
return;
}
// Try mvn with Imm8 operand.
Imm32 negImm = imm;
Register negDest;
ALUOp negOp = ALUNeg(OpMov, dest, &negImm, &negDest);
Imm8 negImm8 = Imm8(negImm.value);
if (negOp != OpInvalid && !negImm8.invalid) {
as_alu(negDest, InvalidReg, negImm8, negOp, LeaveCC, c);
return;
}
// Try movw/movt.
if (HasMOVWT()) {
// ARMv7 supports movw/movt. movw zero-extends its 16 bit argument,
// so we can set the register this way. movt leaves the bottom 16
// bits in tact, so we always need a movw.
as_movw(dest, Imm16(imm.value & 0xffff), c);
if (uint32_t(imm.value) >> 16)
as_movt(dest, Imm16(uint32_t(imm.value) >> 16), c);
return;
}
// If we don't have movw/movt, we need a load.
as_Imm32Pool(dest, imm.value, c);
}
void
MacroAssemblerARM::ma_mov(ImmWord imm, Register dest,
SBit s, Assembler::Condition c)
MacroAssemblerARM::ma_mov(ImmWord imm, Register dest, Assembler::Condition c)
{
ma_alu(InvalidReg, Imm32(imm.value), dest, OpMov, s, c);
ma_mov(Imm32(imm.value), dest, c);
}
void
@ -566,12 +526,6 @@ MacroAssemblerARM::ma_rol(Register shift, Register src, Register dst)
}
// Move not (dest <- ~src)
void
MacroAssemblerARM::ma_mvn(Imm32 imm, Register dest, SBit s, Assembler::Condition c)
{
ma_alu(InvalidReg, imm, dest, OpMvn, s, c);
}
void
MacroAssemblerARM::ma_mvn(Register src1, Register dest, SBit s, Assembler::Condition c)
{
@ -1015,7 +969,7 @@ MacroAssemblerARM::ma_mod_mask(Register src, Register dest, Register hold, Regis
ma_mov(Imm32(0), dest);
// Set the hold appropriately.
ma_mov(Imm32(1), hold);
ma_mov(Imm32(-1), hold, LeaveCC, Signed);
ma_mov(Imm32(-1), hold, Signed);
ma_rsb(Imm32(0), tmp, SetCC, Signed);
// Begin the main loop.
@ -2410,10 +2364,10 @@ MacroAssembler::clampDoubleToUint8(FloatRegister input, Register output)
// Copy the converted value out.
as_vxfer(output, InvalidReg, scratchDouble, FloatToCore);
as_vmrs(pc);
ma_mov(Imm32(0), output, LeaveCC, Overflow); // NaN => 0
ma_mov(Imm32(0), output, Overflow); // NaN => 0
ma_b(&outOfRange, Overflow); // NaN
ma_cmp(output, Imm32(0xff));
ma_mov(Imm32(0xff), output, LeaveCC, Above);
ma_mov(Imm32(0xff), output, Above);
ma_b(&outOfRange, Above);
// Convert it back to see if we got the same value back.
as_vcvt(scratchDouble, VFPRegister(scratchDouble).uintOverlay());

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

@ -123,19 +123,12 @@ class MacroAssemblerARM : public Assembler
static void ma_mov_patch(ImmPtr imm, Register dest, Assembler::Condition c,
RelocStyle rs, Instruction* i);
// These should likely be wrapped up as a set of macros or something like
// that. I cannot think of a good reason to explicitly have all of this
// code.
// ALU based ops
// mov
void ma_mov(Register src, Register dest,
SBit s = LeaveCC, Condition c = Always);
void ma_mov(Register src, Register dest, SBit s = LeaveCC, Condition c = Always);
void ma_mov(Imm32 imm, Register dest,
SBit s = LeaveCC, Condition c = Always);
void ma_mov(ImmWord imm, Register dest,
SBit s = LeaveCC, Condition c = Always);
void ma_mov(Imm32 imm, Register dest, Condition c = Always);
void ma_mov(ImmWord imm, Register dest, Condition c = Always);
void ma_mov(ImmGCPtr ptr, Register dest);
@ -145,7 +138,7 @@ class MacroAssemblerARM : public Assembler
void ma_asr(Imm32 shift, Register src, Register dst);
void ma_ror(Imm32 shift, Register src, Register dst);
void ma_rol(Imm32 shift, Register src, Register dst);
// Shifts (just a move with a shifting op2)
void ma_lsl(Register shift, Register src, Register dst);
void ma_lsr(Register shift, Register src, Register dst);
void ma_asr(Register shift, Register src, Register dst);
@ -153,12 +146,7 @@ class MacroAssemblerARM : public Assembler
void ma_rol(Register shift, Register src, Register dst);
// Move not (dest <- ~src)
void ma_mvn(Imm32 imm, Register dest,
SBit s = LeaveCC, Condition c = Always);
void ma_mvn(Register src1, Register dest,
SBit s = LeaveCC, Condition c = Always);
void ma_mvn(Register src1, Register dest, SBit s = LeaveCC, Condition c = Always);
// Negate (dest <- -src) implemented as rsb dest, src, 0
void ma_neg(Register src, Register dest,
@ -177,8 +165,6 @@ class MacroAssemblerARM : public Assembler
void ma_and(Imm32 imm, Register src1, Register dest,
SBit s = LeaveCC, Condition c = Always);
// Bit clear (dest <- dest & ~imm) or (dest <- src1 & ~src2)
void ma_bic(Imm32 imm, Register dest,
SBit s = LeaveCC, Condition c = Always);
@ -1595,8 +1581,8 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
// <0, then we want to clamp to 0, otherwise, we wish to clamp to 255
ScratchRegisterScope scratch(asMasm());
as_mov(scratch, asr(reg, 8), SetCC);
ma_mov(Imm32(0xff), reg, LeaveCC, NotEqual);
ma_mov(Imm32(0), reg, LeaveCC, Signed);
ma_mov(Imm32(0xff), reg, NotEqual);
ma_mov(Imm32(0), reg, Signed);
}
inline void incrementInt32Value(const Address& addr);
@ -1648,7 +1634,7 @@ class MacroAssemblerARMCompat : public MacroAssemblerARM
emitSet(Assembler::Condition cond, Register dest)
{
ma_mov(Imm32(0), dest);
ma_mov(Imm32(1), dest, LeaveCC, cond);
ma_mov(Imm32(1), dest, cond);
}
template <typename T1, typename T2>

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

@ -71,7 +71,7 @@ static const char kJSCachePrefix[] = "jsloader";
#define XPC_DESERIALIZATION_BUFFER_SIZE (12 * 8192)
// NSPR_LOG_MODULES=JSComponentLoader:5
static LazyLogModule gJSCLLog("JSComponentLoader");
static PRLogModuleInfo* gJSCLLog;
#define LOG(args) MOZ_LOG(gJSCLLog, mozilla::LogLevel::Debug, args)
@ -198,6 +198,10 @@ mozJSComponentLoader::mozJSComponentLoader()
{
MOZ_ASSERT(!sSelf, "mozJSComponentLoader should be a singleton");
if (!gJSCLLog) {
gJSCLLog = PR_NewLogModule("JSComponentLoader");
}
sSelf = this;
}

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

@ -25,12 +25,13 @@
static char* g_Spaces;
static int g_InitState = 0;
static int g_Indent = 0;
static mozilla::LazyLogModule g_LogMod("xpclog");
static PRLogModuleInfo* g_LogMod = nullptr;
static bool Init()
{
g_LogMod = PR_NewLogModule("xpclog");
g_Spaces = new char[SPACE_COUNT+1];
if (!g_Spaces || !MOZ_LOG_TEST(g_LogMod,LogLevel::Error)) {
if (!g_LogMod || !g_Spaces || !MOZ_LOG_TEST(g_LogMod,LogLevel::Error)) {
g_InitState = 1;
XPC_Log_Finish();
return false;
@ -46,6 +47,8 @@ XPC_Log_Finish()
{
if (g_InitState == 1) {
delete [] g_Spaces;
// we'd like to properly cleanup the LogModule, but nspr owns that
g_LogMod = nullptr;
}
g_InitState = -1;
}

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

@ -202,7 +202,7 @@ xpc::ErrorReport::Init(JSErrorReport* aReport, const char* aFallbackMessage,
mIsMuted = aReport->isMuted;
}
static LazyLogModule gJSDiagnostics("JSDiagnostics");
static PRLogModuleInfo* gJSDiagnostics;
void
xpc::ErrorReport::LogToConsole()
@ -232,10 +232,15 @@ xpc::ErrorReport::LogToConsoleWithStack(JS::HandleObject aStack)
fflush(stderr);
}
MOZ_LOG(gJSDiagnostics,
JSREPORT_IS_WARNING(mFlags) ? LogLevel::Warning : LogLevel::Error,
("file %s, line %u\n%s", NS_LossyConvertUTF16toASCII(mFileName).get(),
mLineNumber, NS_LossyConvertUTF16toASCII(mErrorMsg).get()));
// Log to the PR Log Module.
if (!gJSDiagnostics)
gJSDiagnostics = PR_NewLogModule("JSDiagnostics");
if (gJSDiagnostics) {
MOZ_LOG(gJSDiagnostics,
JSREPORT_IS_WARNING(mFlags) ? LogLevel::Warning : LogLevel::Error,
("file %s, line %u\n%s", NS_LossyConvertUTF16toASCII(mFileName).get(),
mLineNumber, NS_LossyConvertUTF16toASCII(mErrorMsg).get()));
}
// Log to the console. We do this last so that we can simply return if
// there's no console service without affecting the other reporting

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

@ -223,13 +223,13 @@ GetFrameForChildrenOnlyTransformHint(nsIFrame *aFrame)
// This happens if the root-<svg> is fixed positioned, in which case we
// can't use aFrame->GetContent() to find the primary frame, since
// GetContent() returns nullptr for ViewportFrame.
aFrame = aFrame->GetFirstPrincipalChild();
aFrame = aFrame->PrincipalChildList().FirstChild();
}
// For an nsHTMLScrollFrame, this will get the SVG frame that has the
// children-only transforms:
aFrame = aFrame->GetContent()->GetPrimaryFrame();
if (aFrame->GetType() == nsGkAtoms::svgOuterSVGFrame) {
aFrame = aFrame->GetFirstPrincipalChild();
aFrame = aFrame->PrincipalChildList().FirstChild();
MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::svgOuterSVGAnonChildFrame,
"Where is the nsSVGOuterSVGFrame's anon child??");
}
@ -327,7 +327,7 @@ DoApplyRenderingChangeToTree(nsIFrame* aFrame,
if (aChange & nsChangeHint_ChildrenOnlyTransform) {
needInvalidatingPaint = true;
nsIFrame* childFrame =
GetFrameForChildrenOnlyTransformHint(aFrame)->GetFirstPrincipalChild();
GetFrameForChildrenOnlyTransformHint(aFrame)->PrincipalChildList().FirstChild();
for ( ; childFrame; childFrame = childFrame->GetNextSibling()) {
ActiveLayerTracker::NotifyRestyle(childFrame, eCSSProperty_transform);
}
@ -902,7 +902,7 @@ RestyleManager::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
if (hint & nsChangeHint_ChildrenOnlyTransform) {
// The overflow areas of the child frames need to be updated:
nsIFrame* hintFrame = GetFrameForChildrenOnlyTransformHint(frame);
nsIFrame* childFrame = hintFrame->GetFirstPrincipalChild();
nsIFrame* childFrame = hintFrame->PrincipalChildList().FirstChild();
NS_ASSERTION(!nsLayoutUtils::GetNextContinuationOrIBSplitSibling(frame),
"SVG frames should not have continuations "
"or ib-split siblings");

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

@ -464,7 +464,7 @@ IsBidiSplittable(nsIFrame* aFrame)
static bool
IsBidiLeaf(nsIFrame* aFrame)
{
nsIFrame* kid = aFrame->GetFirstPrincipalChild();
nsIFrame* kid = aFrame->PrincipalChildList().FirstChild();
return !kid || !aFrame->IsFrameOfType(nsIFrame::eBidiInlineContainer);
}
@ -670,7 +670,7 @@ nsBidiPresUtils::Resolve(nsBlockFrame* aBlockFrame)
block->RemoveStateBits(NS_BLOCK_NEEDS_BIDI_RESOLUTION);
nsBlockInFlowLineIterator lineIter(block, block->begin_lines());
bpd.ResetForNewBlock();
TraverseFrames(aBlockFrame, &lineIter, block->GetFirstPrincipalChild(), &bpd);
TraverseFrames(aBlockFrame, &lineIter, block->PrincipalChildList().FirstChild(), &bpd);
// XXX what about overflow lines?
}
@ -1184,7 +1184,7 @@ nsBidiPresUtils::TraverseFrames(nsBlockFrame* aBlockFrame,
}
} else {
// For a non-leaf frame, recurse into TraverseFrames
nsIFrame* kid = frame->GetFirstPrincipalChild();
nsIFrame* kid = frame->PrincipalChildList().FirstChild();
MOZ_ASSERT(!frame->GetChildList(nsIFrame::kOverflowList).FirstChild(),
"should have drained the overflow list above");
if (kid) {
@ -1263,7 +1263,7 @@ nsBidiPresUtils::ReorderFrames(nsIFrame* aFirstFrameOnLine,
// as the container size.
containerSize = aFirstFrameOnLine->GetSize();
aFirstFrameOnLine = aFirstFrameOnLine->GetFirstPrincipalChild();
aFirstFrameOnLine = aFirstFrameOnLine->PrincipalChildList().FirstChild();
if (!aFirstFrameOnLine) {
return 0;
}
@ -1281,7 +1281,7 @@ nsBidiPresUtils::GetFirstLeaf(nsIFrame* aFrame)
{
nsIFrame* firstLeaf = aFrame;
while (!IsBidiLeaf(firstLeaf)) {
nsIFrame* firstChild = firstLeaf->GetFirstPrincipalChild();
nsIFrame* firstChild = firstLeaf->PrincipalChildList().FirstChild();
nsIFrame* realFrame = nsPlaceholderFrame::GetRealFrameFor(firstChild);
firstLeaf = (realFrame->GetType() == nsGkAtoms::letterFrame) ?
realFrame : firstChild;
@ -1307,7 +1307,7 @@ nsBidiPresUtils::GetFrameBaseLevel(nsIFrame* aFrame)
{
nsIFrame* firstLeaf = aFrame;
while (!IsBidiLeaf(firstLeaf)) {
firstLeaf = firstLeaf->GetFirstPrincipalChild();
firstLeaf = firstLeaf->PrincipalChildList().FirstChild();
}
return NS_GET_BASE_LEVEL(firstLeaf);
}
@ -1650,10 +1650,7 @@ nsBidiPresUtils::InitContinuationStates(nsIFrame* aFrame,
if (!IsBidiLeaf(aFrame) || RubyUtils::IsRubyBox(aFrame->GetType())) {
// Continue for child frames
nsIFrame* frame;
for (frame = aFrame->GetFirstPrincipalChild();
frame;
frame = frame->GetNextSibling()) {
for (nsIFrame* frame : aFrame->PrincipalChildList()) {
InitContinuationStates(frame,
aContinuationStates);
}

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

@ -361,7 +361,7 @@ static inline nsContainerFrame*
GetFieldSetBlockFrame(nsIFrame* aFieldsetFrame)
{
// Depends on the fieldset child frame order - see ConstructFieldSetFrame() below.
nsIFrame* firstChild = aFieldsetFrame->GetFirstPrincipalChild();
nsIFrame* firstChild = aFieldsetFrame->PrincipalChildList().FirstChild();
nsIFrame* inner = firstChild && firstChild->GetNextSibling() ? firstChild->GetNextSibling() : firstChild;
return inner ? inner->GetContentInsertionFrame() : nullptr;
}
@ -492,7 +492,7 @@ GetLastIBSplitSibling(nsIFrame* aFrame, bool aReturnEmptyTrailingInline)
for (nsIFrame *frame = aFrame, *next; ; frame = next) {
next = GetIBSplitSibling(frame);
if (!next ||
(!aReturnEmptyTrailingInline && !next->GetFirstPrincipalChild() &&
(!aReturnEmptyTrailingInline && !next->PrincipalChildList().FirstChild() &&
!GetIBSplitSibling(next))) {
NS_ASSERTION(!next || !frame->IsInlineOutside(),
"Should have a block here!");
@ -1867,9 +1867,9 @@ IsTablePseudo(nsIFrame* aFrame)
aFrame->GetParent()->StyleContext()->GetPseudo() ==
nsCSSAnonBoxes::tableCell) ||
(pseudoType == nsCSSAnonBoxes::tableOuter &&
(aFrame->GetFirstPrincipalChild()->StyleContext()->GetPseudo() ==
(aFrame->PrincipalChildList().FirstChild()->StyleContext()->GetPseudo() ==
nsCSSAnonBoxes::table ||
aFrame->GetFirstPrincipalChild()->StyleContext()->GetPseudo() ==
aFrame->PrincipalChildList().FirstChild()->StyleContext()->GetPseudo() ==
nsCSSAnonBoxes::inlineTable)));
}
@ -2886,7 +2886,7 @@ nsCSSFrameConstructor::ConstructPageFrame(nsIPresShell* aPresShell,
// containing block for fixed elements which are repeated on every page.
nsIFrame* prevPageContentFrame = nullptr;
if (aPrevPageFrame) {
prevPageContentFrame = aPrevPageFrame->GetFirstPrincipalChild();
prevPageContentFrame = aPrevPageFrame->PrincipalChildList().FirstChild();
NS_ASSERTION(prevPageContentFrame, "missing page content frame");
}
pageContentFrame->Init(nullptr, pageFrame, prevPageContentFrame);
@ -2903,7 +2903,7 @@ nsCSSFrameConstructor::ConstructPageFrame(nsIPresShell* aPresShell,
nsIFrame* prevCanvasFrame = nullptr;
if (prevPageContentFrame) {
prevCanvasFrame = prevPageContentFrame->GetFirstPrincipalChild();
prevCanvasFrame = prevPageContentFrame->PrincipalChildList().FirstChild();
NS_ASSERTION(prevCanvasFrame, "missing canvas frame");
}
aCanvasFrame->Init(nullptr, pageContentFrame, prevCanvasFrame);
@ -6182,7 +6182,7 @@ FindAppendPrevSibling(nsIFrame* aParentFrame, nsIFrame* aAfterFrame)
if (aAfterFrame) {
NS_ASSERTION(aAfterFrame->GetParent() == aParentFrame, "Wrong parent");
NS_ASSERTION(aAfterFrame->GetPrevSibling() ||
aParentFrame->GetFirstPrincipalChild() == aAfterFrame,
aParentFrame->PrincipalChildList().FirstChild() == aAfterFrame,
":after frame must be on the principal child list here");
return aAfterFrame->GetPrevSibling();
}
@ -6203,7 +6203,7 @@ GetInsertNextSibling(nsIFrame* aParentFrame, nsIFrame* aPrevSibling)
return aPrevSibling->GetNextSibling();
}
return aParentFrame->GetFirstPrincipalChild();
return aParentFrame->PrincipalChildList().FirstChild();
}
/**
@ -6220,7 +6220,7 @@ nsCSSFrameConstructor::AppendFramesToParent(nsFrameConstructorState& aStat
{
NS_PRECONDITION(!IsFramePartOfIBSplit(aParentFrame) ||
!GetIBSplitSibling(aParentFrame) ||
!GetIBSplitSibling(aParentFrame)->GetFirstPrincipalChild(),
!GetIBSplitSibling(aParentFrame)->PrincipalChildList().FirstChild(),
"aParentFrame has a ib-split sibling with kids?");
NS_PRECONDITION(!aPrevSibling || aPrevSibling->GetParent() == aParentFrame,
"Parent and prevsibling don't match");
@ -6229,7 +6229,7 @@ nsCSSFrameConstructor::AppendFramesToParent(nsFrameConstructorState& aStat
NS_ASSERTION(nextSibling ||
!aParentFrame->GetNextContinuation() ||
!aParentFrame->GetNextContinuation()->GetFirstPrincipalChild() ||
!aParentFrame->GetNextContinuation()->PrincipalChildList().FirstChild() ||
aIsRecursiveCall,
"aParentFrame has later continuations with kids?");
NS_ASSERTION(nextSibling ||
@ -7720,7 +7720,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
if (!prevSibling) {
// We're inserting the new frames as the first child. See if the
// parent has a :before pseudo-element
nsIFrame* firstChild = insertion.mParentFrame->GetFirstPrincipalChild();
nsIFrame* firstChild = insertion.mParentFrame->PrincipalChildList().FirstChild();
if (firstChild &&
nsLayoutUtils::IsGeneratedContentFor(container, firstChild,
@ -8064,7 +8064,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
if (!aContainer) {
nsIFrame* viewport = GetRootFrame();
if (viewport) {
nsIFrame* firstChild = viewport->GetFirstPrincipalChild();
nsIFrame* firstChild = viewport->PrincipalChildList().FirstChild();
if (firstChild && firstChild->GetContent() == aChild) {
isRoot = true;
childFrame = firstChild;
@ -8146,7 +8146,7 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
if (grandparentFrame && grandparentFrame->IsBoxFrame() &&
(grandparentFrame->GetStateBits() & NS_STATE_BOX_WRAPS_KIDS_IN_BLOCK) &&
// check if this frame is the only one needing wrapping
aChild == AnyKidsNeedBlockParent(parentFrame->GetFirstPrincipalChild()) &&
aChild == AnyKidsNeedBlockParent(parentFrame->PrincipalChildList().FirstChild()) &&
!AnyKidsNeedBlockParent(childFrame->GetNextSibling())) {
*aDidReconstruct = true;
LAYOUT_PHASE_TEMP_EXIT();
@ -8538,7 +8538,7 @@ nsCSSFrameConstructor::CreateContinuingOuterTableFrame(nsIPresShell* aPresSh
// replicate the caption
nsFrameItems newChildFrames;
nsIFrame* childFrame = aFrame->GetFirstPrincipalChild();
nsIFrame* childFrame = aFrame->PrincipalChildList().FirstChild();
if (childFrame) {
nsIFrame* continuingTableFrame =
CreateContinuingFrame(aPresContext, childFrame, newFrame);
@ -8566,8 +8566,7 @@ nsCSSFrameConstructor::CreateContinuingTableFrame(nsIPresShell* aPresShell,
// Replicate any header/footer frames
nsFrameItems childFrames;
nsIFrame* childFrame = aFrame->GetFirstPrincipalChild();
for ( ; childFrame; childFrame = childFrame->GetNextSibling()) {
for (nsIFrame* childFrame : aFrame->PrincipalChildList()) {
// See if it's a header/footer, possibly wrapped in a scroll frame.
nsTableRowGroupFrame* rowGroupFrame =
static_cast<nsTableRowGroupFrame*>(childFrame);
@ -8689,7 +8688,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
// Create a continuing frame for each table cell frame
nsFrameItems newChildList;
nsIFrame* cellFrame = aFrame->GetFirstPrincipalChild();
nsIFrame* cellFrame = aFrame->PrincipalChildList().FirstChild();
while (cellFrame) {
// See if it's a table cell frame
if (IS_TABLE_CELL(cellFrame->GetType())) {
@ -8718,7 +8717,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
}
// Create a continuing area frame
nsIFrame* blockFrame = aFrame->GetFirstPrincipalChild();
nsIFrame* blockFrame = aFrame->PrincipalChildList().FirstChild();
nsIFrame* continuingBlockFrame =
CreateContinuingFrame(aPresContext, blockFrame,
static_cast<nsContainerFrame*>(cellFrame));
@ -8831,8 +8830,8 @@ nsCSSFrameConstructor::ReplicateFixedFrames(nsPageContentFrame* aParentFrame)
return NS_OK;
}
nsContainerFrame* canvasFrame =
do_QueryFrame(aParentFrame->GetFirstPrincipalChild());
nsIFrame* prevCanvasFrame = prevPageContentFrame->GetFirstPrincipalChild();
do_QueryFrame(aParentFrame->PrincipalChildList().FirstChild());
nsIFrame* prevCanvasFrame = prevPageContentFrame->PrincipalChildList().FirstChild();
if (!canvasFrame || !prevCanvasFrame) {
// document's root element frame missing
return NS_ERROR_UNEXPECTED;
@ -8887,7 +8886,7 @@ nsCSSFrameConstructor::ReplicateFixedFrames(nsPageContentFrame* aParentFrame)
// Add the placeholders to our primary child list.
// XXXbz this is a little screwed up, since the fixed frames will have
// broken auto-positioning. Oh, well.
NS_ASSERTION(!canvasFrame->GetFirstPrincipalChild(),
NS_ASSERTION(!canvasFrame->PrincipalChildList().FirstChild(),
"leaking frames; doc root continuation must be empty");
canvasFrame->SetInitialChildList(kPrincipalList, fixedPlaceholders);
return NS_OK;
@ -9034,7 +9033,7 @@ IsWhitespaceFrame(nsIFrame* aFrame)
static nsIFrame*
FindFirstNonWhitespaceChild(nsIFrame* aParentFrame)
{
nsIFrame* f = aParentFrame->GetFirstPrincipalChild();
nsIFrame* f = aParentFrame->PrincipalChildList().FirstChild();
while (f && IsWhitespaceFrame(f)) {
f = f->GetNextSibling();
}
@ -9253,7 +9252,7 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
// If inFlowFrame is not the only in-flow child of |parent|, then removing
// it will change nothing about the {ib} split.
if (inFlowFrame != parent->GetFirstPrincipalChild() ||
if (inFlowFrame != parent->PrincipalChildList().FirstChild() ||
inFlowFrame->LastContinuation()->GetNextSibling()) {
return false;
}
@ -10659,7 +10658,7 @@ nsCSSFrameConstructor::InsertFirstLineFrames(
if (!aPrevSibling) {
// Insertion will become the first frame. Two cases: we either
// already have a first-line frame or we don't.
nsIFrame* firstBlockKid = aBlockFrame->GetFirstPrincipalChild();
nsIFrame* firstBlockKid = aBlockFrame->PrincipalChildList().FirstChild();
if (firstBlockKid->GetType() == nsGkAtoms::lineFrame) {
// We already have a first-line frame
nsIFrame* lineFrame = firstBlockKid;
@ -10759,7 +10758,7 @@ nsCSSFrameConstructor::InsertFirstLineFrames(
if (!nextLineFrame) {
break;
}
nsIFrame* kids = nextLineFrame->GetFirstPrincipalChild();
nsIFrame* kids = nextLineFrame->PrincipalChildList().FirstChild();
}
}
else {
@ -11063,7 +11062,7 @@ nsCSSFrameConstructor::WrapFramesInFirstLetterFrame(
}
}
else if (IsInlineFrame(frame) && frameType != nsGkAtoms::brFrame) {
nsIFrame* kids = frame->GetFirstPrincipalChild();
nsIFrame* kids = frame->PrincipalChildList().FirstChild();
WrapFramesInFirstLetterFrame(aBlockFrame, aBlockContinuation,
static_cast<nsContainerFrame*>(frame),
kids, aModifiedParent, aTextFrame,
@ -11118,7 +11117,7 @@ nsCSSFrameConstructor::RemoveFloatingFirstLetterFrames(
// Take the text frame away from the letter frame (so it isn't
// destroyed when we destroy the letter frame).
nsIFrame* textFrame = floatFrame->GetFirstPrincipalChild();
nsIFrame* textFrame = floatFrame->PrincipalChildList().FirstChild();
if (!textFrame) {
return NS_OK;
}
@ -11197,12 +11196,12 @@ nsCSSFrameConstructor::RemoveFirstLetterFrames(nsIPresShell* aPresShell,
bool* aStopLooking)
{
nsIFrame* prevSibling = nullptr;
nsIFrame* kid = aFrame->GetFirstPrincipalChild();
nsIFrame* kid = aFrame->PrincipalChildList().FirstChild();
while (kid) {
if (nsGkAtoms::letterFrame == kid->GetType()) {
// Bingo. Found it. First steal away the text frame.
nsIFrame* textFrame = kid->GetFirstPrincipalChild();
nsIFrame* textFrame = kid->PrincipalChildList().FirstChild();
if (!textFrame) {
break;
}
@ -11309,7 +11308,7 @@ nsCSSFrameConstructor::RecoverLetterFrames(nsContainerFrame* aBlockFrame)
// XXX shouldn't this bit be set already (bug 408493), assert instead?
continuation->AddStateBits(NS_BLOCK_HAS_FIRST_LETTER_STYLE);
WrapFramesInFirstLetterFrame(aBlockFrame, continuation, continuation,
continuation->GetFirstPrincipalChild(),
continuation->PrincipalChildList().FirstChild(),
&parentFrame, &textFrame, &prevFrame,
letterFrames, &stopLooking);
if (stopLooking) {
@ -12025,7 +12024,7 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
// Try to find one after all
nsIFrame* parentNextCont = aFrame->GetNextContinuation();
while (parentNextCont) {
nextSibling = parentNextCont->GetFirstPrincipalChild();
nextSibling = parentNextCont->PrincipalChildList().FirstChild();
if (nextSibling) {
break;
}

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

@ -3115,7 +3115,7 @@ nsCSSRendering::ComputeImageLayerPositioningArea(nsPresContext* aPresContext,
}
if (MOZ_UNLIKELY(frameType == nsGkAtoms::canvasFrame)) {
geometryFrame = aForFrame->GetFirstPrincipalChild();
geometryFrame = aForFrame->PrincipalChildList().FirstChild();
// geometryFrame might be null if this canvas is a page created
// as an overflow container (e.g. the in-flow content has already
// finished and this page only displays the continuations of

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

@ -62,7 +62,7 @@ CheckForTrailingTextFrameRecursive(nsIFrame* aFrame, nsIFrame* aStopAtFrame)
if (!aFrame->IsFrameOfType(nsIFrame::eLineParticipant))
return nullptr;
for (nsIFrame* f = aFrame->GetFirstPrincipalChild(); f; f = f->GetNextSibling())
for (nsIFrame* f : aFrame->PrincipalChildList())
{
nsIFrame* r = CheckForTrailingTextFrameRecursive(f, aStopAtFrame);
if (r)

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

@ -3795,8 +3795,7 @@ nsDocumentViewer::PrintPreviewNavigate(int16_t aType, int32_t aPageNum)
// Now, locate the current page we are on and
// and the page of the page number
nsIFrame* pageFrame = seqFrame->GetFirstPrincipalChild();
while (pageFrame != nullptr) {
for (nsIFrame* pageFrame : seqFrame->PrincipalChildList()) {
nsRect pageRect = pageFrame->GetRect();
if (pageRect.Contains(pageRect.x, pt.y)) {
currentPage = pageFrame;
@ -3806,7 +3805,6 @@ nsDocumentViewer::PrintPreviewNavigate(int16_t aType, int32_t aPageNum)
break;
}
pageNum++;
pageFrame = pageFrame->GetNextSibling();
}
if (aType == nsIWebBrowserPrint::PRINTPREVIEW_PREV_PAGE) {

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

@ -466,7 +466,7 @@ nsFrameIterator::GetPrevSibling(nsIFrame* aFrame)
nsIFrame*
nsFrameIterator::GetFirstChildInner(nsIFrame* aFrame) {
return aFrame->GetFirstPrincipalChild();
return aFrame->PrincipalChildList().FirstChild();
}
nsIFrame*

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

@ -1254,7 +1254,7 @@ nsLayoutUtils::LastContinuationWithChild(nsContainerFrame* aFrame)
{
NS_PRECONDITION(aFrame, "NULL frame pointer");
nsIFrame* f = aFrame->LastContinuation();
while (!f->GetFirstPrincipalChild() && f->GetPrevContinuation()) {
while (!f->PrincipalChildList().FirstChild() && f->GetPrevContinuation()) {
f = f->GetPrevContinuation();
}
return static_cast<nsContainerFrame*>(f);
@ -1382,7 +1382,7 @@ nsLayoutUtils::GetBeforeFrameForContent(nsIFrame* aFrame,
// If the first child frame is a pseudo-frame, then try that.
// Note that the frame we create for the generated content is also a
// pseudo-frame and so don't drill down in that case.
nsIFrame* childFrame = genConParentFrame->GetFirstPrincipalChild();
nsIFrame* childFrame = genConParentFrame->PrincipalChildList().FirstChild();
if (childFrame &&
childFrame->IsPseudoFrame(aContent) &&
!childFrame->IsGeneratedContentFrame()) {
@ -1466,7 +1466,7 @@ nsIFrame*
nsLayoutUtils::GetStyleFrame(nsIFrame* aFrame)
{
if (aFrame->GetType() == nsGkAtoms::tableOuterFrame) {
nsIFrame* inner = aFrame->GetFirstPrincipalChild();
nsIFrame* inner = aFrame->PrincipalChildList().FirstChild();
NS_ASSERTION(inner, "Outer table must have an inner");
return inner;
}
@ -3597,7 +3597,7 @@ AddBoxesForFrame(nsIFrame* aFrame,
nsIAtom* pseudoType = aFrame->StyleContext()->GetPseudo();
if (pseudoType == nsCSSAnonBoxes::tableOuter) {
AddBoxesForFrame(aFrame->GetFirstPrincipalChild(), aCallback);
AddBoxesForFrame(aFrame->PrincipalChildList().FirstChild(), aCallback);
nsIFrame* kid = aFrame->GetChildList(nsIFrame::kCaptionList).FirstChild();
if (kid) {
AddBoxesForFrame(kid, aCallback);
@ -3630,7 +3630,7 @@ nsLayoutUtils::GetFirstNonAnonymousFrame(nsIFrame* aFrame)
nsIAtom* pseudoType = aFrame->StyleContext()->GetPseudo();
if (pseudoType == nsCSSAnonBoxes::tableOuter) {
nsIFrame* f = GetFirstNonAnonymousFrame(aFrame->GetFirstPrincipalChild());
nsIFrame* f = GetFirstNonAnonymousFrame(aFrame->PrincipalChildList().FirstChild());
if (f) {
return f;
}
@ -5859,7 +5859,7 @@ nsLayoutUtils::GetFirstLinePosition(WritingMode aWM,
if (fType == nsGkAtoms::fieldSetFrame) {
LinePosition kidPosition;
nsIFrame* kid = aFrame->GetFirstPrincipalChild();
nsIFrame* kid = aFrame->PrincipalChildList().FirstChild();
// kid might be a legend frame here, but that's ok.
if (GetFirstLinePosition(aWM, kid, &kidPosition)) {
*aResult = kidPosition +
@ -6758,7 +6758,7 @@ nsLayoutUtils::GetFrameTransparency(nsIFrame* aBackgroundFrame,
// doing otherwise breaks window display effects on some platforms,
// specifically Vista. (bug 450322)
if (aBackgroundFrame->GetType() == nsGkAtoms::viewportFrame &&
!aBackgroundFrame->GetFirstPrincipalChild()) {
!aBackgroundFrame->PrincipalChildList().FirstChild()) {
return eTransparencyOpaque;
}

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

@ -2276,7 +2276,7 @@ nsIPresShell::GetRootScrollFrame() const
// Ensure root frame is a viewport frame
if (!rootFrame || nsGkAtoms::viewportFrame != rootFrame->GetType())
return nullptr;
nsIFrame* theFrame = rootFrame->GetFirstPrincipalChild();
nsIFrame* theFrame = rootFrame->PrincipalChildList().FirstChild();
if (!theFrame || nsGkAtoms::scrollFrame != theFrame->GetType())
return nullptr;
return theFrame;
@ -9591,13 +9591,11 @@ FindTopFrame(nsIFrame* aRoot)
}
// Try one of the children
nsIFrame* kid = aRoot->GetFirstPrincipalChild();
while (nullptr != kid) {
for (nsIFrame* kid : aRoot->PrincipalChildList()) {
nsIFrame* result = FindTopFrame(kid);
if (nullptr != result) {
return result;
}
kid = kid->GetNextSibling();
}
}
return nullptr;
@ -10177,10 +10175,8 @@ static void RecurseIndiTotals(nsPresContext* aPresContext,
free(name);
}
nsIFrame* child = aParentFrame->GetFirstPrincipalChild();
while (child) {
for (nsIFrame* child : aParentFrame->PrincipalChildList()) {
RecurseIndiTotals(aPresContext, aHT, child, aLevel+1);
child = child->GetNextSibling();
}
}

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

@ -81,7 +81,7 @@ public:
// Inserted child content gets its frames parented by our child block
virtual nsContainerFrame* GetContentInsertionFrame() override {
return GetFirstPrincipalChild()->GetContentInsertionFrame();
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
}
virtual bool IsFrameOfType(uint32_t aFlags) const override

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

@ -265,8 +265,7 @@ static nscoord
GetMaxOptionBSize(nsIFrame* aContainer, WritingMode aWM)
{
nscoord result = 0;
for (nsIFrame* option = aContainer->GetFirstPrincipalChild();
option; option = option->GetNextSibling()) {
for (nsIFrame* option : aContainer->PrincipalChildList()) {
nscoord optionBSize;
if (nsCOMPtr<nsIDOMHTMLOptGroupElement>
(do_QueryInterface(option->GetContent()))) {

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

@ -210,7 +210,7 @@ nsTextControlFrame::CalcIntrinsicSize(nsRenderingContext* aRenderingContext,
// Add in the size of the scrollbars for textarea
if (IsTextArea()) {
nsIFrame* first = GetFirstPrincipalChild();
nsIFrame* first = PrincipalChildList().FirstChild();
nsIScrollableFrame *scrollableFrame = do_QueryFrame(first);
NS_ASSERTION(scrollableFrame, "Child must be scrollable");
@ -1231,7 +1231,7 @@ nsTextControlFrame::SetInitialChildList(ChildListID aListID,
// Mark the scroll frame as being a reflow root. This will allow
// incremental reflows to be initiated at the scroll frame, rather
// than descending from the root frame of the frame hierarchy.
if (nsIFrame* first = GetFirstPrincipalChild()) {
if (nsIFrame* first = PrincipalChildList().FirstChild()) {
first->AddStateBits(NS_FRAME_REFLOW_ROOT);
nsCOMPtr<nsITextControlElement> txtCtrl = do_QueryInterface(GetContent());

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

@ -40,7 +40,7 @@ public:
virtual void DestroyFrom(nsIFrame* aDestructRoot) override;
virtual nsIScrollableFrame* GetScrollTargetFrame() override {
return do_QueryFrame(GetFirstPrincipalChild());
return do_QueryFrame(PrincipalChildList().FirstChild());
}
virtual nscoord GetMinISize(nsRenderingContext* aRenderingContext) override;

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

@ -78,7 +78,7 @@ RubyColumn::Iterator::SkipUntilExistingFrame()
RubySegmentEnumerator::RubySegmentEnumerator(nsRubyFrame* aRubyFrame)
{
nsIFrame* frame = aRubyFrame->GetFirstPrincipalChild();
nsIFrame* frame = aRubyFrame->PrincipalChildList().FirstChild();
MOZ_ASSERT(!frame ||
frame->GetType() == nsGkAtoms::rubyBaseContainerFrame);
mBaseContainer = static_cast<nsRubyBaseContainerFrame*>(frame);
@ -103,7 +103,7 @@ RubyColumnEnumerator::RubyColumnEnumerator(
const uint32_t rtcCount = aTextContainers.Length();
mFrames.SetCapacity(rtcCount + 1);
nsIFrame* rbFrame = aBaseContainer->GetFirstPrincipalChild();
nsIFrame* rbFrame = aBaseContainer->PrincipalChildList().FirstChild();
MOZ_ASSERT(!rbFrame || rbFrame->GetType() == nsGkAtoms::rubyBaseFrame);
mFrames.AppendElement(static_cast<nsRubyContentFrame*>(rbFrame));
for (uint32_t i = 0; i < rtcCount; i++) {
@ -111,7 +111,7 @@ RubyColumnEnumerator::RubyColumnEnumerator(
// If the container is for span, leave a nullptr here.
// Spans do not take part in pairing.
nsIFrame* rtFrame = !container->IsSpanContainer() ?
container->GetFirstPrincipalChild() : nullptr;
container->PrincipalChildList().FirstChild() : nullptr;
MOZ_ASSERT(!rtFrame || rtFrame->GetType() == nsGkAtoms::rubyTextFrame);
mFrames.AppendElement(static_cast<nsRubyContentFrame*>(rtFrame));
}

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

@ -380,13 +380,11 @@ TextOverflow::ExamineFrameSubtree(nsIFrame* aFrame,
return;
}
nsIFrame* child = aFrame->GetFirstPrincipalChild();
while (child) {
for (nsIFrame* child : aFrame->PrincipalChildList()) {
ExamineFrameSubtree(child, aContentArea, aInsideMarkersArea,
aFramesToHide, aAlignmentEdges,
aFoundVisibleTextOrAtomic,
aClippedMarkerEdges);
child = child->GetNextSibling();
}
}

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

@ -2368,7 +2368,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
aState.mPresContext->HasPendingInterrupt()) {
// Need to make sure to pull overflows from any prev-in-flows
for (nsIFrame* inlineKid = line->mFirstChild; inlineKid;
inlineKid = inlineKid->GetFirstPrincipalChild()) {
inlineKid = inlineKid->PrincipalChildList().FirstChild()) {
inlineKid->PullOverflowsFromPrevInFlow();
}
}
@ -7200,7 +7200,7 @@ nsBlockFrame::DoCollectFloats(nsIFrame* aFrame, nsFrameList& aList,
// XXXmats nsInlineFrame's lazy reparenting depends on NOT doing that.
}
DoCollectFloats(aFrame->GetFirstPrincipalChild(), aList, true);
DoCollectFloats(aFrame->PrincipalChildList().FirstChild(), aList, true);
DoCollectFloats(aFrame->GetChildList(kOverflowList).FirstChild(), aList, true);
}
if (!aCollectSiblings)

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

@ -41,7 +41,7 @@ static nsIFrame* DescendIntoBlockLevelFrame(nsIFrame* aFrame)
nsIAtom* type = aFrame->GetType();
if (type == nsGkAtoms::columnSetFrame) {
static_cast<nsColumnSetFrame*>(aFrame)->DrainOverflowColumns();
nsIFrame* child = aFrame->GetFirstPrincipalChild();
nsIFrame* child = aFrame->PrincipalChildList().FirstChild();
if (child) {
return DescendIntoBlockLevelFrame(child);
}

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

@ -434,8 +434,7 @@ nsCanvasFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
}
}
nsIFrame* kid;
for (kid = GetFirstPrincipalChild(); kid; kid = kid->GetNextSibling()) {
for (nsIFrame* kid : PrincipalChildList()) {
// Put our child into its own pseudo-stack.
BuildDisplayListForChild(aBuilder, kid, aDirtyRect, aLists);
}

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

@ -45,7 +45,7 @@ public:
virtual nscoord GetAvailableContentBSize(const nsHTMLReflowState& aReflowState);
virtual nsContainerFrame* GetContentInsertionFrame() override {
nsIFrame* frame = GetFirstPrincipalChild();
nsIFrame* frame = PrincipalChildList().FirstChild();
// if no children return nullptr
if (!frame)

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

@ -917,7 +917,7 @@ GetFirstNonAnonBoxDescendant(nsIFrame* aFrame)
}
// USUAL CASE: Descend to the first child in principal list.
aFrame = aFrame->GetFirstPrincipalChild();
aFrame = aFrame->PrincipalChildList().FirstChild();
}
return aFrame;
}
@ -2023,7 +2023,7 @@ nsFlexContainerFrame::SanityCheckAnonymousFlexItems() const
"two anon flex items in a row (shouldn't happen, unless our "
"children have been reordered with the 'order' property)");
nsIFrame* firstWrappedChild = child->GetFirstPrincipalChild();
nsIFrame* firstWrappedChild = child->PrincipalChildList().FirstChild();
MOZ_ASSERT(firstWrappedChild,
"anonymous flex item is empty (shouldn't happen)");
prevChildWasAnonFlexItem = true;

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

@ -789,7 +789,7 @@ nsFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
if (IsSVGText()) {
SVGTextFrame* svgTextFrame = static_cast<SVGTextFrame*>(
nsLayoutUtils::GetClosestFrameOfType(this, nsGkAtoms::svgTextFrame));
nsIFrame* anonBlock = svgTextFrame->GetFirstPrincipalChild();
nsIFrame* anonBlock = svgTextFrame->PrincipalChildList().FirstChild();
// Just as in SVGTextFrame::DidSetStyleContext, we need to ensure that
// any non-display SVGTextFrames get reflowed when a child text frame
// gets new style.
@ -3675,7 +3675,7 @@ static FrameTarget DrillDownToSelectionFrame(nsIFrame* aFrame,
bool aEndFrame, uint32_t aFlags) {
if (SelectionDescendToKids(aFrame)) {
nsIFrame* result = nullptr;
nsIFrame *frame = aFrame->GetFirstPrincipalChild();
nsIFrame *frame = aFrame->PrincipalChildList().FirstChild();
if (!aEndFrame) {
while (frame && (!SelfIsSelectable(frame, aFlags) ||
frame->IsEmpty()))
@ -3858,7 +3858,7 @@ static FrameTarget GetSelectionClosestFrame(nsIFrame* aFrame, nsPoint aPoint,
return target;
}
nsIFrame *kid = aFrame->GetFirstPrincipalChild();
nsIFrame *kid = aFrame->PrincipalChildList().FirstChild();
if (kid) {
// Go through all the child frames to find the closest one
@ -6637,7 +6637,7 @@ FindBlockFrameOrBR(nsIFrame* aFrame, nsDirection aDirection)
child = child->GetPrevSibling();
}
} else { // eDirNext
nsIFrame* child = aFrame->GetFirstPrincipalChild();
nsIFrame* child = aFrame->PrincipalChildList().FirstChild();
while(child && !result.mContent) {
result = FindBlockFrameOrBR(child, aDirection);
child = child->GetNextSibling();
@ -6950,7 +6950,7 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos)
if (aPos->mResultFrame->GetType() == nsGkAtoms::tableOuterFrame ||
aPos->mResultFrame->GetType() == nsGkAtoms::tableCellFrame)
{
nsIFrame *frame = aPos->mResultFrame->GetFirstPrincipalChild();
nsIFrame *frame = aPos->mResultFrame->PrincipalChildList().FirstChild();
//got the table frame now
while(frame) //ok time to drill down to find iterator
{
@ -6963,7 +6963,7 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos)
break; //while(frame)
}
result = NS_ERROR_FAILURE;
frame = frame->GetFirstPrincipalChild();
frame = frame->PrincipalChildList().FirstChild();
}
}
@ -7627,7 +7627,7 @@ ComputeAndIncludeOutlineArea(nsIFrame* aFrame, nsOverflowAreas& aOverflowAreas,
pseudoType != nsCSSAnonBoxes::mozAnonymousPositionedBlock)
break;
// If we're done, we really want it and all its later siblings.
frameForArea = frameForArea->GetFirstPrincipalChild();
frameForArea = frameForArea->PrincipalChildList().FirstChild();
NS_ASSERTION(frameForArea, "anonymous block with no children?");
} while (frameForArea);
@ -8065,7 +8065,7 @@ GetCorrectedParent(const nsIFrame* aFrame)
// For a table caption we want the _inner_ table frame (unless it's anonymous)
// as the style parent.
if (aFrame->IsTableCaption()) {
nsIFrame* innerTable = parent->GetFirstPrincipalChild();
nsIFrame* innerTable = parent->PrincipalChildList().FirstChild();
if (!innerTable->StyleContext()->GetPseudo()) {
return innerTable;
}
@ -8076,7 +8076,7 @@ GetCorrectedParent(const nsIFrame* aFrame)
// know its parent. So get the pseudo of the inner in that case.
nsIAtom* pseudo = aFrame->StyleContext()->GetPseudo();
if (pseudo == nsCSSAnonBoxes::tableOuter) {
pseudo = aFrame->GetFirstPrincipalChild()->StyleContext()->GetPseudo();
pseudo = aFrame->PrincipalChildList().FirstChild()->StyleContext()->GetPseudo();
}
return nsFrame::CorrectStyleParentFrame(parent, pseudo);
}
@ -8214,7 +8214,7 @@ nsFrame::GetLastLeaf(nsPresContext* aPresContext, nsIFrame **aFrame)
nsIFrame *child = *aFrame;
//if we are a block frame then go for the last line of 'this'
while (1){
child = child->GetFirstPrincipalChild();
child = child->PrincipalChildList().FirstChild();
if (!child)
return;//nothing to do
nsIFrame* siblingFrame;
@ -8236,7 +8236,7 @@ nsFrame::GetFirstLeaf(nsPresContext* aPresContext, nsIFrame **aFrame)
return;
nsIFrame *child = *aFrame;
while (1){
child = child->GetFirstPrincipalChild();
child = child->PrincipalChildList().FirstChild();
if (!child)
return;//nothing to do
*aFrame = child;

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

@ -245,6 +245,11 @@ public:
bool ContainsFrame(const nsIFrame* aFrame) const;
/**
* Get the number of frames in this list. Note that currently the
* implementation has O(n) time complexity. Do not call it repeatedly in hot
* code.
*/
int32_t GetLength() const;
/**

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

@ -602,7 +602,7 @@ nsHTMLScrollFrame::GuessVScrollbarNeeded(const ScrollReflowState& aState)
return false;
if (mHelper.mIsRoot) {
nsIFrame *f = mHelper.mScrolledFrame->GetFirstPrincipalChild();
nsIFrame *f = mHelper.mScrolledFrame->PrincipalChildList().FirstChild();
if (f && f->GetType() == nsGkAtoms::svgOuterSVGFrame &&
static_cast<nsSVGOuterSVGFrame*>(f)->VerticalScrollbarNotNeeded()) {
// Common SVG case - avoid a bad guess.
@ -3913,8 +3913,7 @@ ScrollFrameHelper::ReloadChildFrames()
mScrollCornerBox = nullptr;
mResizerBox = nullptr;
nsIFrame* frame = mOuter->GetFirstPrincipalChild();
while (frame) {
for (nsIFrame* frame : mOuter->PrincipalChildList()) {
nsIContent* content = frame->GetContent();
if (content == mOuter->GetContent()) {
NS_ASSERTION(!mScrolledFrame, "Already found the scrolled frame");
@ -3940,8 +3939,6 @@ ScrollFrameHelper::ReloadChildFrames()
mScrollCornerBox = frame;
}
}
frame = frame->GetNextSibling();
}
}
@ -5337,7 +5334,7 @@ ScrollFrameHelper::GetScrolledRectInternal(const nsRect& aScrolledFrameOverflowA
// direction set by the text content overrides the direction of the frame
if (mScrolledFrame->StyleTextReset()->mUnicodeBidi &
NS_STYLE_UNICODE_BIDI_PLAINTEXT) {
nsIFrame* childFrame = mScrolledFrame->GetFirstPrincipalChild();
nsIFrame* childFrame = mScrolledFrame->PrincipalChildList().FirstChild();
if (childFrame) {
frameDir =
(nsBidiPresUtils::ParagraphDirection(childFrame) == NSBIDI_LTR)

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

@ -3585,7 +3585,7 @@ nsGridContainerFrame::SanityCheckAnonymousGridItems() const
"children have been reordered with the 'order' property)");
*/
MOZ_ASSERT(!prevChildWasAnonGridItem, "two anon grid items in a row");
nsIFrame* firstWrappedChild = child->GetFirstPrincipalChild();
nsIFrame* firstWrappedChild = child->PrincipalChildList().FirstChild();
MOZ_ASSERT(firstWrappedChild,
"anonymous grid item is empty (shouldn't happen)");
prevChildWasAnonGridItem = true;

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

@ -95,7 +95,7 @@ public:
// Inserted child content gets its frames parented by our child block
virtual nsContainerFrame* GetContentInsertionFrame() override {
return GetFirstPrincipalChild()->GetContentInsertionFrame();
return PrincipalChildList().FirstChild()->GetContentInsertionFrame();
}
protected:

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

@ -570,7 +570,7 @@ nsHTMLReflowState::InitResizeFlags(nsPresContext* aPresContext, nsIAtom* aFrameT
if (frame->GetType() == nsGkAtoms::svgForeignObjectFrame) {
// Foreign object frames use dirty bits in a special way.
frame->AddStateBits(NS_FRAME_HAS_DIRTY_CHILDREN);
nsIFrame *kid = frame->GetFirstPrincipalChild();
nsIFrame *kid = frame->PrincipalChildList().FirstChild();
if (kid) {
kid->AddStateBits(NS_FRAME_IS_DIRTY);
}

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

@ -1079,7 +1079,7 @@ public:
* frame type, an empty list will be returned.
*/
virtual const nsFrameList& GetChildList(ChildListID aListID) const = 0;
const nsFrameList& PrincipalChildList() { return GetChildList(kPrincipalList); }
const nsFrameList& PrincipalChildList() const { return GetChildList(kPrincipalList); }
virtual void GetChildLists(nsTArray<ChildList>* aLists) const = 0;
/**
@ -1088,10 +1088,6 @@ public:
*/
void GetCrossDocChildLists(nsTArray<ChildList>* aLists);
nsIFrame* GetFirstPrincipalChild() const {
return GetChildList(kPrincipalList).FirstChild();
}
// The individual concrete child lists.
static const ChildListID kPrincipalList = mozilla::layout::kPrincipalList;
static const ChildListID kAbsoluteList = mozilla::layout::kAbsoluteList;

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

@ -652,7 +652,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
// so nsFirstLetterFrame::Reflow can destroy them safely (bug 401042).
nsIFrame* realFrame = nsPlaceholderFrame::GetRealFrameFor(frame);
if (realFrame->GetType() == nsGkAtoms::letterFrame) {
nsIFrame* child = realFrame->GetFirstPrincipalChild();
nsIFrame* child = realFrame->PrincipalChildList().FirstChild();
if (child) {
NS_ASSERTION(child->GetType() == nsGkAtoms::textFrame,
"unexpected frame type");

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

@ -465,7 +465,7 @@ GetNextPage(nsIFrame* aPageContentFrame)
return nullptr;
NS_ASSERTION(nextPageFrame->GetType() == nsGkAtoms::pageFrame,
"pageFrame's sibling is not a page frame...");
nsIFrame* f = nextPageFrame->GetFirstPrincipalChild();
nsIFrame* f = nextPageFrame->PrincipalChildList().FirstChild();
NS_ASSERTION(f, "pageFrame has no page content frame!");
NS_ASSERTION(f->GetType() == nsGkAtoms::pageContentFrame,
"pageFrame's child is not page content!");

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

@ -1771,9 +1771,7 @@ nsPluginFrame::SetIsDocumentActive(bool aIsActive)
nsIObjectFrame *
nsPluginFrame::GetNextObjectFrame(nsPresContext* aPresContext, nsIFrame* aRoot)
{
nsIFrame* child = aRoot->GetFirstPrincipalChild();
while (child) {
for (nsIFrame* child : aRoot->PrincipalChildList()) {
nsIObjectFrame* outFrame = do_QueryFrame(child);
if (outFrame) {
RefPtr<nsNPAPIPluginInstance> pi;
@ -1785,7 +1783,6 @@ nsPluginFrame::GetNextObjectFrame(nsPresContext* aPresContext, nsIFrame* aRoot)
outFrame = GetNextObjectFrame(aPresContext, child);
if (outFrame)
return outFrame;
child = child->GetNextSibling();
}
return nullptr;

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

@ -68,7 +68,7 @@ LineBreakBefore(nsIFrame* aFrame,
const nsLineList::iterator* aLine)
{
for (nsIFrame* child = aFrame; child;
child = child->GetFirstPrincipalChild()) {
child = child->PrincipalChildList().FirstChild()) {
if (!child->CanContinueTextRun()) {
// It is not an inline element. We can break before it.
return gfxBreakPriority::eNormalBreak;
@ -241,7 +241,7 @@ nsRubyBaseContainerFrame::AddInlinePrefISize(
}
for (uint32_t i = 0, iend = textContainers.Length(); i < iend; i++) {
if (textContainers[i]->IsSpanContainer()) {
nsIFrame* frame = textContainers[i]->GetFirstPrincipalChild();
nsIFrame* frame = textContainers[i]->PrincipalChildList().FirstChild();
nsIFrame::InlinePrefISizeData data;
frame->AddInlinePrefISize(aRenderingContext, &data);
MOZ_ASSERT(data.prevLines == 0, "Shouldn't have prev lines");
@ -818,7 +818,7 @@ nsRubyBaseContainerFrame::ReflowSpans(const ReflowState& aReflowState)
continue;
}
nsIFrame* rtFrame = container->GetFirstPrincipalChild();
nsIFrame* rtFrame = container->PrincipalChildList().FirstChild();
nsReflowStatus reflowStatus;
bool pushedFrame;
nsLineLayout* lineLayout = aReflowState.mTextReflowStates[i]->mLineLayout;

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

@ -520,7 +520,7 @@ GetPrintCanvasElementsInFrame(nsIFrame* aFrame, nsTArray<RefPtr<HTMLCanvasElemen
}
}
if (!child->GetFirstPrincipalChild()) {
if (!child->PrincipalChildList().FirstChild()) {
nsSubDocumentFrame* subdocumentFrame = do_QueryFrame(child);
if (subdocumentFrame) {
// Descend into the subdocument
@ -742,7 +742,7 @@ nsSimplePageSequenceFrame::PrintNextPage()
height -= mMargin.top + mMargin.bottom;
width -= mMargin.left + mMargin.right;
nscoord selectionY = height;
nsIFrame* conFrame = currentPage->GetFirstPrincipalChild();
nsIFrame* conFrame = currentPage->PrincipalChildList().FirstChild();
if (mSelectionHeight >= 0) {
conFrame->SetPosition(conFrame->GetPosition() + nsPoint(0, -mYSelOffset));
nsContainerFrame::PositionChildViews(conFrame);
@ -837,7 +837,7 @@ nsSimplePageSequenceFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
DisplayListClipState::AutoSaveRestore clipState(aBuilder);
clipState.Clear();
nsIFrame* child = GetFirstPrincipalChild();
nsIFrame* child = PrincipalChildList().FirstChild();
nsRect dirty = aDirtyRect;
dirty.ScaleInverseRoundOut(PresContext()->GetPrintPreviewScale());

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

@ -1270,7 +1270,7 @@ nsSubDocumentFrame::ObtainIntrinsicSizeFrame()
if (scrollable) {
nsIFrame* scrolled = scrollable->GetScrolledFrame();
if (scrolled) {
subDocRoot = scrolled->GetFirstPrincipalChild();
subDocRoot = scrolled->PrincipalChildList().FirstChild();
}
}
}

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

@ -1145,7 +1145,7 @@ CanTextCrossFrameBoundary(nsIFrame* aFrame, nsIAtom* aType)
}
} else {
if (continuesTextRun) {
result.mFrameToScan = aFrame->GetFirstPrincipalChild();
result.mFrameToScan = aFrame->PrincipalChildList().FirstChild();
result.mOverflowFrameToScan =
aFrame->GetChildList(nsIFrame::kOverflowList).FirstChild();
NS_WARN_IF_FALSE(!result.mOverflowFrameToScan,

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

@ -942,9 +942,7 @@ ComputeSizeFromParts(nsPresContext* aPresContext,
// Add the parts that cannot be left out.
nscoord sum = 0;
for (int32_t i = first; i <= last; i++) {
if (aGlyphs[i] != aGlyphs[glue]) {
sum += aSizes[i];
}
sum += aSizes[i];
}
// Determine how much is used in joins

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