Merge mozilla-central to fx-team

This commit is contained in:
Carsten "Tomcat" Book 2015-04-28 14:00:20 +02:00
commit d115286f2b
265 changed files with 2951 additions and 1026 deletions

27
.ycm_extra_conf.py Normal file
View File

@ -0,0 +1,27 @@
# 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/.
import imp
import os
from StringIO import StringIO
import shlex
path = os.path.join(os.path.dirname(__file__), 'mach')
if not os.path.exists(path):
path = os.path.join(os.path.dirname(__file__), 'config.status')
config = imp.load_module('_buildconfig', open(path), path, ('', 'r', imp.PY_SOURCE))
path = os.path.join(config.topsrcdir, 'mach')
mach_module = imp.load_module('_mach', open(path), path, ('', 'r', imp.PY_SOURCE))
def FlagsForFile(filename):
mach = mach_module.get_mach()
out = StringIO()
out.encoding = None
mach.run(['compileflags', filename], stdout=out, stderr=out)
return {
'flags': shlex.split(out.getvalue()),
'do_cache': True
}

View File

@ -22,7 +22,4 @@
# changes to stick? As of bug 928195, this shouldn't be necessary! Please
# don't change CLOBBER for WebIDL changes any more.
Bug 1038068: Check add-on signatures and refuse to install unsigned or broken add-ons
Not sure why this needs a clobber but tests perma-failed when they don't on
try (2).
Bug 1154356: escape variable name in Declaration::AppendVariableAndValueToString;

View File

@ -123,10 +123,6 @@ static const GInterfaceInfo atk_if_infos[] = {
(GInterfaceFinalizeFunc) nullptr, nullptr}
};
// This is or'd with the pointer in MaiAtkObject::accWrap if the wrap-ee is a
// proxy.
static const uintptr_t IS_PROXY = 1;
static GQuark quark_mai_hyperlink = 0;
AtkHyperlink*
@ -136,7 +132,7 @@ MaiAtkObject::GetAtkHyperlink()
MaiHyperlink* maiHyperlink =
(MaiHyperlink*)g_object_get_qdata(G_OBJECT(this), quark_mai_hyperlink);
if (!maiHyperlink) {
maiHyperlink = new MaiHyperlink(reinterpret_cast<Accessible*>(accWrap));
maiHyperlink = new MaiHyperlink(accWrap);
g_object_set_qdata(G_OBJECT(this), quark_mai_hyperlink, maiHyperlink);
}

View File

@ -51,6 +51,10 @@ IsAtkVersionAtLeast(int aMajor, int aMinor)
(aMajor == atkMajorVersion && aMinor <= atkMinorVersion);
}
// This is or'd with the pointer in MaiAtkObject::accWrap if the wrap-ee is a
// proxy.
static const uintptr_t IS_PROXY = 1;
/**
* This MaiAtkObject is a thin wrapper, in the MAI namespace, for AtkObject
*/

View File

@ -6,6 +6,7 @@
#include "nsIURI.h"
#include "nsMaiHyperlink.h"
#include "mozilla/a11y/ProxyAccessible.h"
using namespace mozilla::a11y;
@ -61,8 +62,17 @@ static gint getAnchorCountCB(AtkHyperlink *aLink);
G_END_DECLS
static gpointer parent_class = nullptr;
static Accessible*
get_accessible_hyperlink(AtkHyperlink *aHyperlink);
static MaiHyperlink*
GetMaiHyperlink(AtkHyperlink *aHyperlink)
{
NS_ENSURE_TRUE(MAI_IS_ATK_HYPERLINK(aHyperlink), nullptr);
MaiHyperlink * maiHyperlink =
MAI_ATK_HYPERLINK(aHyperlink)->maiHyperlink;
NS_ENSURE_TRUE(maiHyperlink != nullptr, nullptr);
NS_ENSURE_TRUE(maiHyperlink->GetAtkHyperlink() == aHyperlink, nullptr);
return maiHyperlink;
}
GType
mai_atk_hyperlink_get_type(void)
@ -90,13 +100,10 @@ mai_atk_hyperlink_get_type(void)
return type;
}
MaiHyperlink::MaiHyperlink(Accessible* aHyperLink) :
MaiHyperlink::MaiHyperlink(uintptr_t aHyperLink) :
mHyperlink(aHyperLink),
mMaiAtkHyperlink(nullptr)
{
if (!mHyperlink->IsLink())
return;
mMaiAtkHyperlink =
reinterpret_cast<AtkHyperlink *>
(g_object_new(mai_atk_hyperlink_get_type(), nullptr));
@ -153,79 +160,102 @@ finalizeCB(GObject *aObj)
gchar *
getUriCB(AtkHyperlink *aLink, gint aLinkIndex)
{
Accessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, nullptr);
MaiHyperlink* maiLink = GetMaiHyperlink(aLink);
if (!maiLink)
return nullptr;
nsAutoCString cautoStr;
if (Accessible* hyperlink = maiLink->GetAccHyperlink()) {
nsCOMPtr<nsIURI> uri = hyperlink->AnchorURIAt(aLinkIndex);
if (!uri)
return nullptr;
return nullptr;
nsAutoCString cautoStr;
nsresult rv = uri->GetSpec(cautoStr);
NS_ENSURE_SUCCESS(rv, nullptr);
return g_strdup(cautoStr.get());
}
bool valid;
maiLink->Proxy()->AnchorURIAt(aLinkIndex, cautoStr, &valid);
if (!valid)
return nullptr;
return g_strdup(cautoStr.get());
}
AtkObject *
getObjectCB(AtkHyperlink *aLink, gint aLinkIndex)
{
Accessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, nullptr);
MaiHyperlink* maiLink = GetMaiHyperlink(aLink);
if (!maiLink)
return nullptr;
Accessible* anchor = hyperlink->AnchorAt(aLinkIndex);
NS_ENSURE_TRUE(anchor, nullptr);
if (Accessible* hyperlink = maiLink->GetAccHyperlink()) {
Accessible* anchor = hyperlink->AnchorAt(aLinkIndex);
NS_ENSURE_TRUE(anchor, nullptr);
AtkObject* atkObj = AccessibleWrap::GetAtkObject(anchor);
//no need to add ref it, because it is "get" not "ref"
return atkObj;
return AccessibleWrap::GetAtkObject(anchor);
}
ProxyAccessible* anchor = maiLink->Proxy()->AnchorAt(aLinkIndex);
return anchor ? GetWrapperFor(anchor) : nullptr;
}
gint
getEndIndexCB(AtkHyperlink *aLink)
{
Accessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, -1);
MaiHyperlink* maiLink = GetMaiHyperlink(aLink);
if (!maiLink)
return false;
if (Accessible* hyperlink = maiLink->GetAccHyperlink())
return static_cast<gint>(hyperlink->EndOffset());
bool valid = false;
uint32_t endIdx = maiLink->Proxy()->EndOffset(&valid);
return valid ? static_cast<gint>(endIdx) : -1;
}
gint
getStartIndexCB(AtkHyperlink *aLink)
{
Accessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, -1);
MaiHyperlink* maiLink = GetMaiHyperlink(aLink);
if (maiLink)
return -1;
if (Accessible* hyperlink = maiLink->GetAccHyperlink())
return static_cast<gint>(hyperlink->StartOffset());
bool valid = false;
uint32_t startIdx = maiLink->Proxy()->StartOffset(&valid);
return valid ? static_cast<gint>(startIdx) : -1;
}
gboolean
isValidCB(AtkHyperlink *aLink)
{
Accessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, FALSE);
MaiHyperlink* maiLink = GetMaiHyperlink(aLink);
if (!maiLink)
return false;
if (Accessible* hyperlink = maiLink->GetAccHyperlink())
return static_cast<gboolean>(hyperlink->IsLinkValid());
return static_cast<gboolean>(maiLink->Proxy()->IsLinkValid());
}
gint
getAnchorCountCB(AtkHyperlink *aLink)
{
Accessible* hyperlink = get_accessible_hyperlink(aLink);
NS_ENSURE_TRUE(hyperlink, -1);
MaiHyperlink* maiLink = GetMaiHyperlink(aLink);
if (!maiLink)
return -1;
if (Accessible* hyperlink = maiLink->GetAccHyperlink())
return static_cast<gint>(hyperlink->AnchorCount());
}
// Check if aHyperlink is a valid MaiHyperlink, and return the
// HyperLinkAccessible related.
Accessible*
get_accessible_hyperlink(AtkHyperlink *aHyperlink)
{
NS_ENSURE_TRUE(MAI_IS_ATK_HYPERLINK(aHyperlink), nullptr);
MaiHyperlink * maiHyperlink =
MAI_ATK_HYPERLINK(aHyperlink)->maiHyperlink;
NS_ENSURE_TRUE(maiHyperlink != nullptr, nullptr);
NS_ENSURE_TRUE(maiHyperlink->GetAtkHyperlink() == aHyperlink, nullptr);
return maiHyperlink->GetAccHyperlink();
bool valid = false;
uint32_t anchorCount = maiLink->Proxy()->AnchorCount(&valid);
return valid ? static_cast<gint>(anchorCount) : -1;
}

View File

@ -23,16 +23,31 @@ namespace a11y {
class MaiHyperlink
{
public:
explicit MaiHyperlink(Accessible* aHyperLink);
explicit MaiHyperlink(uintptr_t aHyperLink);
~MaiHyperlink();
public:
AtkHyperlink* GetAtkHyperlink() const { return mMaiAtkHyperlink; }
Accessible* GetAccHyperlink()
{ return mHyperlink && mHyperlink->IsLink() ? mHyperlink : nullptr; }
{
if (!mHyperlink || mHyperlink & IS_PROXY)
return nullptr;
Accessible* link = reinterpret_cast<Accessible*>(mHyperlink);
NS_ASSERTION(link->IsLink(), "Why isn't it a link!");
return link;
}
ProxyAccessible* Proxy() const
{
if (!(mHyperlink & IS_PROXY))
return nullptr;
return reinterpret_cast<ProxyAccessible*>(mHyperlink & ~IS_PROXY);
}
protected:
Accessible* mHyperlink;
uintptr_t mHyperlink;
AtkHyperlink* mMaiAtkHyperlink;
};

View File

@ -16,10 +16,11 @@ static AtkHyperlink*
getHyperlinkCB(AtkHyperlinkImpl* aImpl)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aImpl));
if (!accWrap)
if (!accWrap || !GetProxy(ATK_OBJECT(aImpl)))
return nullptr;
NS_ENSURE_TRUE(accWrap->IsLink(), nullptr);
if (accWrap)
NS_ASSERTION(accWrap->IsLink(), "why isn't it a link!");
return MAI_ATK_OBJECT(aImpl)->GetAtkHyperlink();
}

View File

@ -22,31 +22,27 @@ static AtkHyperlink*
getLinkCB(AtkHypertext *aText, gint aLinkIndex)
{
AccessibleWrap* accWrap = GetAccessibleWrap(ATK_OBJECT(aText));
AtkObject* atkHyperLink = nullptr;
if (accWrap) {
HyperTextAccessible* hyperText = accWrap->AsHyperText();
NS_ENSURE_TRUE(hyperText, nullptr);
Accessible* hyperLink = hyperText->LinkAt(aLinkIndex);
if (!hyperLink) {
if (!hyperLink || !hyperLink->IsLink()) {
return nullptr;
}
AtkObject* hyperLinkAtkObj = AccessibleWrap::GetAtkObject(hyperLink);
NS_ENSURE_TRUE(IS_MAI_OBJECT(hyperLinkAtkObj), nullptr);
return MAI_ATK_OBJECT(hyperLinkAtkObj)->GetAtkHyperlink();
}
if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
atkHyperLink = AccessibleWrap::GetAtkObject(hyperLink);
} else if (ProxyAccessible* proxy = GetProxy(ATK_OBJECT(aText))) {
ProxyAccessible* proxyLink = proxy->LinkAt(aLinkIndex);
if (proxyLink) {
NS_WARNING("IMPLEMENT ME! See bug 1146518.");
// We should somehow get from ProxyAccessible* to AtkHyperlink*.
}
return nullptr;
if (!proxyLink)
return nullptr;
atkHyperLink = GetWrapperFor(proxyLink);
}
return nullptr;
NS_ENSURE_TRUE(IS_MAI_OBJECT(atkHyperLink), nullptr);
return MAI_ATK_OBJECT(atkHyperLink)->GetAtkHyperlink();
}
static gint

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>
@ -134,7 +134,7 @@
<project name="platform/hardware/akm" path="hardware/akm" revision="6d3be412647b0eab0adff8a2768736cf4eb68039"/>
<project groups="invensense" name="platform/hardware/invensense" path="hardware/invensense" revision="e6d9ab28b4f4e7684f6c07874ee819c9ea0002a2"/>
<project name="platform/hardware/ril" path="hardware/ril" revision="865ce3b4a2ba0b3a31421ca671f4d6c5595f8690"/>
<project name="kernel/common" path="kernel" revision="65d2a18bd4ab0f1ed36a76c1e3c4f9ae98f345b9"/>
<project name="kernel/common" path="kernel" revision="0be9cc12cd81b145e1471016c19722429ff9285e"/>
<project name="platform/system/core" path="system/core" revision="7992618bd4ee33ce96897675a5c0a9b619122f13"/>
<project name="u-boot" path="u-boot" revision="f1502910977ac88f43da7bf9277c3523ad4b0b2f"/>
<project name="vendor/sprd/gps" path="vendor/sprd/gps" revision="7d6e1269be7186b2073fa568958b357826692c4b"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/>

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="bdd03caf084e1b9279155bd232bc718a38c47cbc"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -19,7 +19,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="9a9797062c6001d6346504161c51187a2968466b"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="ef937d1aca7c4cf89ecb5cc43ae8c21c2000a9db">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -17,7 +17,7 @@
</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="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="bdd03caf084e1b9279155bd232bc718a38c47cbc"/>

View File

@ -1,9 +1,9 @@
{
"git": {
"git_revision": "0636405f0844bf32451a375b2d61a2b16fe33348",
"git_revision": "e5c1905b0144a855537fd857d62ec7a3393bb334",
"remote": "https://git.mozilla.org/releases/gaia.git",
"branch": ""
},
"revision": "d4ec6c8c9cfc10a495e5c6cfddeb71871be73106",
"revision": "97f0671809608b83775857fce9a7f7eba056d5d3",
"repo_path": "integration/gaia-central"
}

View File

@ -17,7 +17,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="5ef30994f4778b4052e58a4383dbe7890048c87e"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="adb24954bf8068f21705b570450475d183336b2d"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="bdd03caf084e1b9279155bd232bc718a38c47cbc"/>

View File

@ -15,7 +15,7 @@
<project name="platform_build" path="build" remote="b2g" revision="61e82f99bb8bc78d52b5717e9a2481ec7267fa33">
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="gaia" path="gaia" remote="mozillaorg" revision="0636405f0844bf32451a375b2d61a2b16fe33348"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="e5c1905b0144a855537fd857d62ec7a3393bb334"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="d3868ff4bb3a4b81382795e2784258c210fe6cb8"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="1b3591a50ed352fc6ddb77462b7b35d0bfa555a3"/>

View File

@ -42,6 +42,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "Log",
"resource://gre/modules/Log.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
"resource://gre/modules/AppConstants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "UpdateChannel",
"resource://gre/modules/UpdateChannel.jsm");
XPCOMUtils.defineLazyServiceGetter(this, "Favicons",
"@mozilla.org/browser/favicon-service;1",
"mozIAsyncFavicons");
@ -2758,7 +2760,7 @@ let BrowserOnClick = {
version: 1,
build: gAppInfo.appBuildID,
product: gAppInfo.name,
channel: Services.prefs.getCharPref("app.update.channel")
channel: UpdateChannel.get()
}
let reportURL = Services.prefs.getCharPref("security.ssl.errorReporting.url");

View File

@ -53,6 +53,13 @@ LLDBINIT_FINAL_TARGET_FILES := $(DEPTH)/.lldbinit
LLDBINIT_FINAL_TARGET_DEST = $(FINAL_TARGET)
INSTALL_TARGETS += LLDBINIT_FINAL_TARGET
# Put the .ycm_extra_conf.py file at the root of the objdir. It is used by
# the vim plugin YouCompleteMe.
YCM_FILES := $(topsrcdir)/.ycm_extra_conf.py
YCM_DEST := $(abspath $(DEPTH))
YCM_TARGET := export
INSTALL_TARGETS += YCM
ifdef MOZTTDIR
# Install the Firefox OS fonts.
include $(MOZTTDIR)/fonts.mk

View File

@ -83,6 +83,7 @@ MACH_MODULES = [
'python/mozboot/mozboot/mach_commands.py',
'python/mozbuild/mozbuild/mach_commands.py',
'python/mozbuild/mozbuild/backend/mach_commands.py',
'python/mozbuild/mozbuild/compilation/codecomplete.py',
'python/mozbuild/mozbuild/frontend/mach_commands.py',
'services/common/tests/mach_commands.py',
'testing/luciddream/mach_commands.py',

View File

@ -30,8 +30,6 @@ UNIFIED_SOURCES += [
'nsSystemPrincipal.cpp',
]
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/dom/base',
'/js/xpconnect/src',

View File

@ -24,8 +24,6 @@ UNIFIED_SOURCES += [
'nsChromeRegistryContent.cpp',
]
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -65,8 +65,6 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -17,8 +17,6 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/docshell/base',
]

View File

@ -18,8 +18,6 @@ IPDL_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -402,8 +402,6 @@ EXTRA_JS_MODULES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'../battery',
'../bluetooth',

View File

@ -25,6 +25,9 @@
#include "mozilla/layers/ShadowLayers.h"
#include "ClientLayerManager.h"
#include "nsQueryObject.h"
#ifdef MOZ_FMP4
#include "MP4Reader.h"
#endif
#include "nsIScrollableFrame.h"
@ -2236,6 +2239,27 @@ nsDOMWindowUtils::GetLayerManagerRemote(bool* retval)
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::GetSupportsHardwareH264Decoding(bool* retval)
{
MOZ_RELEASE_ASSERT(nsContentUtils::IsCallerChrome());
#ifdef MOZ_FMP4
nsCOMPtr<nsIWidget> widget = GetWidget();
if (!widget)
return NS_ERROR_FAILURE;
LayerManager *mgr = widget->GetLayerManager();
if (!mgr)
return NS_ERROR_FAILURE;
*retval = MP4Reader::IsVideoAccelerated(mgr->GetCompositorBackendType());
#else
*retval = false;
#endif
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::StartFrameTimeRecording(uint32_t *startIndex)
{

View File

@ -2472,7 +2472,8 @@ nsFrameLoader::DoSendAsyncMessage(JSContext* aCx,
return false;
}
InfallibleTArray<mozilla::jsipc::CpowEntry> cpows;
if (aCpows && !cp->GetCPOWManager()->Wrap(aCx, aCpows, &cpows)) {
jsipc::CPOWManager* mgr = cp->GetCPOWManager();
if (aCpows && (!mgr || !mgr->Wrap(aCx, aCpows, &cpows))) {
return false;
}
return tabParent->SendAsyncMessage(nsString(aMessage), data, cpows,

View File

@ -1439,6 +1439,8 @@ nsGlobalWindow::CleanUp()
return;
mCleanedUp = true;
StartDying();
mEventTargetObjects.EnumerateEntries(DisconnectEventTargetObjects, nullptr);
mEventTargetObjects.Clear();
@ -2620,6 +2622,12 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
NS_ERROR("can't create the 'window' property");
return NS_ERROR_FAILURE;
}
// And same thing for the "self" property.
if (!JS_GetProperty(cx, newInnerGlobal, "self", &unused)) {
NS_ERROR("can't create the 'self' property");
return NS_ERROR_FAILURE;
}
}
}
@ -3533,11 +3541,9 @@ nsGlobalWindow::GetWindow(nsIDOMWindow** aWindow)
return NS_OK;
}
nsIDOMWindow*
nsGlobalWindow::GetSelf(ErrorResult& aError)
nsGlobalWindow*
nsGlobalWindow::Self()
{
FORWARD_TO_OUTER_OR_THROW(GetSelf, (aError), aError, nullptr);
return this;
}
@ -3545,10 +3551,12 @@ NS_IMETHODIMP
nsGlobalWindow::GetSelf(nsIDOMWindow** aWindow)
{
ErrorResult rv;
nsCOMPtr<nsIDOMWindow> window = GetSelf(rv);
FORWARD_TO_OUTER_OR_THROW(GetSelf, (aWindow), rv, rv.StealNSResult());
nsCOMPtr<nsIDOMWindow> window = Self();
window.forget(aWindow);
return rv.StealNSResult();
return NS_OK;
}
Navigator*

View File

@ -838,7 +838,7 @@ public:
CreateNamedPropertiesObject(JSContext *aCx, JS::Handle<JSObject*> aProto);
nsGlobalWindow* Window();
nsIDOMWindow* GetSelf(mozilla::ErrorResult& aError);
nsGlobalWindow* Self();
nsIDocument* GetDocument()
{
return GetDoc();

View File

@ -17,13 +17,47 @@ class nsIPrincipal;
class nsIGlobalObject : public nsISupports
{
bool mIsDying;
protected:
nsIGlobalObject()
: mIsDying(false)
{}
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGLOBALOBJECT_IID)
/**
* This check is added to deal with Promise microtask queues. On the main
* thread, we do not impose restrictions about when script stops running or
* when runnables can no longer be dispatched to the main thread. This means
* it is possible for a Promise chain to keep resolving an infinite chain of
* promises, preventing the browser from shutting down. See Bug 1058695. To
* prevent this, the nsGlobalWindow subclass sets this flag when it is
* closed. The Promise implementation checks this and prohibits new runnables
* from being dispatched.
*
* We pair this with checks during processing the promise microtask queue
* that pops up the slow script dialog when the Promise queue is preventing
* a window from going away.
*/
bool
IsDying() const
{
return mIsDying;
}
virtual JSObject* GetGlobalJSObject() = 0;
// This method is not meant to be overridden.
nsIPrincipal* PrincipalOrNull();
protected:
void
StartDying()
{
mIsDying = true;
}
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIGlobalObject,

View File

@ -595,7 +595,6 @@ 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;
}

View File

@ -3555,11 +3555,12 @@ class CGUpdateMemberSlotsMethod(CGAbstractStaticMethod):
"JSJitGetterCallArgs args(&temp);\n")
for m in self.descriptor.interface.members:
if m.isAttr() and m.getExtendedAttribute("StoreInSlot"):
# Skip doing this for the "window" attribute on the Window
# interface, because that can't be gotten safely until we have
# hooked it up correctly to the outer window.
# Skip doing this for the "window" and "self" attributes on the
# Window interface, because those can't be gotten safely until
# we have hooked it up correctly to the outer window. The
# window code handles doing the get itself.
if (self.descriptor.interface.identifier.name == "Window" and
m.identifier.name == "window"):
(m.identifier.name == "window" or m.identifier.name == "self")):
continue
body += fill(
"""

View File

@ -42,8 +42,6 @@ EXPORTS.mozilla.dom += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/dom/base',
'/dom/battery',

View File

@ -133,8 +133,6 @@ LOCAL_INCLUDES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -126,8 +126,6 @@ if CONFIG['MOZ_WEBSPEECH']:
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -33,5 +33,4 @@ LOCAL_INCLUDES += [
]
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'xul'

View File

@ -222,8 +222,6 @@ EXTRA_COMPONENTS += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
LOCAL_INCLUDES += [

View File

@ -51,7 +51,7 @@ interface nsIJSRAIIHelper;
interface nsIContentPermissionRequest;
interface nsIObserver;
[scriptable, uuid(7ecfd6e7-120a-4567-85f7-14277f4c6d9f)]
[scriptable, uuid(55d6b97f-0717-449d-ac6c-cdaba0a9b698)]
interface nsIDOMWindowUtils : nsISupports {
/**
@ -1327,6 +1327,13 @@ interface nsIDOMWindowUtils : nsISupports {
*/
readonly attribute boolean layerManagerRemote;
/**
* True if we can initialize a hardware-backed h264 decoder for a simple
* test video, does not mean that all h264 video decoding will be done
* in hardware.
*/
readonly attribute boolean supportsHardwareH264Decoding;
/**
* Record (and return) frame-intervals for frames which were presented
* between calling StartFrameTimeRecording and StopFrameTimeRecording.

View File

@ -54,6 +54,7 @@
#include "mozilla/net/NeckoChild.h"
#include "mozilla/plugins/PluginInstanceParent.h"
#include "mozilla/plugins/PluginModuleParent.h"
#include "mozilla/media/webrtc/WebrtcGlobalChild.h"
#include "mozilla/widget/WidgetMessageUtils.h"
#if defined(MOZ_CONTENT_SANDBOX)
@ -814,6 +815,9 @@ ContentChild::InitXPCOM()
RecvSetOffline(isOffline);
RecvBidiKeyboardNotify(isLangRTL);
// Create the CPOW manager as soon as possible.
SendPJavaScriptConstructor();
if (domainPolicy.active()) {
nsIScriptSecurityManager* ssm = nsContentUtils::GetSecurityManager();
MOZ_ASSERT(ssm);
@ -1826,6 +1830,21 @@ ContentChild::DeallocPSpeechSynthesisChild(PSpeechSynthesisChild* aActor)
#endif
}
PWebrtcGlobalChild *
ContentChild::AllocPWebrtcGlobalChild()
{
WebrtcGlobalChild *child = new WebrtcGlobalChild();
return child;
}
bool
ContentChild::DeallocPWebrtcGlobalChild(PWebrtcGlobalChild *aActor)
{
delete static_cast<WebrtcGlobalChild*>(aActor);
return true;
}
bool
ContentChild::RecvRegisterChrome(InfallibleTArray<ChromePackage>&& packages,
InfallibleTArray<ResourceMapping>&& resources,

View File

@ -457,6 +457,9 @@ public:
virtual bool
DeallocPOfflineCacheUpdateChild(POfflineCacheUpdateChild* offlineCacheUpdate) override;
virtual PWebrtcGlobalChild* AllocPWebrtcGlobalChild() override;
virtual bool DeallocPWebrtcGlobalChild(PWebrtcGlobalChild *aActor) override;
virtual PContentPermissionRequestChild*
AllocPContentPermissionRequestChild(const InfallibleTArray<PermissionRequest>& aRequests,
const IPC::Principal& aPrincipal,

View File

@ -87,6 +87,7 @@
#include "mozilla/StaticPtr.h"
#include "mozilla/Telemetry.h"
#include "mozilla/unused.h"
#include "mozilla/media/webrtc/WebrtcGlobalParent.h"
#include "nsAnonymousTemporaryFile.h"
#include "nsAppRunner.h"
#include "nsAutoPtr.h"
@ -2607,7 +2608,7 @@ ContentParent::RecvSetClipboard(const IPCDataTransfer& aDataTransfer,
raw->GuaranteePersistance();
nsRefPtr<gfxDrawable> drawable = new gfxSurfaceDrawable(image, size);
nsCOMPtr<imgIContainer> imageContainer(image::ImageOps::CreateFromDrawable(drawable));
nsCOMPtr<imgIContainer> imageContainer(image::ImageOps::CreateFromDrawable(drawable));
nsCOMPtr<nsISupportsInterfacePointer>
imgPtr(do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv));
@ -4388,7 +4389,8 @@ ContentParent::DoSendAsyncMessage(JSContext* aCx,
return false;
}
InfallibleTArray<CpowEntry> cpows;
if (aCpows && !GetCPOWManager()->Wrap(aCx, aCpows, &cpows)) {
jsipc::CPOWManager* mgr = GetCPOWManager();
if (aCpows && (!mgr || !mgr->Wrap(aCx, aCpows, &cpows))) {
return false;
}
#ifdef MOZ_NUWA_PROCESS
@ -4906,6 +4908,19 @@ ContentParent::DeallocPOfflineCacheUpdateParent(POfflineCacheUpdateParent* aActo
return true;
}
PWebrtcGlobalParent *
ContentParent::AllocPWebrtcGlobalParent()
{
return WebrtcGlobalParent::Alloc();
}
bool
ContentParent::DeallocPWebrtcGlobalParent(PWebrtcGlobalParent *aActor)
{
WebrtcGlobalParent::Dealloc(static_cast<WebrtcGlobalParent*>(aActor));
return true;
}
bool
ContentParent::RecvSetOfflinePermission(const Principal& aPrincipal)
{

View File

@ -843,6 +843,10 @@ private:
virtual bool RecvPDocAccessibleConstructor(PDocAccessibleParent* aDoc,
PDocAccessibleParent* aParentDoc, const uint64_t& aParentID) override;
virtual PWebrtcGlobalParent* AllocPWebrtcGlobalParent() override;
virtual bool DeallocPWebrtcGlobalParent(PWebrtcGlobalParent *aActor) override;
virtual bool RecvUpdateDropEffect(const uint32_t& aDragAction,
const uint32_t& aDropEffect) override;

View File

@ -50,6 +50,7 @@ include protocol PTestShell;
include protocol PVoicemail;
include protocol PJavaScript;
include protocol PRemoteSpellcheckEngine;
include protocol PWebrtcGlobal;
include DOMTypes;
include JavaScriptTypes;
include InputStreamParams;
@ -443,6 +444,7 @@ prio(normal upto urgent) sync protocol PContent
manages PVoicemail;
manages PJavaScript;
manages PRemoteSpellcheckEngine;
manages PWebrtcGlobal;
both:
// Depending on exactly how the new browser is being created, it might be
@ -763,6 +765,8 @@ parent:
PAsmJSCacheEntry(OpenMode openMode, WriteParams write, Principal principal);
PWebrtcGlobal();
// Services remoting
async StartVisitedQuery(URIParams uri);

View File

@ -178,36 +178,67 @@ MP3Parser::GetSamplesPerFrame()
const char sID3Head[3] = { 'I', 'D', '3' };
const uint32_t ID3_HEADER_LENGTH = 10;
const uint32_t ID3_FOOTER_LENGTH = 10;
const uint8_t ID3_FOOTER_PRESENT = 0x10;
ID3Parser::ID3Parser()
: mCurrentChar(0)
, mVersion(0)
, mFlags(0)
, mHeaderLength(0)
{ }
void
ID3Parser::Reset()
{
mCurrentChar = mHeaderLength = 0;
mCurrentChar = mVersion = mFlags = mHeaderLength = 0;
}
bool
ID3Parser::ParseChar(char ch)
{
// First three bytes of an ID3v2 header must match the string "ID3".
if (mCurrentChar < sizeof(sID3Head) / sizeof(*sID3Head)
&& ch != sID3Head[mCurrentChar]) {
goto fail;
}
// The last four bytes of the header is a 28-bit unsigned integer with the
// high bit of each byte unset.
if (mCurrentChar >= 6 && mCurrentChar < ID3_HEADER_LENGTH) {
if (ch & 0x80) {
goto fail;
} else {
switch (mCurrentChar) {
// The first three bytes of an ID3v2 header must match the string "ID3".
case 0: case 1: case 2:
if (ch != sID3Head[mCurrentChar]) {
goto fail;
}
break;
// The fourth and fifth bytes give the version, between 2 and 4.
case 3:
if (ch < '\2' || ch > '\4') {
goto fail;
}
mVersion = uint8_t(ch);
break;
case 4:
if (ch != '\0') {
goto fail;
}
break;
// The sixth byte gives the flags; valid flags depend on the version.
case 5:
if ((ch & (0xff >> mVersion)) != '\0') {
goto fail;
}
mFlags = uint8_t(ch);
break;
// Bytes seven through ten give the sum of the byte length of the extended
// header, the padding and the frames after unsynchronisation.
// These bytes form a 28-bit integer, with the high bit of each byte unset.
case 6: case 7: case 8: case 9:
if (ch & 0x80) {
goto fail;
}
mHeaderLength <<= 7;
mHeaderLength |= ch;
}
if (mCurrentChar == 9) {
mHeaderLength += ID3_HEADER_LENGTH;
mHeaderLength += (mFlags & ID3_FOOTER_PRESENT) ? ID3_FOOTER_LENGTH : 0;
}
break;
default:
MOZ_CRASH("Header already fully parsed!");
}
mCurrentChar++;
@ -215,6 +246,10 @@ ID3Parser::ParseChar(char ch)
return IsParsed();
fail:
if (mCurrentChar) {
Reset();
return ParseChar(ch);
}
Reset();
return false;
}

View File

@ -29,6 +29,8 @@ public:
private:
uint32_t mCurrentChar;
uint8_t mVersion;
uint8_t mFlags;
uint32_t mHeaderLength;
};

View File

@ -1057,7 +1057,6 @@ void MediaDecoder::PlaybackEnded()
ChangeState(PLAY_STATE_ENDED);
InvalidateWithFlags(VideoFrameContainer::INVALIDATE_FORCE);
mReadyStateWatchTarget->Notify(); // XXXbholley - Still necessary?
if (mOwner) {
mOwner->PlaybackEnded();
}
@ -1251,7 +1250,6 @@ void MediaDecoder::OnSeekResolved(SeekResolveValue aVal)
PlaybackPositionChanged(aVal.mEventVisibility);
if (mOwner) {
mReadyStateWatchTarget->Notify(); // XXXbholley - Still necessary?
if (!seekWasAborted && (aVal.mEventVisibility != MediaDecoderEventVisibility::Suppressed)) {
mOwner->SeekCompleted();
if (fireEnded) {
@ -1268,7 +1266,6 @@ void MediaDecoder::SeekingStarted(MediaDecoderEventVisibility aEventVisibility)
return;
if (mOwner) {
mReadyStateWatchTarget->Notify(); // XXXbholley - Still necessary?
if (aEventVisibility != MediaDecoderEventVisibility::Suppressed) {
mOwner->SeekStarted();
}
@ -1651,7 +1648,6 @@ void MediaDecoder::NotifyDataArrived(const char* aBuffer, uint32_t aLength, int6
if (mDecoderStateMachine) {
mDecoderStateMachine->NotifyDataArrived(aBuffer, aLength, aOffset);
}
mReadyStateWatchTarget->Notify(); // XXXbholley - Still necessary?
}
// Provide access to the state machine object

View File

@ -205,11 +205,12 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
mRealTime(aRealTime),
mDispatchedStateMachine(false),
mDelayedScheduler(this),
mState(DECODER_STATE_DECODING_NONE),
mState(DECODER_STATE_DECODING_NONE, "MediaDecoderStateMachine::mState"),
mPlayDuration(0),
mStartTime(-1),
mEndTime(-1),
mDurationSet(false),
mNextFrameStatusUpdater("MediaDecoderStateMachine::mNextFrameStatusUpdater"),
mFragmentEndTime(-1),
mReader(aReader),
mCurrentFrameTime(0),
@ -228,7 +229,7 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
mIsVideoPrerolling(false),
mAudioCaptured(false),
mPositionChangeQueued(false),
mAudioCompleted(false),
mAudioCompleted(false, "MediaDecoderStateMachine::mAudioCompleted"),
mGotDurationFromMetaData(false),
mDispatchedEventToDecode(false),
mStopAudioThread(true),
@ -257,6 +258,12 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
mNextFrameStatus.Init(mTaskQueue, MediaDecoderOwner::NEXT_FRAME_UNINITIALIZED,
"MediaDecoderStateMachine::mNextFrameStatus (Canonical)");
// Skip the initial notification we get when we Watch the value, since we're
// not on the right thread yet.
mNextFrameStatusUpdater->Watch(mState, /* aSkipInitialNotify = */ true);
mNextFrameStatusUpdater->Watch(mAudioCompleted, /* aSkipInitialNotify = */ true);
mNextFrameStatusUpdater->AddWeakCallback(this, &MediaDecoderStateMachine::UpdateNextFrameStatus);
static bool sPrefCacheInit = false;
if (!sPrefCacheInit) {
sPrefCacheInit = true;
@ -543,7 +550,6 @@ void MediaDecoderStateMachine::SendStreamData()
// until all samples are drained.
if (finished && AudioQueue().GetSize() == 0) {
mAudioCompleted = true;
UpdateNextFrameStatus();
}
}
@ -940,9 +946,6 @@ MediaDecoderStateMachine::OnNotDecoded(MediaData::Type aType,
case DECODER_STATE_BUFFERING:
case DECODER_STATE_DECODING: {
CheckIfDecodeComplete();
// The ready state can change when we've decoded data, so update the
// ready state, so that DOM events can fire.
UpdateNextFrameStatus();
mDecoder->GetReentrantMonitor().NotifyAll();
// Schedule the state machine to notify track ended as soon as possible.
if (mAudioCaptured) {
@ -1867,11 +1870,6 @@ MediaDecoderStateMachine::InitiateSeek()
StopPlayback();
UpdatePlaybackPositionInternal(mCurrentSeek.mTarget.mTime);
// Make sure the main thread decoder gets notified of the seek only after
// we've updated the mirrored NextFrameStatus, which has special behavior
// when we're in DECODER_STATE_SEEKING.
UpdateNextFrameStatus();
nsCOMPtr<nsIRunnable> startEvent =
NS_NewRunnableMethodWithArg<MediaDecoderEventVisibility>(
mDecoder,
@ -2677,7 +2675,6 @@ nsresult MediaDecoderStateMachine::RunStateMachine()
// Notify to allow blocked decoder thread to continue
mDecoder->GetReentrantMonitor().NotifyAll();
UpdateNextFrameStatus();
MaybeStartPlayback();
NS_ASSERTION(IsStateMachineScheduled(), "Must have timer scheduled");
return NS_OK;
@ -3031,12 +3028,6 @@ void MediaDecoderStateMachine::AdvanceFrame()
currentFrame = nullptr;
}
// If the number of audio/video frames queued has changed, either by
// this function popping and playing a video frame, or by the audio
// thread popping and playing an audio frame, we may need to update our
// ready state. Post an update to do so.
UpdateNextFrameStatus();
int64_t delay = remainingTime / mPlaybackRate;
if (delay > 0) {
ScheduleStateMachineIn(delay);
@ -3196,7 +3187,7 @@ void MediaDecoderStateMachine::SetStartTime(int64_t aStartTimeUsecs)
void MediaDecoderStateMachine::UpdateNextFrameStatus() {
MOZ_ASSERT(OnTaskQueue());
AssertCurrentThreadInMonitor();
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
MediaDecoderOwner::NextFrameStatus status;
const char* statusString;
@ -3256,7 +3247,6 @@ void MediaDecoderStateMachine::StartBuffering()
mBufferingStart = TimeStamp::Now();
SetState(DECODER_STATE_BUFFERING);
UpdateNextFrameStatus();
DECODER_LOG("Changed state from DECODING to BUFFERING, decoded for %.3lfs",
decodeDuration.ToSeconds());
#ifdef PR_LOGGING
@ -3439,7 +3429,6 @@ void MediaDecoderStateMachine::OnAudioSinkComplete()
}
ResyncAudioClock();
mAudioCompleted = true;
UpdateNextFrameStatus();
// Kick the decode thread; it may be sleeping waiting for this to finish.
mDecoder->GetReentrantMonitor().NotifyAll();
}

View File

@ -844,7 +844,7 @@ public:
// NotifyAll on the monitor must be called when the state is changed so
// that interested threads can wake up and alter behaviour if appropriate
// Accessed on state machine, audio, main, and AV thread.
State mState;
Watchable<State> mState;
// The task queue in which we run decode tasks. This is referred to as
// the "decode thread", though in practise tasks can run on a different
@ -887,6 +887,7 @@ public:
// The status of our next frame. Mirrored on the main thread and used to
// compute ready state.
WatcherHolder mNextFrameStatusUpdater;
Canonical<NextFrameStatus>::Holder mNextFrameStatus;
public:
AbstractCanonical<NextFrameStatus>* CanonicalNextFrameStatus() { return &mNextFrameStatus; }
@ -1155,7 +1156,7 @@ protected:
// the state machine thread. Synchronised via decoder monitor.
// When data is being sent to a MediaStream, this is true when all data has
// been written to the MediaStream.
bool mAudioCompleted;
Watchable<bool> mAudioCompleted;
// True if mDuration has a value obtained from an HTTP header, or from
// the media index/metadata. Accessed on the state machine thread.

View File

@ -70,7 +70,7 @@ void EnsureStateWatchingLog();
class AbstractWatcher
{
public:
NS_INLINE_DECL_REFCOUNTING(AbstractWatcher)
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AbstractWatcher)
AbstractWatcher() : mDestroyed(false) {}
bool IsDestroyed() { return mDestroyed; }
virtual void Notify() = 0;
@ -104,11 +104,13 @@ class WatchTarget
public:
explicit WatchTarget(const char* aName) : mName(aName) {}
void AddWatcher(AbstractWatcher* aWatcher)
void AddWatcher(AbstractWatcher* aWatcher, bool aSkipInitialNotify)
{
MOZ_ASSERT(!mWatchers.Contains(aWatcher));
mWatchers.AppendElement(aWatcher);
aWatcher->Notify();
if (!aSkipInitialNotify) {
aWatcher->Notify();
}
}
void RemoveWatcher(AbstractWatcher* aWatcher)
@ -204,7 +206,7 @@ public:
AbstractThread::GetCurrent()->TailDispatcher().AddDirectTask(r.forget());
}
void Watch(WatchTarget& aTarget) { aTarget.AddWatcher(this); }
void Watch(WatchTarget& aTarget, bool aSkipInitialNotify = false) { aTarget.AddWatcher(this, aSkipInitialNotify); }
void Unwatch(WatchTarget& aTarget) { aTarget.RemoveWatcher(this); }
template<typename ThisType>

View File

@ -539,12 +539,16 @@ AppleMP3Reader::NotifyDataArrived(const char* aBuffer,
}
mMP3FrameParser.Parse(aBuffer, aLength, aOffset);
if (!mMP3FrameParser.IsMP3()) {
return;
}
uint64_t duration = mMP3FrameParser.GetDuration();
if (duration != mDuration) {
LOGD("Updating media duration to %lluus\n", duration);
mDuration = duration;
MOZ_ASSERT(mDecoder);
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
mDuration = duration;
mDecoder->UpdateEstimatedMediaDuration(duration);
}
}

View File

@ -409,15 +409,20 @@ void
DirectShowReader::NotifyDataArrived(const char* aBuffer, uint32_t aLength, int64_t aOffset)
{
MOZ_ASSERT(NS_IsMainThread());
if (!mMP3FrameParser.NeedsData()) {
return;
}
mMP3FrameParser.Parse(aBuffer, aLength, aOffset);
if (!mMP3FrameParser.IsMP3()) {
return;
}
mMP3FrameParser.Parse(aBuffer, aLength, aOffset);
int64_t duration = mMP3FrameParser.GetDuration();
if (duration != mDuration) {
mDuration = duration;
MOZ_ASSERT(mDecoder);
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
mDuration = duration;
mDecoder->UpdateEstimatedMediaDuration(mDuration);
}
}

View File

@ -30,6 +30,7 @@
using mozilla::layers::Image;
using mozilla::layers::LayerManager;
using mozilla::layers::ImageContainer;
using mozilla::layers::LayersBackend;
#ifdef PR_LOGGING
@ -70,6 +71,43 @@ TrackTypeToStr(TrackType aTrack)
}
#endif
uint8_t sTestExtraData[40] = { 0x01, 0x64, 0x00, 0x0a, 0xff, 0xe1, 0x00, 0x17, 0x67, 0x64, 0x00, 0x0a, 0xac, 0xd9, 0x44, 0x26, 0x84, 0x00, 0x00, 0x03,
0x00, 0x04, 0x00, 0x00, 0x03, 0x00, 0xc8, 0x3c, 0x48, 0x96, 0x58, 0x01, 0x00, 0x06, 0x68, 0xeb, 0xe3, 0xcb, 0x22, 0xc0 };
/* static */ bool
MP4Reader::IsVideoAccelerated(LayersBackend aBackend)
{
VideoInfo config;
config.mMimeType = "video/avc";
config.mId = 1;
config.mDuration = 40000;
config.mMediaTime = 0;
config.mDisplay = config.mImage = nsIntSize(64, 64);
config.mExtraData = new MediaByteBuffer();
config.mExtraData->AppendElements(sTestExtraData, 40);
PlatformDecoderModule::Init();
nsRefPtr<PlatformDecoderModule> platform = PlatformDecoderModule::Create();
if (!platform) {
return false;
}
nsRefPtr<MediaDataDecoder> decoder =
platform->CreateDecoder(config, nullptr, nullptr, aBackend, nullptr);
if (!decoder) {
return false;
}
nsresult rv = decoder->Init();
NS_ENSURE_SUCCESS(rv, false);
bool result = decoder->IsHardwareAccelerated();
decoder->Shutdown();
return result;
}
bool
AccumulateSPSTelemetry(const MediaByteBuffer* aExtradata)
{

View File

@ -88,6 +88,8 @@ public:
virtual void DisableHardwareAcceleration() override;
static bool IsVideoAccelerated(layers::LayersBackend aBackend);
private:
bool InitDemuxer();

View File

@ -118,8 +118,7 @@ PlatformDecoderModule::CreateCDMWrapper(CDMProxy* aProxy,
already_AddRefed<PlatformDecoderModule>
PlatformDecoderModule::Create()
{
// Note: This runs on the decode thread.
MOZ_ASSERT(!NS_IsMainThread());
// Note: This (usually) runs on the decode thread.
nsRefPtr<PlatformDecoderModule> m(CreatePDM());

View File

@ -54,8 +54,6 @@ GonkVideoDecoderManager::GonkVideoDecoderManager(
, mNativeWindow(nullptr)
, mPendingVideoBuffersLock("GonkVideoDecoderManager::mPendingVideoBuffersLock")
{
NS_ASSERTION(!NS_IsMainThread(), "Should not be on main thread.");
MOZ_ASSERT(mImageContainer);
MOZ_COUNT_CTOR(GonkVideoDecoderManager);
mMimeType = aConfig.mMimeType;
mVideoWidth = aConfig.mDisplay.width;

View File

@ -49,8 +49,12 @@ WMFMediaDataDecoder::Init()
nsresult
WMFMediaDataDecoder::Shutdown()
{
mTaskQueue->Dispatch(
NS_NewRunnableMethod(this, &WMFMediaDataDecoder::ProcessShutdown));
if (mTaskQueue) {
mTaskQueue->Dispatch(
NS_NewRunnableMethod(this, &WMFMediaDataDecoder::ProcessShutdown));
} else {
ProcessShutdown();
}
#ifdef DEBUG
{
MonitorAutoLock mon(mMonitor);

View File

@ -78,8 +78,6 @@ WMFVideoMFTManager::WMFVideoMFTManager(
// mVideoStride, mVideoWidth, mVideoHeight, mUseHwAccel are initialized in
// Init().
{
NS_ASSERTION(!NS_IsMainThread(), "Should not be on main thread.");
MOZ_ASSERT(mImageContainer);
MOZ_COUNT_CTOR(WMFVideoMFTManager);
// Need additional checks/params to check vp8/vp9
@ -165,7 +163,12 @@ WMFVideoMFTManager::InitializeDXVA()
// The DXVA manager must be created on the main thread.
nsRefPtr<CreateDXVAManagerEvent> event(new CreateDXVAManagerEvent(mLayersBackend));
NS_DispatchToMainThread(event, NS_DISPATCH_SYNC);
if (NS_IsMainThread()) {
event->Run();
} else {
NS_DispatchToMainThread(event, NS_DISPATCH_SYNC);
}
mDXVA2Manager = event->mDXVA2Manager;
return mDXVA2Manager != nullptr;

View File

@ -1278,19 +1278,21 @@ void GStreamerReader::NotifyDataArrived(const char *aBuffer,
int64_t aOffset)
{
MOZ_ASSERT(NS_IsMainThread());
if (HasVideo()) {
return;
}
if (!mMP3FrameParser.NeedsData()) {
return;
}
mMP3FrameParser.Parse(aBuffer, aLength, aOffset);
if (!mMP3FrameParser.IsMP3()) {
return;
}
int64_t duration = mMP3FrameParser.GetDuration();
if (duration != mLastParserDuration && mUseParserDuration) {
MOZ_ASSERT(mDecoder);
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
mLastParserDuration = duration;
mDecoder->UpdateEstimatedMediaDuration(mLastParserDuration);

View File

@ -268,8 +268,6 @@ EXTRA_JS_MODULES.media += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/caps',
'/dom/base',

View File

@ -491,15 +491,18 @@ void MediaOmxReader::NotifyDataArrived(const char* aBuffer, uint32_t aLength, in
if (HasVideo()) {
return;
}
if (!mMP3FrameParser.NeedsData()) {
return;
}
mMP3FrameParser.Parse(aBuffer, aLength, aOffset);
if (!mMP3FrameParser.IsMP3()) {
return;
}
int64_t duration = mMP3FrameParser.GetDuration();
ReentrantMonitorAutoEnter mon(decoder->GetReentrantMonitor());
if (duration != mLastParserDuration && mUseParserDuration) {
ReentrantMonitorAutoEnter mon(decoder->GetReentrantMonitor());
mLastParserDuration = duration;
decoder->UpdateEstimatedMediaDuration(mLastParserDuration);
}

View File

@ -17,8 +17,6 @@ UNIFIED_SOURCES += [
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
UNIFIED_SOURCES += ['../systemservices/OSXRunLoopSingleton.cpp']
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/caps',
'/dom/base',

View File

@ -74,8 +74,6 @@ IPDL_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/dom/base',
]

View File

@ -90,8 +90,6 @@ else:
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/dom/base',
'/dom/plugins/ipc',

View File

@ -537,6 +537,8 @@ PluginModuleChromeParent::OnProcessLaunched(const bool aSucceeded)
Preferences::RegisterCallback(TimeoutChanged, kHangUIMinDisplayPref, this);
#endif
RegisterSettingsCallbacks();
#ifdef MOZ_CRASHREPORTER
// If this fails, we're having IPC troubles, and we're doomed anyways.
if (!CrashReporterParent::CreateCrashReporter(this)) {
@ -693,8 +695,6 @@ PluginModuleChromeParent::PluginModuleChromeParent(const char* aFilePath, uint32
sInstantiated = true;
mRunID = sNextRunID++;
RegisterSettingsCallbacks();
#ifdef MOZ_ENABLE_PROFILER_SPS
InitPluginProfiling();
#endif

View File

@ -263,7 +263,7 @@ protected:
// console though, for debugging.
}
return NS_OK;
return rv.StealNSResult();
}
private:
@ -489,13 +489,24 @@ Promise::PerformMicroTaskCheckpoint()
return false;
}
Maybe<AutoSafeJSContext> cx;
if (NS_IsMainThread()) {
cx.emplace();
}
do {
nsCOMPtr<nsIRunnable> runnable = microtaskQueue.ElementAt(0);
MOZ_ASSERT(runnable);
// This function can re-enter, so we remove the element before calling.
microtaskQueue.RemoveElementAt(0);
runnable->Run();
nsresult rv = runnable->Run();
if (NS_WARN_IF(NS_FAILED(rv))) {
return false;
}
if (cx.isSome()) {
JS_CheckForInterrupt(cx.ref());
}
} while (!microtaskQueue.IsEmpty());
return true;
@ -1071,6 +1082,10 @@ void
Promise::AppendCallbacks(PromiseCallback* aResolveCallback,
PromiseCallback* aRejectCallback)
{
if (mGlobal->IsDying()) {
return;
}
MOZ_ASSERT(aResolveCallback);
MOZ_ASSERT(aRejectCallback);
@ -1297,7 +1312,12 @@ Promise::RejectInternal(JSContext* aCx,
void
Promise::Settle(JS::Handle<JS::Value> aValue, PromiseState aState)
{
if (mGlobal->IsDying()) {
return;
}
mSettlementTimestamp = TimeStamp::Now();
SetResult(aValue);
SetState(aState);

View File

@ -71,7 +71,7 @@ ResolvePromiseCallback::~ResolvePromiseCallback()
DropJSObjects(this);
}
void
nsresult
ResolvePromiseCallback::Call(JSContext* aCx,
JS::Handle<JS::Value> aValue)
{
@ -81,10 +81,11 @@ ResolvePromiseCallback::Call(JSContext* aCx,
JS::Rooted<JS::Value> value(aCx, aValue);
if (!JS_WrapValue(aCx, &value)) {
NS_WARNING("Failed to wrap value into the right compartment.");
return;
return NS_ERROR_FAILURE;
}
mPromise->ResolveInternal(aCx, value);
return NS_OK;
}
// RejectPromiseCallback
@ -129,7 +130,7 @@ RejectPromiseCallback::~RejectPromiseCallback()
DropJSObjects(this);
}
void
nsresult
RejectPromiseCallback::Call(JSContext* aCx,
JS::Handle<JS::Value> aValue)
{
@ -139,11 +140,12 @@ RejectPromiseCallback::Call(JSContext* aCx,
JS::Rooted<JS::Value> value(aCx, aValue);
if (!JS_WrapValue(aCx, &value)) {
NS_WARNING("Failed to wrap value into the right compartment.");
return;
return NS_ERROR_FAILURE;
}
mPromise->RejectInternal(aCx, value);
return NS_OK;
}
// WrapperPromiseCallback
@ -190,7 +192,7 @@ WrapperPromiseCallback::~WrapperPromiseCallback()
DropJSObjects(this);
}
void
nsresult
WrapperPromiseCallback::Call(JSContext* aCx,
JS::Handle<JS::Value> aValue)
{
@ -198,7 +200,7 @@ WrapperPromiseCallback::Call(JSContext* aCx,
JS::Rooted<JS::Value> value(aCx, aValue);
if (!JS_WrapValue(aCx, &value)) {
NS_WARNING("Failed to wrap value into the right compartment.");
return;
return NS_ERROR_FAILURE;
}
ErrorResult rv;
@ -219,7 +221,7 @@ WrapperPromiseCallback::Call(JSContext* aCx,
if (!JS_WrapValue(aCx, &value)) {
NS_WARNING("Failed to wrap value into the right compartment.");
return;
return NS_ERROR_FAILURE;
}
} else {
// Convert the ErrorResult to a JS exception object that we can reject
@ -232,7 +234,7 @@ WrapperPromiseCallback::Call(JSContext* aCx,
}
mNextPromise->RejectInternal(aCx, value);
return;
return NS_OK;
}
// If the return value is the same as the promise itself, throw TypeError.
@ -270,7 +272,7 @@ WrapperPromiseCallback::Call(JSContext* aCx,
if (!fn) {
// Out of memory. Promise will stay unresolved.
JS_ClearPendingException(aCx);
return;
return NS_ERROR_OUT_OF_MEMORY;
}
JS::Rooted<JSString*> message(aCx,
@ -279,7 +281,7 @@ WrapperPromiseCallback::Call(JSContext* aCx,
if (!message) {
// Out of memory. Promise will stay unresolved.
JS_ClearPendingException(aCx);
return;
return NS_ERROR_OUT_OF_MEMORY;
}
JS::Rooted<JS::Value> typeError(aCx);
@ -287,21 +289,22 @@ WrapperPromiseCallback::Call(JSContext* aCx,
nullptr, message, &typeError)) {
// Out of memory. Promise will stay unresolved.
JS_ClearPendingException(aCx);
return;
return NS_ERROR_OUT_OF_MEMORY;
}
mNextPromise->RejectInternal(aCx, typeError);
return;
return NS_OK;
}
}
// Otherwise, run resolver's resolve with value.
if (!JS_WrapValue(aCx, &retValue)) {
NS_WARNING("Failed to wrap value into the right compartment.");
return;
return NS_ERROR_FAILURE;
}
mNextPromise->ResolveInternal(aCx, retValue);
return NS_OK;
}
// NativePromiseCallback
@ -327,21 +330,22 @@ NativePromiseCallback::~NativePromiseCallback()
{
}
void
nsresult
NativePromiseCallback::Call(JSContext* aCx,
JS::Handle<JS::Value> aValue)
{
if (mState == Promise::Resolved) {
mHandler->ResolvedCallback(aCx, aValue);
return;
return NS_OK;
}
if (mState == Promise::Rejected) {
mHandler->RejectedCallback(aCx, aValue);
return;
return NS_OK;
}
NS_NOTREACHED("huh?");
return NS_ERROR_FAILURE;
}
/* static */ PromiseCallback*

View File

@ -26,8 +26,8 @@ public:
PromiseCallback();
virtual void Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) = 0;
virtual nsresult Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) = 0;
// Return the Promise that this callback will end up resolving or
// rejecting, if any.
@ -54,8 +54,8 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(WrapperPromiseCallback,
PromiseCallback)
void Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) override;
nsresult Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) override;
Promise* GetDependentPromise() override
{
@ -82,8 +82,8 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(ResolvePromiseCallback,
PromiseCallback)
void Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) override;
nsresult Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) override;
Promise* GetDependentPromise() override
{
@ -108,8 +108,8 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(RejectPromiseCallback,
PromiseCallback)
void Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) override;
nsresult Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) override;
Promise* GetDependentPromise() override
{
@ -133,8 +133,8 @@ public:
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(NativePromiseCallback,
PromiseCallback)
void Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) override;
nsresult Call(JSContext* aCx,
JS::Handle<JS::Value> aValue) override;
Promise* GetDependentPromise() override
{

View File

@ -37,8 +37,6 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -24,8 +24,6 @@ IPDL_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -29,8 +29,8 @@ typedef any Transferable;
// the current browsing context
[Unforgeable, Constant, StoreInSlot,
CrossOriginReadable] readonly attribute Window window;
[Replaceable, Throws,
CrossOriginReadable] readonly attribute WindowProxy self;
[Replaceable, Constant, StoreInSlot,
CrossOriginReadable] readonly attribute Window self;
[Unforgeable, StoreInSlot, Pure] readonly attribute Document? document;
[Throws] attribute DOMString name;
[PutForwards=href, Unforgeable, Throws,

View File

@ -14,6 +14,7 @@
[Exposed=(Worker)]
interface WorkerGlobalScope : EventTarget {
[Constant, Cached]
readonly attribute WorkerGlobalScope self;
[Replaceable]

View File

@ -80,10 +80,10 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(WorkerGlobalScope,
DOMEventTargetHelper)
already_AddRefed<WorkerGlobalScope>
WorkerGlobalScope*
Self()
{
return nsRefPtr<WorkerGlobalScope>(this).forget();
return this;
}
Console*

View File

@ -91,8 +91,6 @@ IPDL_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'../base',
'../system',

View File

@ -80,7 +80,6 @@ support-files =
[test_unregister.html]
[test_installation_simple.html]
[test_fetch_event.html]
skip-if = os != "linux" # Bug 1136780
[test_https_fetch.html]
[test_https_fetch_cloned_response.html]
[test_match_all.html]

View File

@ -38,8 +38,6 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/dom/base',
'/dom/html',

View File

@ -33,8 +33,6 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [

View File

@ -42,8 +42,6 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/docshell/base',
'/dom/base',

View File

@ -46,8 +46,6 @@ UNIFIED_SOURCES += [
'nsXULTreeBuilder.cpp',
]
MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'/dom/base',
'/dom/xul',

View File

@ -0,0 +1,10 @@
<div>
<div>
aaaaaaa
</script>
<script type="text/javascript">
document.designMode = "on"
window.getSelection().modify("extend", "backward", "line")
document.execCommand("increasefontsize","",null);
</script>

View File

@ -0,0 +1,18 @@
<script>
onload = function() {
var testContainer = document.createElement("span");
testContainer.contentEditable = true;
document.body.appendChild(testContainer);
function queryFormatBlock(content)
{
testContainer.innerHTML = content;
while (testContainer.firstChild)
testContainer = testContainer.firstChild;
window.getSelection().collapse(testContainer, 0);
document.queryCommandValue('formatBlock');
}
queryFormatBlock('<ol>hello</ol>');
};
</script>

View File

@ -61,3 +61,5 @@ needs-focus load 793866.html
load 1057677.html
needs-focus load 1128787.html
load 1134545.html
load 1158452.html
load 1158651.html

View File

@ -6035,6 +6035,7 @@ nsHTMLEditRules::GetParagraphFormatNodes(nsTArray<OwningNonNull<nsINode>>& outAr
// Remove all non-editable nodes. Leave them be.
if (!mHTMLEditor->IsEditable(testNode)) {
outArrayOfNodes.RemoveElementAt(i);
continue;
}
// Scan for table elements. If we find table elements other than table,

View File

@ -1502,11 +1502,8 @@ nsHTMLEditor::RelativeFontChange(FontSize aDir)
NS_ENSURE_SUCCESS(res, res);
}
if (IsTextNode(endNode) && IsEditable(endNode)) {
nsCOMPtr<nsIDOMCharacterData> nodeAsText = do_QueryInterface(endNode);
int32_t endOffset;
range->GetEndOffset(&endOffset);
res = RelativeFontChangeOnTextNode(aDir == FontSize::incr ? +1 : -1,
static_cast<nsIDOMCharacterData*>(startNode->AsDOMNode()),
static_cast<nsIDOMCharacterData*>(endNode->AsDOMNode()),
0, range->EndOffset());
NS_ENSURE_SUCCESS(res, res);
}

View File

@ -36,12 +36,14 @@ SimpleTest.waitForFocus(function() {
setTimeout(function() {
synthesizeKey(" ", {});
var sel = getSpellCheckSelection();
is(sel.rangeCount, 2, "We should have two misspelled words");
is(String(sel.getRangeAt(0)), "thiss", "Correct misspelled word");
is(String(sel.getRangeAt(1)), "onee", "Correct misspelled word");
setTimeout(function() {
var sel = getSpellCheckSelection();
is(sel.rangeCount, 2, "We should have two misspelled words");
is(String(sel.getRangeAt(0)), "thiss", "Correct misspelled word");
is(String(sel.getRangeAt(1)), "onee", "Correct misspelled word");
SimpleTest.finish();
SimpleTest.finish();
},0);
},0);
},0);

View File

@ -22,8 +22,6 @@ UNIFIED_SOURCES += [
'nsPopupWindowManager.cpp',
]
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -147,8 +147,6 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -127,8 +127,6 @@ EXPORTS.angle.KHR += [ 'include/KHR/khrplatform.h' ]
LOCAL_INCLUDES += [ 'include', 'src' ]
MSVC_ENABLE_PGO = True
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
NO_VISIBILITY_FLAGS = True

View File

@ -185,8 +185,6 @@ UNIFIED_SOURCES += [
'cairo.c',
]
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'

View File

@ -58,8 +58,6 @@ SOURCES += [
'pixman.c',
]
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
LOCAL_INCLUDES += [
'../../cairo/src',

View File

@ -142,8 +142,6 @@ UNIFIED_SOURCES += [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'

View File

@ -55,8 +55,6 @@ UNIFIED_SOURCES += [
'UtfCodec.cpp',
]
MSVC_ENABLE_PGO = True
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
NO_VISIBILITY_FLAGS = True
DEFINES['GRAPHITE2_EXPORTING'] = True

View File

@ -58,8 +58,6 @@ UNIFIED_SOURCES += [
'hb-warning.cc',
]
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'

View File

@ -2347,19 +2347,14 @@ static void
RedistributeDisplayPortExcess(CSSSize& aDisplayPortSize,
const CSSRect& aScrollableRect)
{
float xSlack = std::max(0.0f, aDisplayPortSize.width - aScrollableRect.width);
float ySlack = std::max(0.0f, aDisplayPortSize.height - aScrollableRect.height);
if (ySlack > 0) {
// Reassign wasted y-axis displayport to the x-axis
aDisplayPortSize.height -= ySlack;
float xExtra = ySlack * aDisplayPortSize.width / aDisplayPortSize.height;
aDisplayPortSize.width += xExtra;
} else if (xSlack > 0) {
// Reassign wasted x-axis displayport to the y-axis
aDisplayPortSize.width -= xSlack;
float yExtra = xSlack * aDisplayPortSize.height / aDisplayPortSize.width;
aDisplayPortSize.height += yExtra;
// As aDisplayPortSize.height * aDisplayPortSize.width does not change,
// we are just scaling by the ratio and its inverse.
if (aDisplayPortSize.height > aScrollableRect.height) {
aDisplayPortSize.width *= (aDisplayPortSize.height / aScrollableRect.height);
aDisplayPortSize.height = aScrollableRect.height;
} else if (aDisplayPortSize.width > aScrollableRect.width) {
aDisplayPortSize.height *= (aDisplayPortSize.width / aScrollableRect.width);
aDisplayPortSize.width = aScrollableRect.width;
}
}

View File

@ -364,8 +364,6 @@ IPDL_SOURCES = [
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
LOCAL_INCLUDES += [

View File

@ -47,8 +47,6 @@ UNIFIED_SOURCES += [
'woff2.cc',
]
MSVC_ENABLE_PGO = True
if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
NO_VISIBILITY_FLAGS = True

View File

@ -17,8 +17,6 @@ SOURCES += [
'transform_util.c',
]
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
if CONFIG['GNU_CC']:

View File

@ -48,8 +48,6 @@ if CONFIG['INTEL_ARCHITECTURE'] and CONFIG['GNU_CC'] and CONFIG['OS_ARCH'] != 'W
'trunk/src/opts/SkBlitRow_opts_SSE4_asm.S',
]
MSVC_ENABLE_PGO = True
FINAL_LIBRARY = 'gkmedias'
LOCAL_INCLUDES += [
'trunk/include/config',

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