Merge mozilla-central to fx-team

This commit is contained in:
Carsten "Tomcat" Book 2015-02-04 15:06:57 +01:00
commit c2555a077b
113 changed files with 1451 additions and 440 deletions

View File

@ -1003,7 +1003,6 @@ pref("apz.y_stationary_size_multiplier", "1.8");
pref("apz.enlarge_displayport_when_clipped", true);
// Use "sticky" axis locking
pref("apz.axis_lock.mode", 2);
pref("apz.subframe.enabled", true);
// Overscroll-related settings
pref("apz.overscroll.enabled", true);

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e06971db7acf7a35c32eb74d675a4e12e288e6be">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>

View File

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eb1795a9002eb142ac58c8d68f8f4ba094af07ca"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="2c31ac3a31a340b40ecd9c291df9b9613d3afa72"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e06971db7acf7a35c32eb74d675a4e12e288e6be">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>

View File

@ -19,13 +19,13 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eb1795a9002eb142ac58c8d68f8f4ba094af07ca"/>
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="2c31ac3a31a340b40ecd9c291df9b9613d3afa72"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
<project name="platform_bionic" path="bionic" remote="b2g" revision="e2b3733ba3fa5e3f404e983d2e4142b1f6b1b846"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="e06971db7acf7a35c32eb74d675a4e12e288e6be">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<!-- Stock Android things -->
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="95bb5b66b3ec5769c3de8d3f25d681787418e7d2"/>
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="ebdad82e61c16772f6cd47e9f11936bf6ebe9aa0"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "dfebaaa8aab43470f482d09d71137bab840c3ae9",
"git_revision": "7b965db30278e46aaaa2a78555c187a041ab7864",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "86761fe022553b4a7c2529be0e48808195ae2fcc",
"revision": "d79b66c61581ce1c0f7891f22d000d139261dbbf",
"repo_path": "integration/gaia-central"
}

View File

@ -17,11 +17,11 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<!-- Stock Android things -->
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
<project name="platform_bionic" path="bionic" remote="b2g" revision="1a2a32eda22ef2cd18f57f423a5e7b22a105a6f8"/>

View File

@ -17,10 +17,10 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="fe893bb760a3bb64375f62fdf4762a58c59df9ef"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<!-- Stock Android things -->

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="7f2ee9f4cb926684883fc2a2e407045fd9db2199">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="dfebaaa8aab43470f482d09d71137bab840c3ae9"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="7b965db30278e46aaaa2a78555c187a041ab7864"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="2262d4a77d4f46ab230fd747bb91e9b77bad36cb"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -23,7 +23,7 @@
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="124e00c74afd7cd29c420d3b1005987bac3c777e"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a536a1fec54b9e2a9ae4fd2e69c2336f12559730"/>
<!-- Stock Android things -->
<project groups="pdk,linux" name="platform/prebuilts/clang/linux-x86/host/3.5" path="prebuilts/clang/linux-x86/host/3.5" revision="50d1ca4ab8add54523b7bc692860d57e8ee4c0d1"/>
<project groups="pdk,linux,arm" name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" path="prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.8" revision="fb3845864573857677f9b500040a8f011eaf5078"/>
@ -140,7 +140,7 @@
<default remote="caf" revision="refs/tags/android-5.0.0_r6" sync-j="4"/>
<!-- Nexus 5 specific things -->
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="ba62cc8b78c30d36181b8060a2016cc8da166236"/>
<project name="device-hammerhead" path="device/lge/hammerhead" remote="b2g" revision="ad8030b3b32b9a78116db6b605b3e1d90bf0fda0"/>
<project name="device-hammerhead" path="device/lge/hammerhead" remote="b2g" revision="baf4efff00df6c4b69e3789f5b9a9e649bd5a443"/>
<project name="device/qcom/common" path="device/qcom/common" remote="caf" revision="3697e5acf25629b82658334e3f8ee3b6df5becab"/>
<project name="device_lge_hammerhead-kernel" path="device/lge/hammerhead-kernel" remote="b2g" revision="1268f640184df5ef759ada669f101a613451673a"/>
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="0cb8574d338bf9f15b45ace7c08ad6deae9673ee"/>

View File

@ -59,7 +59,6 @@ pref("apz.min_skate_speed", "10.0");
// 0 = free, 1 = standard, 2 = sticky
pref("apz.axis_lock.mode", 2);
pref("apz.cross_slide.enabled", true);
pref("apz.subframe.enabled", true);
// Enable Microsoft TSF support by default for imes.
pref("intl.tsf.enable", true);

View File

@ -19,8 +19,12 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PerformanceEntry)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
PerformanceEntry::PerformanceEntry(nsPerformance* aPerformance)
: mPerformance(aPerformance)
PerformanceEntry::PerformanceEntry(nsPerformance* aPerformance,
const nsAString& aName,
const nsAString& aEntryType)
: mPerformance(aPerformance),
mName(aName),
mEntryType(aEntryType)
{
MOZ_ASSERT(aPerformance, "Parent performance object should be provided");
}

View File

@ -20,7 +20,9 @@ protected:
virtual ~PerformanceEntry();
public:
explicit PerformanceEntry(nsPerformance* aPerformance);
PerformanceEntry(nsPerformance* aPerformance,
const nsAString& aName,
const nsAString& aEntryType);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(PerformanceEntry)

View File

@ -0,0 +1,27 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "PerformanceMark.h"
#include "mozilla/dom/PerformanceMarkBinding.h"
using namespace mozilla::dom;
PerformanceMark::PerformanceMark(nsPerformance* aPerformance,
const nsAString& aName)
: PerformanceEntry(aPerformance, aName, NS_LITERAL_STRING("mark"))
{
MOZ_ASSERT(aPerformance, "Parent performance object should be provided");
mStartTime = aPerformance->GetDOMTiming()->TimeStampToDOMHighRes(mozilla::TimeStamp::Now());
}
PerformanceMark::~PerformanceMark()
{
}
JSObject*
PerformanceMark::WrapObject(JSContext* aCx)
{
return PerformanceMarkBinding::Wrap(aCx, this);
}

View File

@ -0,0 +1,36 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_performancemark_h___
#define mozilla_dom_performancemark_h___
#include "mozilla/dom/PerformanceEntry.h"
namespace mozilla {
namespace dom {
// http://www.w3.org/TR/user-timing/#performancemark
class PerformanceMark MOZ_FINAL : public PerformanceEntry
{
public:
PerformanceMark(nsPerformance* aPerformance,
const nsAString& aName);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual DOMHighResTimeStamp StartTime() const MOZ_OVERRIDE
{
return mStartTime;
}
protected:
virtual ~PerformanceMark();
DOMHighResTimeStamp mStartTime;
};
} // namespace dom
} // namespace mozilla
#endif /* mozilla_dom_performancemark_h___ */

View File

@ -0,0 +1,30 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "PerformanceMeasure.h"
#include "mozilla/dom/PerformanceMeasureBinding.h"
using namespace mozilla::dom;
PerformanceMeasure::PerformanceMeasure(nsPerformance* aPerformance,
const nsAString& aName,
DOMHighResTimeStamp aStartTime,
DOMHighResTimeStamp aEndTime)
: PerformanceEntry(aPerformance, aName, NS_LITERAL_STRING("measure")),
mStartTime(aStartTime),
mDuration(aEndTime - aStartTime)
{
MOZ_ASSERT(aPerformance, "Parent performance object should be provided");
}
PerformanceMeasure::~PerformanceMeasure()
{
}
JSObject*
PerformanceMeasure::WrapObject(JSContext* aCx)
{
return PerformanceMeasureBinding::Wrap(aCx, this);
}

View File

@ -0,0 +1,44 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_dom_performancemeasure_h___
#define mozilla_dom_performancemeasure_h___
#include "mozilla/dom/PerformanceEntry.h"
namespace mozilla {
namespace dom {
// http://www.w3.org/TR/user-timing/#performancemeasure
class PerformanceMeasure MOZ_FINAL : public PerformanceEntry
{
public:
PerformanceMeasure(nsPerformance* aPerformance,
const nsAString& aName,
DOMHighResTimeStamp aStartTime,
DOMHighResTimeStamp aEndTime);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
virtual DOMHighResTimeStamp StartTime() const MOZ_OVERRIDE
{
return mStartTime;
}
virtual DOMHighResTimeStamp Duration() const MOZ_OVERRIDE
{
return mDuration;
}
protected:
virtual ~PerformanceMeasure();
DOMHighResTimeStamp mStartTime;
DOMHighResTimeStamp mDuration;
};
} // namespace dom
} // namespace mozilla
#endif /* mozilla_dom_performancemeasure_h___ */

View File

@ -23,8 +23,9 @@ NS_IMPL_ADDREF_INHERITED(PerformanceResourceTiming, PerformanceEntry)
NS_IMPL_RELEASE_INHERITED(PerformanceResourceTiming, PerformanceEntry)
PerformanceResourceTiming::PerformanceResourceTiming(nsPerformanceTiming* aPerformanceTiming,
nsPerformance* aPerformance)
: PerformanceEntry(aPerformance),
nsPerformance* aPerformance,
const nsAString& aName)
: PerformanceEntry(aPerformance, aName, NS_LITERAL_STRING("resource")),
mTiming(aPerformanceTiming)
{
MOZ_ASSERT(aPerformance, "Parent performance object should be provided");

View File

@ -28,7 +28,8 @@ public:
PerformanceEntry)
PerformanceResourceTiming(nsPerformanceTiming* aPerformanceTiming,
nsPerformance* aPerformance);
nsPerformance* aPerformance,
const nsAString& aName);
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;

View File

@ -181,6 +181,8 @@ EXPORTS.mozilla.dom += [
'NodeInfoInlines.h',
'NodeIterator.h',
'PerformanceEntry.h',
'PerformanceMark.h',
'PerformanceMeasure.h',
'PerformanceResourceTiming.h',
'ResponsiveImageSelector.h',
'ScreenOrientation.h',
@ -315,6 +317,8 @@ UNIFIED_SOURCES += [
'nsXMLHttpRequest.cpp',
'nsXMLNameSpaceMap.cpp',
'PerformanceEntry.cpp',
'PerformanceMark.cpp',
'PerformanceMeasure.cpp',
'PerformanceResourceTiming.cpp',
'ResponsiveImageSelector.cpp',
'ScriptSettings.cpp',

View File

@ -14,6 +14,7 @@
#include "mozilla/dom/Attr.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/NamedNodeMapBinding.h"
#include "mozilla/dom/NodeInfoInlines.h"
#include "nsAttrName.h"
#include "nsContentUtils.h"
#include "nsError.h"

View File

@ -146,6 +146,7 @@
#include "nsHtml5TreeOpExecutor.h"
#include "mozilla/dom/HTMLLinkElement.h"
#include "mozilla/dom/HTMLMediaElement.h"
#include "mozilla/dom/MediaSource.h"
#include "mozAutoDocUpdate.h"
#include "nsGlobalWindow.h"
@ -4566,6 +4567,31 @@ nsDocument::ContainsEMEContent()
}
#endif // MOZ_EME
static void
CheckIfContainsMSEContent(nsISupports* aSupports, void* aContainsMSE)
{
nsCOMPtr<nsIDOMHTMLMediaElement> domMediaElem(do_QueryInterface(aSupports));
if (domMediaElem) {
nsCOMPtr<nsIContent> content(do_QueryInterface(domMediaElem));
MOZ_ASSERT(content, "aSupports is not a content");
HTMLMediaElement* mediaElem = static_cast<HTMLMediaElement*>(content.get());
bool* contains = static_cast<bool*>(aContainsMSE);
nsRefPtr<MediaSource> ms = mediaElem->GetMozMediaSourceObject();
if (ms) {
*contains = true;
}
}
}
bool
nsDocument::ContainsMSEContent()
{
bool containsMSE = false;
EnumerateActivityObservers(CheckIfContainsMSEContent,
static_cast<void*>(&containsMSE));
return containsMSE;
}
static void
NotifyActivityChanged(nsISupports *aSupports, void *aUnused)
{
@ -8837,6 +8863,12 @@ nsDocument::CanSavePresentation(nsIRequest *aNewRequest)
}
#endif
// Don't save presentations for documents containing MSE content, to
// reduce memory usage.
if (ContainsMSEContent()) {
return false;
}
bool canCache = true;
if (mSubDocuments)
PL_DHashTableEnumerate(mSubDocuments, CanCacheSubDocument, &canCache);

View File

@ -1461,6 +1461,8 @@ public:
bool ContainsEMEContent();
#endif
bool ContainsMSEContent();
protected:
already_AddRefed<nsIPresShell> doCreateShell(nsPresContext* aContext,
nsViewManager* aViewManager,

View File

@ -11,17 +11,21 @@
#include "nsContentUtils.h"
#include "nsIScriptSecurityManager.h"
#include "nsIDOMWindow.h"
#include "nsILoadInfo.h"
#include "nsIURI.h"
#include "nsThreadUtils.h"
#include "PerformanceEntry.h"
#include "PerformanceMark.h"
#include "PerformanceMeasure.h"
#include "PerformanceResourceTiming.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/PerformanceBinding.h"
#include "mozilla/dom/PerformanceTimingBinding.h"
#include "mozilla/dom/PerformanceNavigationBinding.h"
#include "mozilla/TimeStamp.h"
#include "nsThreadUtils.h"
#include "nsILoadInfo.h"
using namespace mozilla;
using namespace mozilla::dom;
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsPerformanceTiming, mPerformance)
@ -325,7 +329,7 @@ nsPerformanceTiming::ResponseStart()
DOMHighResTimeStamp
nsPerformanceTiming::ResponseEndHighRes()
{
if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) {
if (!IsInitialized()) {
return mZeroTime;
}
if (mResponseEnd.IsNull() ||
@ -350,7 +354,7 @@ nsPerformanceTiming::IsInitialized() const
JSObject*
nsPerformanceTiming::WrapObject(JSContext *cx)
{
return dom::PerformanceTimingBinding::Wrap(cx, this);
return PerformanceTimingBinding::Wrap(cx, this);
}
@ -372,7 +376,7 @@ nsPerformanceNavigation::~nsPerformanceNavigation()
JSObject*
nsPerformanceNavigation::WrapObject(JSContext *cx)
{
return dom::PerformanceNavigationBinding::Wrap(cx, this);
return PerformanceNavigationBinding::Wrap(cx, this);
}
@ -449,13 +453,13 @@ nsPerformance::Navigation()
DOMHighResTimeStamp
nsPerformance::Now()
{
return GetDOMTiming()->TimeStampToDOMHighRes(mozilla::TimeStamp::Now());
return GetDOMTiming()->TimeStampToDOMHighRes(TimeStamp::Now());
}
JSObject*
nsPerformance::WrapObject(JSContext *cx)
{
return dom::PerformanceBinding::Wrap(cx, this);
return PerformanceBinding::Wrap(cx, this);
}
void
@ -483,7 +487,7 @@ nsPerformance::GetEntriesByType(const nsAString& entryType,
void
nsPerformance::GetEntriesByName(const nsAString& name,
const mozilla::dom::Optional<nsAString>& entryType,
const Optional<nsAString>& entryType,
nsTArray<nsRefPtr<PerformanceEntry> >& retval)
{
MOZ_ASSERT(NS_IsMainThread());
@ -499,11 +503,28 @@ nsPerformance::GetEntriesByName(const nsAString& name,
}
}
void
nsPerformance::ClearEntries(const Optional<nsAString>& aEntryName,
const nsAString& aEntryType)
{
for (uint32_t i = 0; i < mEntries.Length();) {
if ((!aEntryName.WasPassed() ||
mEntries[i]->GetName().Equals(aEntryName.Value())) &&
(aEntryType.IsEmpty() ||
mEntries[i]->GetEntryType().Equals(aEntryType))) {
mEntries.RemoveElementAt(i);
} else {
++i;
}
}
}
void
nsPerformance::ClearResourceTimings()
{
MOZ_ASSERT(NS_IsMainThread());
mEntries.Clear();
ClearEntries(Optional<nsAString>(),
NS_LITERAL_STRING("resource"));
}
void
@ -529,6 +550,7 @@ nsPerformance::AddEntry(nsIHttpChannel* channel,
// Don't add the entry if the buffer is full
if (mEntries.Length() >= mPrimaryBufferSize) {
NS_WARNING("Performance Entry buffer size maximum reached!");
return;
}
@ -558,24 +580,16 @@ nsPerformance::AddEntry(nsIHttpChannel* channel,
// The PerformanceResourceTiming object will use the nsPerformanceTiming
// object to get all the required timings.
nsRefPtr<dom::PerformanceResourceTiming> performanceEntry =
new dom::PerformanceResourceTiming(performanceTiming, this);
nsRefPtr<PerformanceResourceTiming> performanceEntry =
new PerformanceResourceTiming(performanceTiming, this, entryName);
performanceEntry->SetName(entryName);
performanceEntry->SetEntryType(NS_LITERAL_STRING("resource"));
// If the initiator type had no valid value, then set it to the default
// ("other") value.
if (initiatorType.IsEmpty()) {
initiatorType = NS_LITERAL_STRING("other");
}
performanceEntry->SetInitiatorType(initiatorType);
mEntries.InsertElementSorted(performanceEntry,
PerformanceEntryComparator());
if (mEntries.Length() >= mPrimaryBufferSize) {
// call onresourcetimingbufferfull
DispatchBufferFullEvent();
}
InsertPerformanceEntry(performanceEntry);
}
}
@ -598,3 +612,226 @@ nsPerformance::PerformanceEntryComparator::LessThan(
"Trying to compare null performance entries");
return aElem1->StartTime() < aElem2->StartTime();
}
void
nsPerformance::InsertPerformanceEntry(PerformanceEntry* aEntry)
{
MOZ_ASSERT(aEntry);
MOZ_ASSERT(mEntries.Length() < mPrimaryBufferSize);
if (mEntries.Length() == mPrimaryBufferSize) {
NS_WARNING("Performance Entry buffer size maximum reached!");
return;
}
mEntries.InsertElementSorted(aEntry,
PerformanceEntryComparator());
if (mEntries.Length() == mPrimaryBufferSize) {
// call onresourcetimingbufferfull
DispatchBufferFullEvent();
}
}
void
nsPerformance::Mark(const nsAString& aName, ErrorResult& aRv)
{
MOZ_ASSERT(NS_IsMainThread());
// Don't add the entry if the buffer is full
if (mEntries.Length() >= mPrimaryBufferSize) {
NS_WARNING("Performance Entry buffer size maximum reached!");
return;
}
if (IsPerformanceTimingAttribute(aName)) {
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
return;
}
nsRefPtr<PerformanceMark> performanceMark =
new PerformanceMark(this, aName);
InsertPerformanceEntry(performanceMark);
}
void
nsPerformance::ClearMarks(const Optional<nsAString>& aName)
{
MOZ_ASSERT(NS_IsMainThread());
ClearEntries(aName, NS_LITERAL_STRING("mark"));
}
DOMHighResTimeStamp
nsPerformance::ResolveTimestampFromName(const nsAString& aName,
ErrorResult& aRv)
{
nsAutoTArray<nsRefPtr<PerformanceEntry>, 1> arr;
DOMHighResTimeStamp ts;
Optional<nsAString> typeParam;
nsAutoString str;
str.AssignLiteral("mark");
typeParam = &str;
GetEntriesByName(aName, typeParam, arr);
if (!arr.IsEmpty()) {
return arr.LastElement()->StartTime();
}
if (!IsPerformanceTimingAttribute(aName)) {
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
return 0;
}
ts = GetPerformanceTimingFromString(aName);
if (!ts) {
aRv.Throw(NS_ERROR_DOM_INVALID_ACCESS_ERR);
return 0;
}
return ConvertDOMMilliSecToHighRes(ts);
}
void
nsPerformance::Measure(const nsAString& aName,
const Optional<nsAString>& aStartMark,
const Optional<nsAString>& aEndMark,
ErrorResult& aRv)
{
MOZ_ASSERT(NS_IsMainThread());
// Don't add the entry if the buffer is full
if (mEntries.Length() >= mPrimaryBufferSize) {
NS_WARNING("Performance Entry buffer size maximum reached!");
return;
}
DOMHighResTimeStamp startTime;
DOMHighResTimeStamp endTime;
if (IsPerformanceTimingAttribute(aName)) {
aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
return;
}
if (aStartMark.WasPassed()) {
startTime = ResolveTimestampFromName(aStartMark.Value(), aRv);
if (NS_WARN_IF(aRv.Failed())) {
return;
}
} else {
// Navigation start is used in this case, but since DOMHighResTimeStamp is
// in relation to navigation start, this will be zero if a name is not
// passed.
startTime = 0;
}
if (aEndMark.WasPassed()) {
endTime = ResolveTimestampFromName(aEndMark.Value(), aRv);
if (NS_WARN_IF(aRv.Failed())) {
return;
}
} else {
endTime = Now();
}
nsRefPtr<PerformanceMeasure> performanceMeasure =
new PerformanceMeasure(this, aName, startTime, endTime);
InsertPerformanceEntry(performanceMeasure);
}
void
nsPerformance::ClearMeasures(const Optional<nsAString>& aName)
{
MOZ_ASSERT(NS_IsMainThread());
ClearEntries(aName, NS_LITERAL_STRING("measure"));
}
DOMHighResTimeStamp
nsPerformance::ConvertDOMMilliSecToHighRes(DOMTimeMilliSec aTime) {
// If the time we're trying to convert is equal to zero, it hasn't been set
// yet so just return 0.
if (aTime == 0) {
return 0;
}
return aTime - GetDOMTiming()->GetNavigationStart();
}
// To be removed once bug 1124165 lands
bool
nsPerformance::IsPerformanceTimingAttribute(const nsAString& aName)
{
// Note that toJSON is added to this list due to bug 1047848
static const char* attributes[] =
{"navigationStart", "unloadEventStart", "unloadEventEnd", "redirectStart",
"redirectEnd", "fetchStart", "domainLookupStart", "domainLookupEnd",
"connectStart", "connectEnd", "requestStart", "responseStart",
"responseEnd", "domLoading", "domInteractive", "domContentLoadedEventStart",
"domContentLoadedEventEnd", "domComplete", "loadEventStart",
"loadEventEnd", nullptr};
for (uint32_t i = 0; attributes[i]; ++i) {
if (aName.EqualsASCII(attributes[i])) {
return true;
}
}
return false;
}
DOMTimeMilliSec
nsPerformance::GetPerformanceTimingFromString(const nsAString& aProperty)
{
if (!IsPerformanceTimingAttribute(aProperty)) {
return 0;
}
if (aProperty.EqualsLiteral("navigationStart")) {
// DOMHighResTimeStamp is in relation to navigationStart, so this will be
// zero.
return GetDOMTiming()->GetNavigationStart();
}
if (aProperty.EqualsLiteral("unloadEventStart")) {
return GetDOMTiming()->GetUnloadEventStart();
}
if (aProperty.EqualsLiteral("unloadEventEnd")) {
return GetDOMTiming()->GetUnloadEventEnd();
}
if (aProperty.EqualsLiteral("redirectStart")) {
return Timing()->RedirectStart();
}
if (aProperty.EqualsLiteral("redirectEnd")) {
return Timing()->RedirectEnd();
}
if (aProperty.EqualsLiteral("fetchStart")) {
return Timing()->FetchStart();
}
if (aProperty.EqualsLiteral("domainLookupStart")) {
return Timing()->DomainLookupStart();
}
if (aProperty.EqualsLiteral("domainLookupEnd")) {
return Timing()->DomainLookupEnd();
}
if (aProperty.EqualsLiteral("connectStart")) {
return Timing()->ConnectStart();
}
if (aProperty.EqualsLiteral("connectEnd")) {
return Timing()->ConnectEnd();
}
if (aProperty.EqualsLiteral("requestStart")) {
return Timing()->RequestStart();
}
if (aProperty.EqualsLiteral("responseStart")) {
return Timing()->ResponseStart();
}
if (aProperty.EqualsLiteral("responseEnd")) {
return Timing()->ResponseEnd();
}
if (aProperty.EqualsLiteral("domLoading")) {
return GetDOMTiming()->GetDomLoading();
}
if (aProperty.EqualsLiteral("domInteractive")) {
return GetDOMTiming()->GetDomInteractive();
}
if (aProperty.EqualsLiteral("domContentLoadedEventStart")) {
return GetDOMTiming()->GetDomContentLoadedEventStart();
}
if (aProperty.EqualsLiteral("domContentLoadedEventEnd")) {
return GetDOMTiming()->GetDomContentLoadedEventEnd();
}
if (aProperty.EqualsLiteral("domComplete")) {
return GetDOMTiming()->GetDomComplete();
}
if (aProperty.EqualsLiteral("loadEventStart")) {
return GetDOMTiming()->GetLoadEventStart();
}
if (aProperty.EqualsLiteral("loadEventEnd")) {
return GetDOMTiming()->GetLoadEventEnd();
}
MOZ_CRASH("IsPerformanceTimingAttribute and GetPerformanceTimingFromString are out of sync");
return 0;
}

View File

@ -21,6 +21,7 @@ class nsPerformance;
class nsIHttpChannel;
namespace mozilla {
class ErrorResult;
namespace dom {
class PerformanceEntry;
}
@ -335,12 +336,26 @@ public:
nsITimedChannel* timedChannel);
void ClearResourceTimings();
void SetResourceTimingBufferSize(uint64_t maxSize);
void Mark(const nsAString& aName, mozilla::ErrorResult& aRv);
void ClearMarks(const mozilla::dom::Optional<nsAString>& aName);
void Measure(const nsAString& aName,
const mozilla::dom::Optional<nsAString>& aStartMark,
const mozilla::dom::Optional<nsAString>& aEndMark,
mozilla::ErrorResult& aRv);
void ClearMeasures(const mozilla::dom::Optional<nsAString>& aName);
IMPL_EVENT_HANDLER(resourcetimingbufferfull)
private:
~nsPerformance();
bool IsPerformanceTimingAttribute(const nsAString& aName);
DOMHighResTimeStamp ResolveTimestampFromName(const nsAString& aName, mozilla::ErrorResult& aRv);
DOMTimeMilliSec GetPerformanceTimingFromString(const nsAString& aTimingName);
DOMHighResTimeStamp ConvertDOMMilliSecToHighRes(const DOMTimeMilliSec aTime);
void DispatchBufferFullEvent();
void InsertPerformanceEntry(PerformanceEntry* aEntry);
void ClearEntries(const mozilla::dom::Optional<nsAString>& aEntryName,
const nsAString& aEntryType);
nsCOMPtr<nsPIDOMWindow> mWindow;
nsRefPtr<nsDOMNavigationTiming> mDOMTiming;
nsCOMPtr<nsITimedChannel> mChannel;

View File

@ -772,3 +772,4 @@ skip-if = buildapp == 'b2g' || toolkit == 'android' || e10s
[test_window_define_nonconfigurable.html]
skip-if = true # bug 1107443 - code for newly-added test was disabled
[test_root_iframe.html]
[test_performance_user_timing.html]

View File

@ -0,0 +1,306 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=782751
-->
<head>
<title>Test for Bug 782751</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=782751">Mozilla Bug 782751 - User Timing API</a>
<div id="content">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
var index = 0;
var steps = [
// Test single mark addition
function () {
ok(true, "Running mark addition test");
performance.mark("test");
var marks = performance.getEntriesByType("mark");
is(marks.length, 1, "Number of marks should be 1");
var mark = marks[0];
is(mark.name, "test", "mark name should be 'test'");
is(mark.entryType, "mark", "mark type should be 'mark'");
isnot(mark.startTime, 0, "mark start time should not be 0");
is(mark.duration, 0, "mark duration should be 0");
},
// Test multiple mark addition
function () {
ok(true, "Running multiple mark with same name addition test");
performance.mark("test");
performance.mark("test");
performance.mark("test");
var marks_type = performance.getEntriesByType("mark");
is(marks_type.length, 3, "Number of marks by type should be 3");
var marks_name = performance.getEntriesByType("mark");
is(marks_name.length, 3, "Number of marks by name should be 3");
var mark = marks_name[0];
is(mark.name, "test", "mark name should be 'test'");
is(mark.entryType, "mark", "mark type should be 'mark'");
isnot(mark.startTime, 0, "mark start time should not be 0");
is(mark.duration, 0, "mark duration should be 0");
var times = [];
// This also tests the chronological ordering specified as
// required for getEntries in the performance timeline spec.
marks_name.forEach(function(s) {
times.forEach(function(time) {
ok(s.startTime >= time.startTime,
"Times should be equal or increasing between similarly named marks: " + s.startTime + " >= " + time.startTime);
});
times.push(s);
});
},
// Test all marks removal
function () {
ok(true, "Running all mark removal test");
performance.mark("test");
performance.mark("test2");
var marks = performance.getEntriesByType("mark");
is(marks.length, 2, "number of marks before all removal");
performance.clearMarks();
marks = performance.getEntriesByType("mark");
is(marks.length, 0, "number of marks after all removal");
},
// Test single mark removal
function () {
ok(true, "Running removal test (0 'test' marks with other marks)");
performance.mark("test2");
var marks = performance.getEntriesByType("mark");
is(marks.length, 1, "number of marks before all removal");
performance.clearMarks("test");
marks = performance.getEntriesByType("mark");
is(marks.length, 1, "number of marks after all removal");
},
// Test single mark removal
function () {
ok(true, "Running removal test (0 'test' marks with no other marks)");
var marks = performance.getEntriesByType("mark");
is(marks.length, 0, "number of marks before all removal");
performance.clearMarks("test");
marks = performance.getEntriesByType("mark");
is(marks.length, 0, "number of marks after all removal");
},
function () {
ok(true, "Running removal test (1 'test' mark with other marks)");
performance.mark("test");
performance.mark("test2");
var marks = performance.getEntriesByType("mark");
is(marks.length, 2, "number of marks before all removal");
performance.clearMarks("test");
marks = performance.getEntriesByType("mark");
is(marks.length, 1, "number of marks after all removal");
},
function () {
ok(true, "Running removal test (1 'test' mark with no other marks)");
performance.mark("test");
var marks = performance.getEntriesByType("mark");
is(marks.length, 1, "number of marks before all removal");
performance.clearMarks("test");
marks = performance.getEntriesByType("mark");
is(marks.length, 0, "number of marks after all removal");
},
function () {
ok(true, "Running removal test (2 'test' marks with other marks)");
performance.mark("test");
performance.mark("test");
performance.mark("test2");
var marks = performance.getEntriesByType("mark");
is(marks.length, 3, "number of marks before all removal");
performance.clearMarks("test");
marks = performance.getEntriesByType("mark");
is(marks.length, 1, "number of marks after all removal");
},
function () {
ok(true, "Running removal test (2 'test' marks with no other marks)");
performance.mark("test");
performance.mark("test");
var marks = performance.getEntriesByType("mark");
is(marks.length, 2, "number of marks before all removal");
performance.clearMarks("test");
marks = performance.getEntriesByType("mark");
is(marks.length, 0, "number of marks after all removal");
},
// Test mark name being same as navigation timing parameter
function () {
ok(true, "Running mark name collision test");
for (n in performance.timing) {
try {
if (n == "toJSON") {
ok(true, "Skipping toJSON entry in collision test");
continue;
}
performance.mark(n);
ok(false, "Mark name collision test failed for name " + n + ", shouldn't make it here!");
} catch (e) {
ok(e instanceof DOMException, "DOM exception thrown for mark named " + n);
is(e.code, e.SYNTAX_ERR, "DOM exception for name collision is syntax error");
}
};
},
// Test measure
function () {
ok(true, "Running measure addition with no start/end time test");
performance.measure("test");
var measures = performance.getEntriesByType("measure");
is(measures.length, 1, "number of measures should be 1");
var measure = measures[0];
is(measure.name, "test", "measure name should be 'test'");
is(measure.entryType, "measure", "measure type should be 'measure'");
is(measure.startTime, 0, "measure start time should be zero");
ok(measure.duration >= 0, "measure duration should not be negative");
},
function () {
ok(true, "Running measure addition with only start time test");
performance.mark("test1");
performance.measure("test", "test1", undefined);
var measures = performance.getEntriesByName("test", "measure");
var marks = performance.getEntriesByName("test1", "mark");
var measure = measures[0];
var mark = marks[0];
is(measure.startTime, mark.startTime, "measure start time should be equal to the mark startTime");
ok(measure.duration >= 0, "measure duration should not be negative");
},
function () {
ok(true, "Running measure addition with only end time test");
performance.mark("test1");
performance.measure("test", undefined, "test1");
var measures = performance.getEntriesByName("test", "measure");
var marks = performance.getEntriesByName("test1", "mark");
var measure = measures[0];
var mark = marks[0];
ok(measure.duration >= 0, "measure duration should not be negative");
},
// Test measure picking latest version of similarly named tags
function () {
ok(true, "Running multiple mark with same name addition test");
performance.mark("test");
performance.mark("test");
performance.mark("test");
performance.mark("test2");
var marks_name = performance.getEntriesByName("test");
is(marks_name.length, 3, "Number of marks by name should be 3");
var marks_name2 = performance.getEntriesByName("test2");
is(marks_name2.length, 1, "Number of marks by name should be 1");
var test_mark = marks_name2[0];
performance.measure("test", "test", "test2");
var measures_type = performance.getEntriesByType("measure");
var last_mark = marks_name[marks_name.length - 1];
is(measures_type.length, 1, "Number of measures by type should be 1");
var measure = measures_type[0];
is(measure.startTime, last_mark.startTime, "Measure start time should be the start time of the latest 'test' mark");
// Tolerance testing to avoid oranges, since we're doing double math across two different languages.
ok(measure.duration - (test_mark.startTime - last_mark.startTime) < .00001,
"Measure duration ( " + measure.duration + ") should be difference between two marks");
},
// Test all measure removal
function () {
ok(true, "Running all measure removal test");
performance.measure("test");
performance.measure("test2");
var measures = performance.getEntriesByType("measure");
is(measures.length, 2, "measure entries should be length 2");
performance.clearMeasures();
measures = performance.getEntriesByType("measure");
is(measures.length, 0, "measure entries should be length 0");
},
// Test single measure removal
function () {
ok(true, "Running all measure removal test");
performance.measure("test");
performance.measure("test2");
var measures = performance.getEntriesByType("measure");
is(measures.length, 2, "measure entries should be length 2");
performance.clearMeasures("test");
measures = performance.getEntriesByType("measure");
is(measures.length, 1, "measure entries should be length 1");
},
// Test measure with invalid start time mark name
function () {
ok(true, "Running measure invalid start test");
try {
performance.measure("test", "notamark");
ok(false, "invalid measure start time exception not thrown!");
} catch (e) {
ok(e instanceof DOMException, "DOM exception thrown for invalid measure");
is(e.code, e.SYNTAX_ERR, "DOM exception for invalid time is syntax error");
}
},
// Test measure with invalid end time mark name
function () {
ok(true, "Running measure invalid end test");
try {
performance.measure("test", undefined, "notamark");
ok(false, "invalid measure end time exception not thrown!");
} catch (e) {
ok(e instanceof DOMException, "DOM exception thrown for invalid measure");
is(e.code, e.SYNTAX_ERR, "DOM exception for invalid time is syntax error");
}
},
// Test measure name being same as navigation timing parameter
function () {
ok(true, "Running measure name collision test");
for (n in performance.timing) {
try {
if (n == "toJSON") {
ok(true, "Skipping toJSON entry in collision test");
continue;
}
performance.measure(n);
ok(false, "Measure name collision test failed for name " + n + ", shouldn't make it here!");
} catch (e) {
ok(e instanceof DOMException, "DOM exception thrown for measure named " + n);
is(e.code, e.SYNTAX_ERR, "DOM exception for name collision is syntax error");
}
};
},
// Test measure mark being a reserved name
function () {
ok(true, "Create measures using all reserved names");
for (n in performance.timing) {
try {
if (n == "toJSON") {
ok(true, "Skipping toJSON entry in collision test");
continue;
}
performance.measure("test", n);
ok(true, "Measure created from reserved name as starting time: " + n);
} catch (e) {
ok(["redirectStart", "redirectEnd", "unloadEventStart", "unloadEventEnd", "loadEventEnd"].indexOf(n) >= 0,
"Measure created from reserved name as starting time: " + n + " and threw expected error");
}
};
},
function () {
ok(true, "all done!");
SimpleTest.finish();
}
// TODO: Test measure picking latest version of similarly named tags
];
function next() {
ok(true, "Begin!");
var arr;
for (var i = 0; i < steps.length; ++i) {
try {
performance.clearMarks();
performance.clearMeasures();
performance.clearResourceTimings();
arr = performance.getEntries();
is(arr.length, 0, "clearing performance entries");
steps[i]();
} catch(ex) {
ok(false, "Caught exception", ex);
}
}
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(next);
</script>
</pre>
</body>
</html>

View File

@ -7,6 +7,7 @@
#ifndef mozilla_dom_bluetooth_bluetoothpairinghandle_h
#define mozilla_dom_bluetooth_bluetoothpairinghandle_h
#include "BluetoothCommon.h"
#include "nsWrapperCache.h"
namespace mozilla {

View File

@ -9,11 +9,6 @@
#include "BluetoothService.h"
#include "BluetoothCommon.h"
#include "BluetoothA2dpManager.h"
#include "BluetoothHfpManager.h"
#include "BluetoothHidManager.h"
#include "BluetoothManager.h"
#include "BluetoothOppManager.h"
#include "BluetoothParent.h"
#include "BluetoothReplyRunnable.h"
#include "BluetoothServiceChildProcess.h"

View File

@ -395,7 +395,8 @@ protected:
static BluetoothService*
Create();
void CompleteToggleBt(bool aEnabled);
void
CompleteToggleBt(bool aEnabled);
typedef nsClassHashtable<nsStringHashKey, BluetoothSignalObserverList >
BluetoothSignalObserverTable;

View File

@ -472,9 +472,9 @@ BluetoothGattClientHALInterface::RegisterClient(
const BluetoothUuid& aUuid, BluetoothGattClientResultHandler* aRes)
{
int status;
bt_uuid_t uuid;
#if ANDROID_VERSION >= 19
bt_uuid_t uuid;
if (NS_SUCCEEDED(Convert(aUuid, uuid))) {
status = mInterface->register_client(&uuid);
} else {

View File

@ -44,6 +44,7 @@
#include "mozilla/ipc/DBusUtils.h"
#include "mozilla/ipc/RawDBusConnection.h"
#include "mozilla/LazyIdleThread.h"
#include "mozilla/Monitor.h"
#include "mozilla/Mutex.h"
#include "mozilla/StaticMutex.h"
#include "mozilla/unused.h"
@ -143,7 +144,7 @@ public:
BluetoothProfileManagerBase* profile;
profile = BluetoothHfpManager::Get();
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
NS_ENSURE_TRUE(profile, false);
if (profile->IsConnected()) {
profile->Disconnect(nullptr);
} else {
@ -151,13 +152,13 @@ public:
}
profile = BluetoothOppManager::Get();
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
NS_ENSURE_TRUE(profile, false);
if (profile->IsConnected()) {
profile->Disconnect(nullptr);
}
profile = BluetoothA2dpManager::Get();
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
NS_ENSURE_TRUE(profile, false);
if (profile->IsConnected()) {
profile->Disconnect(nullptr);
} else {
@ -165,7 +166,7 @@ public:
}
profile = BluetoothHidManager::Get();
NS_ENSURE_TRUE(profile, NS_ERROR_FAILURE);
NS_ENSURE_TRUE(profile, false);
if (profile->IsConnected()) {
profile->Disconnect(nullptr);
} else {
@ -1894,7 +1895,7 @@ EventFilter(DBusConnection* aConn, DBusMessage* aMsg, void* aData)
// "bluetooth-pairedstatuschanged" from BluetoothService.
BluetoothValue newValue(v);
ToLowerCase(newValue.get_ArrayOfBluetoothNamedValue()[0].name());
BluetoothSignal signal(NS_LITERAL_STRING(PAIRED_STATUS_CHANGED_ID),
BluetoothSignal signal(NS_LITERAL_STRING("pairedstatuschanged"),
NS_LITERAL_STRING(KEY_LOCAL_AGENT),
newValue);
NS_DispatchToMainThread(new DistributeBluetoothSignalTask(signal));
@ -2879,8 +2880,8 @@ BluetoothDBusService::GetPairedDevicePropertiesInternal(
}
nsresult
FetchUuidsInternal(const nsAString& aDeviceAddress,
BluetoothReplyRunnable* aRunnable)
BluetoothDBusService::FetchUuidsInternal(const nsAString& aDeviceAddress,
BluetoothReplyRunnable* aRunnable)
{
return NS_OK;
}
@ -3963,7 +3964,8 @@ BluetoothDBusService::SendMetaData(const nsAString& aTitle,
a2dp->GetTitle(prevTitle);
a2dp->GetAlbum(prevAlbum);
if (aMediaNumber != a2dp->GetMediaNumber() ||
uint64_t mediaNumber = static_cast<uint64_t>(aMediaNumber);
if (mediaNumber != a2dp->GetMediaNumber() ||
!aTitle.Equals(prevTitle) ||
!aAlbum.Equals(prevAlbum)) {
UpdateNotification(ControlEventId::EVENT_TRACK_CHANGED, aMediaNumber);

View File

@ -7,10 +7,10 @@
#ifndef mozilla_dom_bluetooth_bluetoothdbusservice_h__
#define mozilla_dom_bluetooth_bluetoothdbusservice_h__
#include "mozilla/Attributes.h"
#include "BluetoothCommon.h"
#include "mozilla/ipc/RawDBusConnection.h"
#include "BluetoothService.h"
#include "mozilla/Attributes.h"
#include "mozilla/ipc/RawDBusConnection.h"
#include "nsIThread.h"
class DBusMessage;
@ -93,15 +93,15 @@ public:
RemoveDeviceInternal(const nsAString& aDeviceObjectPath,
BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
virtual nsresult
virtual void
SetPinCodeInternal(const nsAString& aDeviceAddress, const nsAString& aPinCode,
BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
virtual nsresult
virtual void
SetPasskeyInternal(const nsAString& aDeviceAddress, uint32_t aPasskey,
BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
virtual nsresult
virtual void
SetPairingConfirmationInternal(const nsAString& aDeviceAddress, bool aConfirm,
BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;

View File

@ -166,7 +166,8 @@ static CINDItem sCINDItems[] = {
#endif
};
class BluetoothHfpManager::GetVolumeTask : public nsISettingsServiceCallback
class BluetoothHfpManager::GetVolumeTask MOZ_FINAL
: public nsISettingsServiceCallback
{
public:
NS_DECL_ISUPPORTS

View File

@ -204,13 +204,32 @@ DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(VolumeMute)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(VolumeUp)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(WakeUp)
// Legacy keys
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Abort)
// Legacy Keys and Non-Standard Keys
// Legacy modifier keys
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Hyper)
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Resume)
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Super)
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Suspend)
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Turbo)
// Legacy process control keys
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Abort)
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Resume)
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Suspend)
// Legacy editing keys
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Again)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Copy)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Cut)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Find)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Open)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Paste)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Props)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Select)
DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Undo)
// International keyboards
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Hiragana)
// DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME(Katakana)
#undef DEFINE_PHYSICAL_KEY_CODE_NAME_WITH_SAME_NAME
#undef NS_DEFINE_PHYSICAL_KEY_CODE_NAME_INTERNAL

View File

@ -519,7 +519,7 @@ already_AddRefed<MediaSource>
HTMLMediaElement::GetMozMediaSourceObject() const
{
nsRefPtr<MediaSource> source;
if (IsMediaSourceURI(mLoadingSrc)) {
if (mLoadingSrc && IsMediaSourceURI(mLoadingSrc)) {
NS_GetSourceForMediaSourceURI(mLoadingSrc, getter_AddRefs(source));
}
return source.forget();

View File

@ -47,12 +47,11 @@ parent:
child:
/**
* Sent from content when a plugin is unloaded via layout. We shut down
* some things in response to this so that we don't end up firing async
* msgs after the child is destroyed. We know that after this call
* the child actor may not be on the other side.
* Sent from chrome when the chrome side widget is getting torn down.
* @param aParentInitiated - indicates if the shutdown is associated
* with a tab closure vs. content reload.
*/
async ParentShutdown();
async ParentShutdown(bool aParentInitiated);
/**
* Requests a full update of the plugin window.

View File

@ -1671,10 +1671,15 @@ void MediaDecoderStateMachine::PlayInternal()
void MediaDecoderStateMachine::ResetPlayback()
{
// We should be reseting because we're seeking, shutting down, or
// entering dormant state. We could also be in the process of going dormant,
// and have just switched to exiting dormant before we finished entering
// dormant, hence the DECODING_NONE case below.
AssertCurrentThreadInMonitor();
MOZ_ASSERT(mState == DECODER_STATE_SEEKING ||
mState == DECODER_STATE_SHUTDOWN ||
mState == DECODER_STATE_DORMANT);
mState == DECODER_STATE_DORMANT ||
mState == DECODER_STATE_DECODING_NONE);
// Audio thread should've been stopped at the moment. Otherwise, AudioSink
// might be accessing AudioQueue outside of the decoder monitor while we
@ -2496,6 +2501,8 @@ void MediaDecoderStateMachine::DecodeSeek()
if (!currentTimeChanged) {
DECODER_LOG("Seek !currentTimeChanged...");
mDropAudioUntilNextDiscontinuity = false;
mDropVideoUntilNextDiscontinuity = false;
nsresult rv = DecodeTaskQueue()->Dispatch(
NS_NewRunnableMethod(this, &MediaDecoderStateMachine::SeekCompleted));
if (NS_FAILED(rv)) {

View File

@ -253,6 +253,9 @@ protected:
Consumer::mComplete = true;
if (Consumer::mDisconnected) {
PROMISE_LOG("ThenValue::DoResolve disconnected - bailing out [this=%p]", this);
// Null these out for the same reasons described below.
mResponseTarget = nullptr;
mThisVal = nullptr;
return;
}
InvokeCallbackMethod(mThisVal.get(), mResolveMethod, aResolveValue);
@ -270,6 +273,9 @@ protected:
Consumer::mComplete = true;
if (Consumer::mDisconnected) {
PROMISE_LOG("ThenValue::DoReject disconnected - bailing out [this=%p]", this);
// Null these out for the same reasons described below.
mResponseTarget = nullptr;
mThisVal = nullptr;
return;
}
InvokeCallbackMethod(mThisVal.get(), mRejectMethod, aRejectValue);

View File

@ -78,4 +78,4 @@ load 1080986.html
include ../../mediasource/test/crashtests/crashtests.list
# This needs to run at the end to avoid leaking busted state into other tests.
skip-if(winWidget) load 691096-1.html
skip-if(winWidget||OSX==1010&&isDebugBuild) load 691096-1.html

View File

@ -12,6 +12,9 @@
using mozilla::plugins::PluginInstanceParent;
#endif
#define PWLOG(...)
//#define PWLOG(...) printf_stderr(__VA_ARGS__)
namespace mozilla {
namespace plugins {
@ -23,19 +26,21 @@ PluginWidgetChild::PluginWidgetChild() :
PluginWidgetChild::~PluginWidgetChild()
{
PWLOG("PluginWidgetChild::~PluginWidgetChild()\n");
MOZ_COUNT_DTOR(PluginWidgetChild);
}
/*
* Tear down scenarios
* layout (plugin content unloading):
* - PluginWidgetProxy nsIWidget Destroy()
* - PluginWidgetProxy->PluginWidgetChild->SendDestroy()
* - PluginWidgetParent::RecvDestroy(), sends async Destroyed() to PluginWidgetChild
* - PluginWidgetChild::RecvDestroyed() calls Send__delete__()
* - PluginWidgetProxy::Destroy(), calls PluginWidgetChild->SendDestroy(), (proxy disabled)
* - PluginWidgetParent::RecvDestroy(), sends async ParentShutdown()
* - PluginWidgetChild::RecvParentShutdown(), calls Send__delete__()
* - PluginWidgetParent::ActorDestroy() called in response to __delete__.
* PBrowser teardown (tab closing):
* - PluginWidgetParent::ParentDestroy() called by TabParent::Destroy()
* - TabParent::Destroy()
* - PluginWidgetParent::ParentDestroy(), sends async ParentShutdown()
* - PluginWidgetChild::RecvParentShutdown(), (proxy disabled)
* - PluginWidgetParent::ActorDestroy()
* - PluginWidgetParent::~PluginWidgetParent() in response to PBrowserParent::DeallocSubtree()
* - PluginWidgetChild::ActorDestroy() from PPluginWidgetChild::DestroySubtree
@ -43,7 +48,7 @@ PluginWidgetChild::~PluginWidgetChild()
**/
void
PluginWidgetChild::ActorDestroy(ActorDestroyReason aWhy)
PluginWidgetChild::ShutdownProxy()
{
if (mWidget) {
mWidget->ChannelDestroyed();
@ -51,10 +56,21 @@ PluginWidgetChild::ActorDestroy(ActorDestroyReason aWhy)
mWidget = nullptr;
}
bool
PluginWidgetChild::RecvParentShutdown()
void
PluginWidgetChild::ActorDestroy(ActorDestroyReason aWhy)
{
Send__delete__(this);
PWLOG("PluginWidgetChild::ActorDestroy(%d)\n", aWhy);
ShutdownProxy(); // backup
}
bool
PluginWidgetChild::RecvParentShutdown(const bool& aParentInitiated)
{
PWLOG("PluginWidgetChild::RecvParentShutdown(%d)\n", aParentInitiated);
ShutdownProxy();
if (!aParentInitiated) {
Send__delete__(this);
}
return true;
}

View File

@ -21,7 +21,9 @@ public:
virtual bool RecvUpdateWindow(const uintptr_t& aChildId) MOZ_OVERRIDE;
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
virtual bool RecvParentShutdown() MOZ_OVERRIDE;
virtual bool RecvParentShutdown(const bool& aParentInitiated) MOZ_OVERRIDE;
void ShutdownProxy();
mozilla::widget::PluginWidgetProxy* mWidget;
};

View File

@ -170,10 +170,25 @@ PluginWidgetParent::RecvCreate()
void
PluginWidgetParent::ActorDestroy(ActorDestroyReason aWhy)
{
mActorDestroyed = true;
PWLOG("PluginWidgetParent::ActorDestroy()\n");
}
void
PluginWidgetParent::ShutdownCommon(bool aParentInitiated)
{
if (mActorDestroyed || !mWidget) {
return;
}
PWLOG("PluginWidgetParent::ShutdownCommon()\n");
mWidget->UnregisterPluginWindowForRemoteUpdates();
DebugOnly<nsresult> rv = mWidget->Destroy();
NS_ASSERTION(NS_SUCCEEDED(rv), "widget destroy failure");
mWidget = nullptr;
mActorDestroyed = true;
unused << SendParentShutdown(aParentInitiated);
}
// Called by TabParent's Destroy() in response to an early tear down (Early
// in that this is happening before layout in the child has had a chance
// to destroy the child widget.) when the tab is closing. We will not receive
@ -181,16 +196,8 @@ PluginWidgetParent::ActorDestroy(ActorDestroyReason aWhy)
void
PluginWidgetParent::ParentDestroy()
{
if (mActorDestroyed || !mWidget) {
return;
}
PWLOG("PluginWidgetParent::ParentDestroy()\n");
mWidget->UnregisterPluginWindowForRemoteUpdates();
DebugOnly<nsresult> rv = mWidget->Destroy();
NS_ASSERTION(NS_SUCCEEDED(rv), "widget destroy failure");
mWidget = nullptr;
mActorDestroyed = true;
return;
ShutdownCommon(true);
}
// Called by the child when a plugin is torn down within a tab
@ -198,11 +205,8 @@ PluginWidgetParent::ParentDestroy()
bool
PluginWidgetParent::RecvDestroy()
{
bool destroyed = mActorDestroyed;
ParentDestroy();
if (!destroyed) {
unused << SendParentShutdown();
}
PWLOG("PluginWidgetParent::RecvDestroy()\n");
ShutdownCommon(false);
return true;
}

View File

@ -49,6 +49,8 @@ public:
void ParentDestroy();
private:
void ShutdownCommon(bool aParentInitiated);
// The tab our connection is associated with.
mozilla::dom::TabParent* GetTabParent();
// The chrome side native widget.

View File

@ -861,6 +861,10 @@ var interfaceNamesInGlobalScope =
"Performance",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceEntry",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceMark",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceMeasure",
// IMPORTANT: Do not change this list without review from a DOM peer!
"PerformanceNavigation",
// IMPORTANT: Do not change this list without review from a DOM peer!

View File

@ -51,3 +51,16 @@ partial interface Performance {
[Pref="dom.enable_resource_timing"]
attribute EventHandler onresourcetimingbufferfull;
};
// http://www.w3.org/TR/user-timing/
[Exposed=Window]
partial interface Performance {
[Pref="dom.enable_user_timing", Throws]
void mark(DOMString markName);
[Pref="dom.enable_user_timing"]
void clearMarks(optional DOMString markName);
[Pref="dom.enable_user_timing", Throws]
void measure(DOMString measureName, optional DOMString startMark, optional DOMString endMark);
[Pref="dom.enable_user_timing"]
void clearMeasures(optional DOMString measureName);
};

View File

@ -0,0 +1,12 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://www.w3.org/TR/user-timing/#performancemark
*/
interface PerformanceMark : PerformanceEntry
{
};

View File

@ -0,0 +1,12 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://www.w3.org/TR/user-timing/#performancemeasure
*/
interface PerformanceMeasure : PerformanceEntry
{
};

View File

@ -320,6 +320,8 @@ WEBIDL_FILES = [
'ParentNode.webidl',
'Performance.webidl',
'PerformanceEntry.webidl',
'PerformanceMark.webidl',
'PerformanceMeasure.webidl',
'PerformanceNavigation.webidl',
'PerformanceResourceTiming.webidl',
'PerformanceTiming.webidl',

View File

@ -30,7 +30,7 @@ namespace mozilla {
namespace layers {
struct LayerPropertiesBase;
UniquePtr<LayerPropertiesBase> CloneLayerTreePropertiesInternal(Layer* aRoot);
UniquePtr<LayerPropertiesBase> CloneLayerTreePropertiesInternal(Layer* aRoot, bool aIsMask = false);
static nsIntRect
TransformRect(const nsIntRect& aRect, const Matrix4x4& aTransform)
@ -109,7 +109,7 @@ struct LayerPropertiesBase : public LayerProperties
{
MOZ_COUNT_CTOR(LayerPropertiesBase);
if (aLayer->GetMaskLayer()) {
mMaskLayer = CloneLayerTreePropertiesInternal(aLayer->GetMaskLayer());
mMaskLayer = CloneLayerTreePropertiesInternal(aLayer->GetMaskLayer(), true);
}
if (mUseClipRect) {
mClipRect = *aLayer->GetClipRect();
@ -355,12 +355,13 @@ struct ColorLayerProperties : public LayerPropertiesBase
struct ImageLayerProperties : public LayerPropertiesBase
{
explicit ImageLayerProperties(ImageLayer* aImage)
explicit ImageLayerProperties(ImageLayer* aImage, bool aIsMask)
: LayerPropertiesBase(aImage)
, mContainer(aImage->GetContainer())
, mFilter(aImage->GetFilter())
, mScaleToSize(aImage->GetScaleToSize())
, mScaleMode(aImage->GetScaleMode())
, mIsMask(aIsMask)
{
}
@ -376,12 +377,23 @@ struct ImageLayerProperties : public LayerPropertiesBase
return result;
}
if (mContainer != imageLayer->GetContainer() ||
ImageContainer* container = imageLayer->GetContainer();
if (mContainer != container ||
mFilter != imageLayer->GetFilter() ||
mScaleToSize != imageLayer->GetScaleToSize() ||
mScaleMode != imageLayer->GetScaleMode()) {
aGeometryChanged = true;
return NewTransformedBounds();
if (mIsMask) {
// Mask layers have an empty visible region, so we have to
// use the image size instead.
IntSize size = container->GetCurrentSize();
nsIntRect rect(0, 0, size.width, size.height);
return TransformRect(rect, mLayer->GetLocalTransform());
} else {
return NewTransformedBounds();
}
}
return nsIntRect();
@ -391,15 +403,18 @@ struct ImageLayerProperties : public LayerPropertiesBase
GraphicsFilter mFilter;
gfx::IntSize mScaleToSize;
ScaleMode mScaleMode;
bool mIsMask;
};
UniquePtr<LayerPropertiesBase>
CloneLayerTreePropertiesInternal(Layer* aRoot)
CloneLayerTreePropertiesInternal(Layer* aRoot, bool aIsMask /* = false */)
{
if (!aRoot) {
return MakeUnique<LayerPropertiesBase>();
}
MOZ_ASSERT(!aIsMask || aRoot->GetType() == Layer::TYPE_IMAGE);
switch (aRoot->GetType()) {
case Layer::TYPE_CONTAINER:
case Layer::TYPE_REF:
@ -407,7 +422,7 @@ CloneLayerTreePropertiesInternal(Layer* aRoot)
case Layer::TYPE_COLOR:
return MakeUnique<ColorLayerProperties>(static_cast<ColorLayer*>(aRoot));
case Layer::TYPE_IMAGE:
return MakeUnique<ImageLayerProperties>(static_cast<ImageLayer*>(aRoot));
return MakeUnique<ImageLayerProperties>(static_cast<ImageLayer*>(aRoot), aIsMask);
default:
return MakeUnique<LayerPropertiesBase>(aRoot);
}

View File

@ -786,7 +786,7 @@ ContentClientIncremental::BeginPaintBuffer(PaintedLayer* aLayer,
if ((mode == SurfaceMode::SURFACE_COMPONENT_ALPHA) != mHasBufferOnWhite) {
printf_stderr("Layer's component alpha status has changed\n");
}
printf_stderr("Invalidating entire layer %p\n", aLayer);
printf_stderr("Invalidating entire layer %p: no buffer, or content type or component alpha changed\n", aLayer);
}
#endif
// We're effectively clearing the valid region, so we need to draw

View File

@ -972,8 +972,7 @@ CompositorParent::CompositeToTarget(DrawTarget* aTarget, const nsIntRect* aRect)
RenderTraceLayers(mLayerManager->GetRoot(), "0000");
#ifdef MOZ_DUMP_PAINTING
static bool gDumpCompositorTree = false;
if (gDumpCompositorTree) {
if (gfxPrefs::DumpHostLayers()) {
printf_stderr("Painting --- compositing layer tree:\n");
mLayerManager->Dump();
}

View File

@ -173,7 +173,6 @@ private:
DECL_GFX_PREF(Live, "apz.pan_repaint_interval", APZPanRepaintInterval, int32_t, 250);
DECL_GFX_PREF(Live, "apz.printtree", APZPrintTree, bool, false);
DECL_GFX_PREF(Live, "apz.smooth_scroll_repaint_interval", APZSmoothScrollRepaintInterval, int32_t, 75);
DECL_GFX_PREF(Live, "apz.subframe.enabled", APZSubframeEnabled, bool, false);
DECL_GFX_PREF(Once, "apz.test.logging_enabled", APZTestLoggingEnabled, bool, false);
DECL_GFX_PREF(Live, "apz.touch_start_tolerance", APZTouchStartTolerance, float, 1.0f/4.5f);
DECL_GFX_PREF(Live, "apz.use_paint_duration", APZUsePaintDuration, bool, true);
@ -276,6 +275,8 @@ private:
DECL_GFX_PREF(Live, "layers.dump-texture", LayersDumpTexture, bool, false);
#ifdef MOZ_DUMP_PAINTING
DECL_GFX_PREF(Live, "layers.dump-decision", LayersDumpDecision, bool, false);
DECL_GFX_PREF(Live, "layers.dump-client-layers", DumpClientLayers, bool, false);
DECL_GFX_PREF(Live, "layers.dump-host-layers", DumpHostLayers, bool, false);
#endif
// 0 is "no change" for contrast, positive values increase it, negative values

View File

@ -702,6 +702,11 @@ RasterImage::CopyFrame(uint32_t aWhichFrame, uint32_t aFlags)
DrawOptions(1.0f, CompositionOp::OP_SOURCE));
} else {
RefPtr<SourceSurface> srcSurf = frameRef->GetSurface();
if (!srcSurf) {
RecoverFromLossOfFrames(mSize, aFlags);
return nullptr;
}
Rect srcRect(0, 0, intFrameRect.width, intFrameRect.height);
target->DrawSurface(srcSurf, srcRect, rect);
}
@ -1534,6 +1539,30 @@ RasterImage::Decode(const Maybe<nsIntSize>& aSize, uint32_t aFlags)
return NS_OK;
}
void
RasterImage::RecoverFromLossOfFrames(const nsIntSize& aSize, uint32_t aFlags)
{
if (!mHasSize) {
return;
}
NS_WARNING("An imgFrame became invalid. Attempting to recover...");
// Discard all existing frames, since they're probably all now invalid.
SurfaceCache::RemoveImage(ImageKey(this));
// Animated images require some special handling, because we normally require
// that they never be discarded.
if (mAnim) {
Decode(Some(mSize), aFlags | FLAG_SYNC_DECODE);
ResetAnimation();
return;
}
// For non-animated images, it's fine to recover using an async decode.
Decode(Some(aSize), aFlags);
}
bool
RasterImage::CanScale(GraphicsFilter aFilter,
const nsIntSize& aSize,
@ -1713,7 +1742,9 @@ RasterImage::DrawWithPreDownscaleIfNeeded(DrawableFrameRef&& aFrameRef,
region.Scale(1.0 / scale.width, 1.0 / scale.height);
}
frameRef->Draw(aContext, region, aFilter, aFlags);
if (!frameRef->Draw(aContext, region, aFilter, aFlags)) {
RecoverFromLossOfFrames(aSize, aFlags);
}
}
//******************************************************************************

View File

@ -345,6 +345,13 @@ private:
already_AddRefed<Decoder> CreateDecoder(const Maybe<nsIntSize>& aSize,
uint32_t aFlags);
/**
* In catastrophic circumstances like a GPU driver crash, we may lose our
* frames even if they're locked. RecoverFromLossOfFrames discards all
* existing frames and redecodes using the provided @aSize and @aFlags.
*/
void RecoverFromLossOfFrames(const nsIntSize& aSize, uint32_t aFlags);
private: // data
nsIntSize mSize;
Orientation mOrientation;

View File

@ -798,13 +798,19 @@ VectorImage::Draw(gfxContext* aContext,
// Draw.
if (frameRef) {
RefPtr<SourceSurface> surface = frameRef->GetSurface();
nsRefPtr<gfxDrawable> svgDrawable =
new gfxSurfaceDrawable(surface, ThebesIntSize(frameRef->GetSize()));
Show(svgDrawable, params);
} else {
CreateSurfaceAndShow(params);
if (surface) {
nsRefPtr<gfxDrawable> svgDrawable =
new gfxSurfaceDrawable(surface, ThebesIntSize(frameRef->GetSize()));
Show(svgDrawable, params);
return NS_OK;
}
// We lost our surface due to some catastrophic event.
RecoverFromLossOfSurfaces();
}
CreateSurfaceAndShow(params);
return NS_OK;
}
@ -880,6 +886,15 @@ VectorImage::Show(gfxDrawable* aDrawable, const SVGDrawingParameters& aParams)
mRenderingObserver->ResumeHonoringInvalidations();
}
void
VectorImage::RecoverFromLossOfSurfaces()
{
NS_WARNING("An imgFrame became invalid. Attempting to recover...");
// Discard all existing frames, since they're probably all now invalid.
SurfaceCache::RemoveImage(ImageKey(this));
}
//******************************************************************************
/* void requestDecode() */
NS_IMETHODIMP

View File

@ -85,6 +85,13 @@ protected:
void Show(gfxDrawable* aDrawable, const SVGDrawingParameters& aParams);
private:
/**
* In catastrophic circumstances like a GPU driver crash, we may lose our
* surfaces even if they're locked. RecoverFromLossOfSurfaces discards all
* existing surfaces, allowing us to recover.
*/
void RecoverFromLossOfSurfaces();
void CancelAllListeners();
void SendInvalidationNotifications();

View File

@ -40,9 +40,10 @@ using mozilla::ArrayLength;
static char gLastError[2000];
#if defined(__APPLE__) || defined(__linux__) || defined(MOZ_CALLGRIND)
static void
#ifdef __GNUC__
__attribute__((unused,format(printf,1,2)))
__attribute__((format(printf,1,2)))
#endif
UnsafeError(const char *format, ...)
{
@ -53,6 +54,7 @@ UnsafeError(const char *format, ...)
gLastError[sizeof(gLastError) - 1] = '\0';
}
#endif
JS_PUBLIC_API(const char *)
JS_UnsafeGetLastProfilingError()
@ -345,7 +347,6 @@ ClearMaxGCPauseAccumulator(JSContext *cx, unsigned argc, jsval *vp)
return true;
}
#if defined(MOZ_SHARK) || defined(MOZ_INSTRUMENTS)
static bool

View File

@ -3,7 +3,7 @@
// Binary: cache/js-dbg-64-b84d0be52070-linux
// Flags:
//
var x = wrap.call(x, Function);
var x = new Proxy(Function, {});
if (x.__proto__ = x) {
print(x);
}

View File

@ -1,5 +0,0 @@
// Binary: cache/js-dbg-64-f5e128da7b5f-linux
// Flags:
//
x = Proxy.createFunction((function () {}), Uint16Array, wrap)
try { new(wrap(x)) } catch(exc1) {}

View File

@ -1,4 +1,4 @@
// Binary: cache/js-dbg-32-7b8898c9b54c-linux
// Flags:
//
wrap(this)
new Proxy(this,{})

View File

@ -14,7 +14,7 @@ var _var_ = o;
}
for(var i1=0; i1<6; i1++) {
f4(f3);
f4 = wrap(f7);
f4 = new Proxy(f7, {});
}
f4(f0);

View File

@ -5,7 +5,7 @@ var o9 = Function.prototype;
var o13 = Array;
function f5(o) {
o.watch('p3', function() {});
ox1 = wrap(o);
ox1 = new Proxy(o, {});
}
f5(o9);
f5(o13);

View File

@ -1,4 +1,9 @@
// Binary: cache/js-dbg-64-1da11a2bc5db-linux
// Flags:
//
new Int32Array(wrap(new Uint8ClampedArray))
try {
new Int32Array(new Proxy(new Uint8ClampedArray, {}))
throw new Error("Hey! you made .length work on proxies! Congrats!" +
"Remove the try catch for karma points. :)");
} catch (e) { }

View File

@ -5,7 +5,7 @@ evalcx("\
} catch(a) {\
x = a;\
} \
wrap(x);\
new Proxy(x, {});\
", s);
evalcx("\
n = x;\

View File

@ -1,5 +1,5 @@
function f() {
"use strict";
}
g = wrap(f);
g = new Proxy(f, {});
Object.defineProperty(g, "arguments", {set: function(){}});

View File

@ -1,2 +1,2 @@
obj = wrap(Number.bind());
obj = new Proxy(Number.bind(), {});
Object.defineProperty(obj, "caller", {set: function () {}});

View File

@ -1,4 +0,0 @@
function f() {}
g = wrap(f);
g.__defineGetter__('toString', f.toString);
g.toString;

View File

@ -1 +0,0 @@
"".match(wrap(evalcx("/x/",newGlobal())));

View File

@ -1,5 +0,0 @@
var b = new ArrayBuffer(4);
var dv = new DataView(b);
dv.setInt32(0, 42);
var w = wrap(dv);
assertEq(DataView.prototype.getInt32.call(w, 0), 42);

View File

@ -3,14 +3,6 @@
assertEq((new (Proxy.createFunction({},
function(){ this.x = 1 },
function(){ this.x = 2 }))).x, 2);
try {
x = Proxy.createFunction((function () {}), Uint16Array, wrap)
new(wrap(x))
throw "Should not be reached"
}
catch (e) {
assertEq(String(e.message).indexOf('is not a constructor') === -1, false);
}
// proxies can return the callee
var x = Proxy.createFunction({}, function (q) { return q; });
assertEq(new x(x), x);

View File

@ -1,12 +1,14 @@
// |jit-test| error: is not a function
function f() { (e)
} (x = Proxy.createFunction((function(x) {
function f() {
(e)
}
(x = Proxy.createFunction((function(x) {
return {
get: function(r, b) {
return x[b]
}
}
})(/x/), wrap))
})(/x/), Function))
for (z = 0; z < 100; x.unwatch(), z++)
for (e in [0]) {
gczeal(2)

View File

@ -41,7 +41,7 @@ OptimizationInfo::initNormalOptimizationInfo()
maxInlineDepth_ = 3;
scalarReplacement_ = true;
smallFunctionMaxInlineDepth_ = 10;
compilerWarmUpThreshold_ = 1000;
compilerWarmUpThreshold_ = CompilerWarmupThreshold;
inliningWarmUpThresholdFactor_ = 0.125;
inliningRecompileThresholdFactor_ = 4;
}
@ -73,8 +73,8 @@ OptimizationInfo::compilerWarmUpThreshold(JSScript *script, jsbytecode *pc) cons
pc = nullptr;
uint32_t warmUpThreshold = compilerWarmUpThreshold_;
if (js_JitOptions.forceDefaultIonWarmUpThreshold)
warmUpThreshold = js_JitOptions.forcedDefaultIonWarmUpThreshold;
if (js_JitOptions.forcedDefaultIonWarmUpThreshold.isSome())
warmUpThreshold = js_JitOptions.forcedDefaultIonWarmUpThreshold.ref();
// If the script is too large to compile on the main thread, we can still
// compile it off thread. In these cases, increase the warm-up counter

View File

@ -107,6 +107,9 @@ class OptimizationInfo
// are compiled.
uint32_t compilerWarmUpThreshold_;
// Default compiler warmup threshold, unless it is overridden.
static const uint32_t CompilerWarmupThreshold = 1000;
// How many invocations or loop iterations are needed before calls
// are inlined, as a fraction of compilerWarmUpThreshold.
double inliningWarmUpThresholdFactor_;
@ -173,9 +176,9 @@ class OptimizationInfo
}
IonRegisterAllocator registerAllocator() const {
if (!js_JitOptions.forceRegisterAllocator)
return registerAllocator_;
return js_JitOptions.forcedRegisterAllocator;
if (js_JitOptions.forcedRegisterAllocator.isSome())
return js_JitOptions.forcedRegisterAllocator.ref();
return registerAllocator_;
}
bool scalarReplacementEnabled() const {
@ -202,8 +205,8 @@ class OptimizationInfo
uint32_t inliningWarmUpThreshold() const {
uint32_t compilerWarmUpThreshold = compilerWarmUpThreshold_;
if (js_JitOptions.forceDefaultIonWarmUpThreshold)
compilerWarmUpThreshold = js_JitOptions.forcedDefaultIonWarmUpThreshold;
if (js_JitOptions.forcedDefaultIonWarmUpThreshold.isSome())
compilerWarmUpThreshold = js_JitOptions.forcedDefaultIonWarmUpThreshold.ref();
return compilerWarmUpThreshold * inliningWarmUpThresholdFactor_;
}

View File

@ -12,14 +12,31 @@
using namespace js;
using namespace js::jit;
using mozilla::Maybe;
namespace js {
namespace jit {
JitOptions js_JitOptions;
static void Warn(const char *env, const char *value)
{
fprintf(stderr, "Warning: I didn't understand %s=\"%s\"\n", env, value);
}
template<typename T> struct IsBool : mozilla::FalseType {};
template<> struct IsBool<bool> : mozilla::TrueType {};
static Maybe<int>
ParseInt(const char *str)
{
char *endp;
int retval = strtol(str, &endp, 0);
if (*endp == '\0')
return mozilla::Some(retval);
return mozilla::Nothing();
}
template<typename T>
T overrideDefault(const char *param, T dflt) {
char *str = getenv(param);
@ -34,14 +51,12 @@ T overrideDefault(const char *param, T dflt) {
strcmp(str, "no")) {
return false;
}
fprintf(stderr, "Warning: I didn't understand %s=\"%s\"", param, str);
Warn(param, str);
} else {
char *endp;
int retval = strtol(str, &endp, 0);
if (*endp == '\0')
return retval;
fprintf(stderr, "Warning: I didn't understand %s=\"%s\"", param, str);
Maybe<int> value = ParseInt(str);
if (value.isSome())
return value.ref();
Warn(param, str);
}
return dflt;
}
@ -96,13 +111,23 @@ JitOptions::JitOptions()
// Force how many invocation or loop iterations are needed before compiling
// a function with the highest ionmonkey optimization level.
// (i.e. OptimizationLevel_Normal)
SET_DEFAULT(forceDefaultIonWarmUpThreshold, false);
SET_DEFAULT(forcedDefaultIonWarmUpThreshold, 1000);
const char *forcedDefaultIonWarmUpThresholdEnv = "JIT_OPTION_forcedDefaultIonWarmUpThreshold";
if (const char *env = getenv(forcedDefaultIonWarmUpThresholdEnv)) {
Maybe<int> value = ParseInt(env);
if (value.isSome())
forcedDefaultIonWarmUpThreshold.emplace(value.ref());
else
Warn(forcedDefaultIonWarmUpThresholdEnv, env);
}
// Force the used register allocator instead of letting the
// optimization pass decide.
forceRegisterAllocator = false;
forcedRegisterAllocator = RegisterAllocator_LSRA;
// Force the used register allocator instead of letting the optimization
// pass decide.
const char *forcedRegisterAllocatorEnv = "JIT_OPTION_forcedRegisterAllocator";
if (const char *env = getenv(forcedRegisterAllocatorEnv)) {
forcedRegisterAllocator = LookupRegisterAllocator(env);
if (!forcedRegisterAllocator.isSome())
Warn(forcedRegisterAllocatorEnv, env);
}
// Toggles whether large scripts are rejected.
SET_DEFAULT(limitScriptSize, true);
@ -148,15 +173,15 @@ JitOptions::setEagerCompilation()
{
eagerCompilation = true;
baselineWarmUpThreshold = 0;
forceDefaultIonWarmUpThreshold = true;
forcedDefaultIonWarmUpThreshold = 0;
forcedDefaultIonWarmUpThreshold.reset();
forcedDefaultIonWarmUpThreshold.emplace(0);
}
void
JitOptions::setCompilerWarmUpThreshold(uint32_t warmUpThreshold)
{
forceDefaultIonWarmUpThreshold = true;
forcedDefaultIonWarmUpThreshold = warmUpThreshold;
forcedDefaultIonWarmUpThreshold.reset();
forcedDefaultIonWarmUpThreshold.emplace(warmUpThreshold);
// Undo eager compilation
if (eagerCompilation && warmUpThreshold != 0) {
@ -169,7 +194,7 @@ JitOptions::setCompilerWarmUpThreshold(uint32_t warmUpThreshold)
void
JitOptions::resetCompilerWarmUpThreshold()
{
forceDefaultIonWarmUpThreshold = false;
forcedDefaultIonWarmUpThreshold.reset();
// Undo eager compilation
if (eagerCompilation) {

View File

@ -25,6 +25,18 @@ enum IonRegisterAllocator {
RegisterAllocator_Stupid
};
static inline mozilla::Maybe<IonRegisterAllocator>
LookupRegisterAllocator(const char *name)
{
if (!strcmp(name, "lsra"))
return mozilla::Some(RegisterAllocator_LSRA);
if (!strcmp(name, "backtracking"))
return mozilla::Some(RegisterAllocator_Backtracking);
if (!strcmp(name, "stupid"))
return mozilla::Some(RegisterAllocator_Stupid);
return mozilla::Nothing();
}
struct JitOptions
{
bool checkGraphConsistency;
@ -42,10 +54,8 @@ struct JitOptions
bool disableLoopUnrolling;
bool disableEaa;
bool eagerCompilation;
bool forceDefaultIonWarmUpThreshold;
uint32_t forcedDefaultIonWarmUpThreshold;
bool forceRegisterAllocator;
IonRegisterAllocator forcedRegisterAllocator;
mozilla::Maybe<uint32_t> forcedDefaultIonWarmUpThreshold;
mozilla::Maybe<IonRegisterAllocator> forcedRegisterAllocator;
bool limitScriptSize;
bool osr;
uint32_t baselineWarmUpThreshold;

View File

@ -5738,7 +5738,9 @@ JS_GetGlobalJitCompilerOption(JSRuntime *rt, JSJitCompilerOption opt)
case JSJITCOMPILER_BASELINE_WARMUP_TRIGGER:
return jit::js_JitOptions.baselineWarmUpThreshold;
case JSJITCOMPILER_ION_WARMUP_TRIGGER:
return jit::js_JitOptions.forcedDefaultIonWarmUpThreshold;
return jit::js_JitOptions.forcedDefaultIonWarmUpThreshold.isSome()
? jit::js_JitOptions.forcedDefaultIonWarmUpThreshold.ref()
: jit::OptimizationInfo::CompilerWarmupThreshold;
case JSJITCOMPILER_ION_ENABLE:
return JS::RuntimeOptionsRef(rt).ion();
case JSJITCOMPILER_BASELINE_ENABLE:

View File

@ -3927,26 +3927,6 @@ ThisFilename(JSContext *cx, unsigned argc, Value *vp)
return true;
}
static bool
Wrap(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
Value v = args.get(0);
if (v.isPrimitive()) {
args.rval().set(v);
return true;
}
RootedObject obj(cx, v.toObjectOrNull());
JSObject *wrapped = Wrapper::New(cx, obj, &obj->global(),
&Wrapper::singleton);
if (!wrapped)
return false;
args.rval().setObject(*wrapped);
return true;
}
static bool
WrapWithProto(JSContext *cx, unsigned argc, jsval *vp)
{
@ -4564,14 +4544,6 @@ static const JSFunctionSpecWithHelp shell_functions[] = {
"thisFilename()",
" Return the filename of the current script"),
JS_FN_HELP("wrap", Wrap, 1, 0,
"wrap(obj)",
" Wrap an object into a noop wrapper."),
JS_FN_HELP("wrapWithProto", WrapWithProto, 2, 0,
"wrapWithProto(obj)",
" Wrap an object into a noop wrapper with prototype semantics."),
JS_FN_HELP("newGlobal", NewGlobal, 1, 0,
"newGlobal([options])",
" Return a new global object in a new compartment. If options\n"
@ -4698,6 +4670,12 @@ static const JSFunctionSpecWithHelp fuzzing_unsafe_functions[] = {
" might be asked for the source code of compilations that |fun|\n"
" performed, and which, presumably, only |hook| knows how to find.\n"),
JS_FN_HELP("wrapWithProto", WrapWithProto, 2, 0,
"wrapWithProto(obj)",
" Wrap an object into a noop wrapper with prototype semantics.\n"
" Note: This is not fuzzing safe because it can be used to construct\n"
" deeply nested wrapper chains that cannot exist in the wild."),
JS_FS_HELP_END
};
@ -5650,18 +5628,9 @@ SetRuntimeOptions(JSRuntime *rt, const OptionParser &op)
jit::js_JitOptions.baselineWarmUpThreshold = 0;
if (const char *str = op.getStringOption("ion-regalloc")) {
if (strcmp(str, "lsra") == 0) {
jit::js_JitOptions.forceRegisterAllocator = true;
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_LSRA;
} else if (strcmp(str, "backtracking") == 0) {
jit::js_JitOptions.forceRegisterAllocator = true;
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_Backtracking;
} else if (strcmp(str, "stupid") == 0) {
jit::js_JitOptions.forceRegisterAllocator = true;
jit::js_JitOptions.forcedRegisterAllocator = jit::RegisterAllocator_Stupid;
} else {
jit::js_JitOptions.forcedRegisterAllocator = jit::LookupRegisterAllocator(str);
if (!jit::js_JitOptions.forcedRegisterAllocator.isSome())
return OptionFailure("ion-regalloc", str);
}
}
if (op.getBoolOption("ion-eager"))

View File

@ -0,0 +1,30 @@
assertEq(Array.isArray([]), true);
var proxy = new Proxy([], {});
assertEq(Array.isArray(proxy), true);
for (var i = 0; i < 10; i++) {
proxy = new Proxy(proxy, {});
assertEq(Array.isArray(proxy), true);
}
var revocable = Proxy.revocable([], {});
proxy = revocable.proxy;
assertEq(Array.isArray(proxy), true);
for (var i = 0; i < 10; i++) {
proxy = new Proxy(proxy, {});
assertEq(Array.isArray(proxy), true);
}
revocable.revoke();
assertEq(Array.isArray(revocable.proxy), false);
assertEq(Array.isArray(proxy), false);
var global = newGlobal();
var array = global.Array();
assertEq(Array.isArray(array), true);
assertEq(Array.isArray(new Proxy(array, {})), true);
assertEq(Array.isArray(new global.Proxy(array, {})), true);
reportCompare(true, true);

View File

@ -183,14 +183,6 @@ function runNormalTests(global)
assertEq(setImmutablePrototype(indirectFunctionProxy), true);
assertEq(Object.getPrototypeOf(indirectFunctionProxy), global.Function.prototype);
checkPrototypeMutationFailure(indirectFunctionProxy, "indirectFunctionProxy");
// more-hated wrap()
var wrappedTarget = {};
var wrappedProxy = global.wrap(wrappedTarget);
assertEq(setImmutablePrototype(wrappedProxy), true);
checkPrototypeMutationFailure(wrappedProxy, "wrapped proxy");
}
var global = this;

View File

@ -32,6 +32,7 @@
#include "mozilla/gfx/Tools.h"
#include "mozilla/gfx/2D.h"
#include "gfxPrefs.h"
#include "LayersLogging.h"
#include <algorithm>
@ -1649,11 +1650,11 @@ ResetScrollPositionForLayerPixelAlignment(const nsIFrame* aAnimatedGeometryRoot)
}
static void
InvalidateEntirePaintedLayer(PaintedLayer* aLayer, const nsIFrame* aAnimatedGeometryRoot)
InvalidateEntirePaintedLayer(PaintedLayer* aLayer, const nsIFrame* aAnimatedGeometryRoot, const char *aReason)
{
#ifdef MOZ_DUMP_PAINTING
if (nsLayoutUtils::InvalidationDebuggingIsEnabled()) {
printf_stderr("Invalidating entire layer %p\n", aLayer);
printf_stderr("Invalidating entire layer %p: %s\n", aLayer, aReason);
}
#endif
nsIntRect invalidate = aLayer->GetValidRegion().GetBounds();
@ -1722,7 +1723,7 @@ ContainerState::CreateOrRecyclePaintedLayer(const nsIFrame* aAnimatedGeometryRoo
printf_stderr("Recycled layer %p changed scale\n", layer.get());
}
#endif
InvalidateEntirePaintedLayer(layer, aAnimatedGeometryRoot);
InvalidateEntirePaintedLayer(layer, aAnimatedGeometryRoot, "recycled layer changed state");
#ifndef MOZ_WIDGET_ANDROID
didResetScrollPositionForLayerPixelAlignment = true;
#endif
@ -1798,7 +1799,7 @@ ContainerState::CreateOrRecyclePaintedLayer(const nsIFrame* aAnimatedGeometryRoo
// from what we need.
if (!animatedGeometryRootTopLeft.WithinEpsilonOf(data->mAnimatedGeometryRootPosition, SUBPIXEL_OFFSET_EPSILON)) {
data->mAnimatedGeometryRootPosition = animatedGeometryRootTopLeft;
InvalidateEntirePaintedLayer(layer, aAnimatedGeometryRoot);
InvalidateEntirePaintedLayer(layer, aAnimatedGeometryRoot, "subpixel offset");
} else if (didResetScrollPositionForLayerPixelAlignment) {
data->mAnimatedGeometryRootPosition = animatedGeometryRootTopLeft;
}

View File

@ -2892,7 +2892,8 @@ nsLayoutUtils::GetOrMaybeCreateDisplayPort(nsDisplayListBuilder& aBuilder,
// displayport.
// Note: we only do this in processes where we do subframe scrolling to
// begin with (i.e., not in the parent process on B2G).
if (aBuilder.IsPaintingToWindow() && WantSubAPZC() &&
if (aBuilder.IsPaintingToWindow() &&
gfxPrefs::AsyncPanZoomEnabled() &&
!aBuilder.HaveScrollableDisplayPort() &&
scrollableFrame->WantAsyncScroll()) {
@ -3227,6 +3228,14 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
#endif
}
#ifdef MOZ_DUMP_PAINTING
if (gfxPrefs::DumpClientLayers()) {
std::stringstream ss;
FrameLayerBuilder::DumpRetainedLayerTree(layerManager, ss, false);
printf_stderr("%s", ss.str().c_str());
}
#endif
// Update the widget's opaque region information. This sets
// glass boundaries on Windows. Also set up the window dragging region
// and plugin clip regions and bounds.
@ -7644,13 +7653,6 @@ nsLayoutUtils::CalculateExpandedScrollableRect(nsIFrame* aFrame)
return scrollableRect;
}
/* static */ bool
nsLayoutUtils::WantSubAPZC()
{
return gfxPrefs::AsyncPanZoomEnabled() &&
gfxPrefs::APZSubframeEnabled();
}
/* static */ bool
nsLayoutUtils::UsesAsyncScrolling()
{

View File

@ -2471,12 +2471,6 @@ public:
static nsRect
CalculateExpandedScrollableRect(nsIFrame* aFrame);
/**
* Return whether we want to use APZ for subframes in this process.
* Currently we don't support APZ for the parent process on B2G.
*/
static bool WantSubAPZC();
/**
* Returns true if we're using asynchronous scrolling (either through
* APZ or the android frontend).

View File

@ -0,0 +1,38 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<meta charset="utf-8">
<title>Testcase for bug 1123067</title>
<script>
function click(id) {
var e = document.querySelector(id);
synthesizeMouse(e, 1, 1, {type: "mousedown"}, window);
synthesizeMouse(e, 1, 1, {type: "mouseup"}, window);
}
function test() {
for (var i = 0; i < 5; ++i) {
synthesizeKey("VK_RIGHT", {});
}
synthesizeKey("VK_LEFT", {});
document.documentElement.removeAttribute("class");
}
function runTests() {
click('#test1')
}
</script>
<style>
div { -moz-user-select:none; }
div:focus { outline:1px solid black; }
</style>
</head>
<body>
<div id="test1" contenteditable="true" spellcheck="false" onfocus="test()">This text is NOT selectable.</div>
<script>
SimpleTest.waitForFocus(runTests);
</script>
</body>
</html>

View File

@ -0,0 +1,34 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<meta charset="utf-8">
<title>Testcase #2 for bug 1123067</title>
<script>
function test() {
for (var i = 0; i < 5; ++i) {
synthesizeKey("VK_RIGHT", {});
}
synthesizeKey("VK_LEFT", {});
document.documentElement.removeAttribute("class");
}
function runTests() {
var e = document.querySelector('#test1');
e.focus();
}
</script>
<style>
div { -moz-user-select:none; }
div:focus { outline:1px solid black; }
</style>
</head>
<body>
<div id="test1" contenteditable="true" spellcheck="false" onfocus="setTimeout(test,0)">This text is NOT selectable.</div>
<script>
SimpleTest.waitForFocus(runTests);
</script>
</body>
</html>

View File

@ -0,0 +1,35 @@
<!DOCTYPE HTML>
<html class="reftest-wait" style="-moz-user-select:none" spellcheck="false">
<head>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<meta charset="utf-8">
<title>Testcase #2 for bug 1123067</title>
<script>
function test() {
for (var i = 0; i < 5; ++i) {
synthesizeKey("VK_RIGHT", {});
}
synthesizeKey("VK_LEFT", {});
document.documentElement.removeAttribute("class");
}
function runTests() {
document.designMode='on';
document.querySelector('div').focus();
document.body.offsetHeight;
setTimeout(test,0)
}
</script>
<style>
div { outline:1px solid black; }
</style>
</head>
<body>
<div>This text is NOT selectable.</div>
<script>
SimpleTest.waitForFocus(runTests);
</script>
</body>
</html>

View File

@ -0,0 +1,33 @@
<!DOCTYPE HTML>
<html class="reftest-wait">
<head>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<meta charset="utf-8">
<title>Testcase for bug 1123067</title>
<script>
function test() {
for (var i = 0; i < 5; ++i) {
synthesizeKey("VK_RIGHT", {});
}
synthesizeKey("VK_LEFT", {});
document.documentElement.removeAttribute("class");
}
function runTests() {
var e = document.querySelector('#test1');
e.focus();
}
</script>
<style>
div:focus { outline:1px solid black; }
</style>
</head>
<body>
<div id="test1" contenteditable="true" spellcheck="false" onfocus="test()">This text is NOT selectable.</div>
<script>
SimpleTest.waitForFocus(runTests);
</script>
</body>
</html>

View File

@ -65,6 +65,10 @@ support-files =
bug1109968-1.html
bug1109968-2-ref.html
bug1109968-2.html
bug1123067-1.html
bug1123067-2.html
bug1123067-3.html
bug1123067-ref.html
[test_preserve3d_sorting_hit_testing.html]
[test_after_paint_pref.html]

View File

@ -152,6 +152,9 @@ var tests = [
[ 'bug1061468.html' , 'bug1061468-ref.html' ] ,
[ 'bug1109968-1.html', 'bug1109968-1-ref.html'] ,
[ 'bug1109968-2.html', 'bug1109968-2-ref.html'] ,
// [ 'bug1123067-1.html' , 'bug1123067-ref.html' ] , TODO: bug 1129205
[ 'bug1123067-2.html' , 'bug1123067-ref.html' ] ,
[ 'bug1123067-3.html' , 'bug1123067-ref.html' ] ,
function() {SpecialPowers.clearUserPref("touchcaret.enabled");} ,
];

View File

@ -470,8 +470,8 @@ load 700031.xhtml
load 718516.html
load 723108.html
load 724235.html
load 724978.xhtml
load 730559.html
skip-if(OSX=1010&&isDebugBuild) load 724978.xhtml
skip-if(OSX=1010&&isDebugBuild) load 730559.html
load first-letter-638937.html
load first-letter-638937-2.html
load 734777.html

View File

@ -3007,7 +3007,7 @@ ScrollFrameHelper::BuildDisplayList(nsDisplayListBuilder* aBuilder,
shouldBuildLayer = true;
} else {
shouldBuildLayer =
nsLayoutUtils::WantSubAPZC() &&
gfxPrefs::AsyncPanZoomEnabled() &&
WantAsyncScroll() &&
// If we are using containers for root frames, and we are the root
// scroll frame for the display root, then we don't need a scroll

View File

@ -3518,6 +3518,16 @@ Selection::AddItem(nsRange* aItem, int32_t* aOutIndex)
if (mApplyUserSelectStyle) {
nsAutoTArray<nsRefPtr<nsRange>, 4> rangesToAdd;
aItem->ExcludeNonSelectableNodes(&rangesToAdd);
if (rangesToAdd.IsEmpty()) {
ErrorResult err;
nsINode* node = aItem->GetStartContainer(err);
if (node && node->IsContent() && node->AsContent()->GetEditingHost()) {
// A contenteditable node with user-select:none, for example.
// Allow it to have a collapsed selection (for the caret).
aItem->Collapse(GetDirection() == eDirPrevious);
rangesToAdd.AppendElement(aItem);
}
}
for (size_t i = 0; i < rangesToAdd.Length(); ++i) {
nsresult rv = AddItemInternal(rangesToAdd[i], aOutIndex);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -1,32 +1,21 @@
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-1.html bg-fixed-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-1.html bg-fixed-cover-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-2.html bg-fixed-cover-2-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-3.html bg-fixed-cover-3-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == element-1.html element-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) pref(layers.force-active,true) skip-if(!asyncPanZoom) == iframe-1.html iframe-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == nested-1.html nested-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-1.html position-fixed-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-2.html position-fixed-2-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-1.html position-fixed-cover-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-2.html position-fixed-cover-2-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-3.html position-fixed-cover-3-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == split-layers-1.html split-layers-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == split-layers-multi-scrolling-1.html split-layers-multi-scrolling-1-ref.html
fails pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == split-opacity-layers-1.html split-opacity-layers-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == sticky-pos-scrollable-1.html sticky-pos-scrollable-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == fixed-pos-scrollable-1.html fixed-pos-scrollable-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(apz.subframe.enabled,true) skip-if(!asyncPanZoom) == culling-1.html culling-1-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-1.html bg-fixed-1-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-cover-1.html bg-fixed-cover-1-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-cover-2.html bg-fixed-cover-2-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == bg-fixed-cover-3.html bg-fixed-cover-3-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == element-1.html element-1-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-1.html position-fixed-1-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-2.html position-fixed-2-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-1.html position-fixed-cover-1-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-2.html position-fixed-cover-2-ref.html
pref(layout.async-containerless-scrolling.enabled,false) skip-if(!asyncPanZoom) == position-fixed-cover-3.html position-fixed-cover-3-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-1.html bg-fixed-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-1.html bg-fixed-cover-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-2.html bg-fixed-cover-2-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == bg-fixed-cover-3.html bg-fixed-cover-3-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == element-1.html element-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) pref(layers.force-active,true) skip-if(!asyncPanZoom) == iframe-1.html iframe-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == nested-1.html nested-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == position-fixed-1.html position-fixed-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == position-fixed-2.html position-fixed-2-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-1.html position-fixed-cover-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-2.html position-fixed-cover-2-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == position-fixed-cover-3.html position-fixed-cover-3-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == split-layers-1.html split-layers-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == split-layers-multi-scrolling-1.html split-layers-multi-scrolling-1-ref.html
fails pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == split-opacity-layers-1.html split-opacity-layers-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == sticky-pos-scrollable-1.html sticky-pos-scrollable-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == fixed-pos-scrollable-1.html fixed-pos-scrollable-1-ref.html
pref(layout.async-containerless-scrolling.enabled,true) skip-if(!asyncPanZoom) == culling-1.html culling-1-ref.html
# for the following tests, we want to disable the low-precision buffer
# as it will expand the displayport beyond what the test specifies in

View File

@ -100,16 +100,16 @@ pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-clon
# other
pref(layout.css.box-decoration-break.enabled,true) != background-size-cover-slice.html background-size-cover-clone.html
== background-size-monster-ch.html background-size-monster-ref.html
== background-size-monster-cm.html background-size-monster-ref.html
== background-size-monster-em.html background-size-monster-ref.html
== background-size-monster-ex.html background-size-monster-ref.html
== background-size-monster-inches.html background-size-monster-ref.html
== background-size-monster-mm.html background-size-monster-ref.html
== background-size-monster-pc.html background-size-monster-ref.html
== background-size-monster-pt.html background-size-monster-ref.html
== background-size-monster-px.html background-size-monster-ref.html
== background-size-monster-rem.html background-size-monster-ref.html
random-if(OSX==1010) == background-size-monster-ch.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-cm.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-em.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-ex.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-inches.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-mm.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-pc.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-pt.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-px.html background-size-monster-ref.html # bug 1129300
random-if(OSX==1010) == background-size-monster-rem.html background-size-monster-ref.html # bug 1129300
# There seems to be a pixel-snapping problem here, where the repeated background
# image isn't being snapped at its boundaries. Note that the boundaries within

View File

@ -115,7 +115,7 @@ fuzzy-if(d2d,127,2612) == repeating-radial-1e.html repeating-radial-1-ref.html
# from http://www.xanthir.com/:4bhipd by way of http://a-ja.net/newgrad.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) fuzzy-if(azureQuartz&&OSX==1006,1,4646) == aja-linear-1a.html aja-linear-1-ref.html
fails-if(!d2d) == aja-linear-1b.html aja-linear-1-ref.html # bug 526694
fails-if(!d2d&&!(OSX==1010&&isDebugBuild)) == aja-linear-1b.html aja-linear-1-ref.html # bug 526694, passing on 10.10 debug is bug 1128517
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) fuzzy-if(azureQuartz&&OSX==1006,1,4646) == aja-linear-1c.html aja-linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) fuzzy-if(azureQuartz&&OSX==1006,1,4646) == aja-linear-1d.html aja-linear-1-ref.html
fuzzy-if(!contentSameGfxBackendAsCanvas,1,20000) fuzzy-if(azureSkiaGL,8,20000) fuzzy-if(azureQuartz&&OSX==1006,1,4646) == aja-linear-1e.html aja-linear-1-ref.html

View File

@ -144,6 +144,9 @@ pref("dom.enable_performance", true);
// Whether resource timing will be gathered and returned by performance.GetEntries*
pref("dom.enable_resource_timing", true);
// Enable high-resolution timing markers for users
pref("dom.enable_user_timing", true);
// Whether the Gamepad API is enabled
pref("dom.gamepad.enabled", true);
#ifdef RELEASE_BUILD
@ -549,15 +552,12 @@ pref("apz.y_stationary_size_multiplier", "3.5");
pref("apz.zoom_animation_duration_ms", 250);
#ifdef XP_MACOSX
// Layerize scrollable subframes to allow async panning
pref("apz.subframe.enabled", true);
pref("apz.fling_repaint_interval", 16);
pref("apz.smooth_scroll_repaint_interval", 16);
pref("apz.pan_repaint_interval", 16);
pref("apz.x_skate_size_multiplier", "2.5");
pref("apz.y_skate_size_multiplier", "3.5");
#else
pref("apz.subframe.enabled", false);
pref("apz.fling_repaint_interval", 75);
pref("apz.smooth_scroll_repaint_interval", 75);
pref("apz.pan_repaint_interval", 250);
@ -3923,6 +3923,8 @@ pref("layers.dump", false);
// If we're dumping layers, also dump the texture data
pref("layers.dump-texture", false);
pref("layers.dump-decision", false);
pref("layers.dump-client-layers", false);
pref("layers.dump-host-layers", false);
#endif
pref("layers.draw-borders", false);
pref("layers.draw-tile-borders", false);

View File

@ -1,62 +0,0 @@
[idlharness.html]
type: testharness
[Performance interface: operation mark(DOMString)]
expected: FAIL
[Performance interface: operation clearMarks(DOMString)]
expected: FAIL
[Performance interface: operation measure(DOMString,DOMString,DOMString)]
expected: FAIL
[Performance interface: operation clearMeasures(DOMString)]
expected: FAIL
[Performance interface: window.performance must inherit property "mark" with the proper type (0)]
expected: FAIL
[Performance interface: calling mark(DOMString) on window.performance with too few arguments must throw TypeError]
expected: FAIL
[Performance interface: window.performance must inherit property "clearMarks" with the proper type (1)]
expected: FAIL
[Performance interface: calling clearMarks(DOMString) on window.performance with too few arguments must throw TypeError]
expected: FAIL
[Performance interface: window.performance must inherit property "measure" with the proper type (2)]
expected: FAIL
[Performance interface: calling measure(DOMString,DOMString,DOMString) on window.performance with too few arguments must throw TypeError]
expected: FAIL
[Performance interface: window.performance must inherit property "clearMeasures" with the proper type (3)]
expected: FAIL
[Performance interface: calling clearMeasures(DOMString) on window.performance with too few arguments must throw TypeError]
expected: FAIL
[PerformanceMark interface: existence and properties of interface object]
expected: FAIL
[PerformanceMark interface object length]
expected: FAIL
[PerformanceMark interface: existence and properties of interface prototype object]
expected: FAIL
[PerformanceMark interface: existence and properties of interface prototype object\'s "constructor" property]
expected: FAIL
[PerformanceMeasure interface: existence and properties of interface object]
expected: FAIL
[PerformanceMeasure interface object length]
expected: FAIL
[PerformanceMeasure interface: existence and properties of interface prototype object]
expected: FAIL
[PerformanceMeasure interface: existence and properties of interface prototype object\'s "constructor" property]
expected: FAIL

View File

@ -1,5 +0,0 @@
[test_user_timing_clear_marks.html]
type: testharness
[The User Timing and Performance Timeline interfaces, which are required for this test, are defined.]
expected: FAIL

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