mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge inbound to m-c
This commit is contained in:
commit
1488da5db2
@ -11,14 +11,20 @@
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
AccGroupInfo::AccGroupInfo(Accessible* aItem, role aRole) :
|
||||
mPosInSet(0), mSetSize(0), mParent(nullptr)
|
||||
mPosInSet(0), mSetSize(0), mParent(nullptr), mItem(aItem), mRole(aRole)
|
||||
{
|
||||
MOZ_COUNT_CTOR(AccGroupInfo);
|
||||
Accessible* parent = aItem->Parent();
|
||||
Update();
|
||||
}
|
||||
|
||||
void
|
||||
AccGroupInfo::Update()
|
||||
{
|
||||
Accessible* parent = mItem->Parent();
|
||||
if (!parent)
|
||||
return;
|
||||
|
||||
int32_t indexInParent = aItem->IndexInParent();
|
||||
int32_t indexInParent = mItem->IndexInParent();
|
||||
uint32_t siblingCount = parent->ChildCount();
|
||||
if (indexInParent == -1 ||
|
||||
indexInParent >= static_cast<int32_t>(siblingCount)) {
|
||||
@ -26,7 +32,7 @@ AccGroupInfo::AccGroupInfo(Accessible* aItem, role aRole) :
|
||||
return;
|
||||
}
|
||||
|
||||
int32_t level = nsAccUtils::GetARIAOrDefaultLevel(aItem);
|
||||
int32_t level = nsAccUtils::GetARIAOrDefaultLevel(mItem);
|
||||
|
||||
// Compute position in set.
|
||||
mPosInSet = 1;
|
||||
@ -39,7 +45,7 @@ AccGroupInfo::AccGroupInfo(Accessible* aItem, role aRole) :
|
||||
break;
|
||||
|
||||
// If sibling is not visible and hasn't the same base role.
|
||||
if (BaseRole(siblingRole) != aRole || sibling->State() & states::INVISIBLE)
|
||||
if (BaseRole(siblingRole) != mRole || sibling->State() & states::INVISIBLE)
|
||||
continue;
|
||||
|
||||
// Check if it's hierarchical flatten structure, i.e. if the sibling
|
||||
@ -81,7 +87,7 @@ AccGroupInfo::AccGroupInfo(Accessible* aItem, role aRole) :
|
||||
break;
|
||||
|
||||
// If sibling is visible and has the same base role
|
||||
if (BaseRole(siblingRole) != aRole || sibling->State() & states::INVISIBLE)
|
||||
if (BaseRole(siblingRole) != mRole || sibling->State() & states::INVISIBLE)
|
||||
continue;
|
||||
|
||||
// and check if it's hierarchical flatten structure.
|
||||
@ -108,7 +114,7 @@ AccGroupInfo::AccGroupInfo(Accessible* aItem, role aRole) :
|
||||
return;
|
||||
|
||||
roles::Role parentRole = parent->Role();
|
||||
if (ShouldReportRelations(aRole, parentRole))
|
||||
if (ShouldReportRelations(mRole, parentRole))
|
||||
mParent = parent;
|
||||
|
||||
// ARIA tree and list can be arranged by using ARIA groups to organize levels.
|
||||
@ -119,9 +125,9 @@ AccGroupInfo::AccGroupInfo(Accessible* aItem, role aRole) :
|
||||
// parent. In other words the parent of the tree item will be a group and
|
||||
// the previous tree item of the group is a conceptual parent of the tree
|
||||
// item.
|
||||
if (aRole == roles::OUTLINEITEM) {
|
||||
if (mRole == roles::OUTLINEITEM) {
|
||||
Accessible* parentPrevSibling = parent->PrevSibling();
|
||||
if (parentPrevSibling && parentPrevSibling->Role() == aRole) {
|
||||
if (parentPrevSibling && parentPrevSibling->Role() == mRole) {
|
||||
mParent = parentPrevSibling;
|
||||
return;
|
||||
}
|
||||
@ -130,9 +136,9 @@ AccGroupInfo::AccGroupInfo(Accessible* aItem, role aRole) :
|
||||
// Way #2 for ARIA list and tree: group is a child of an item. In other words
|
||||
// the parent of the item will be a group and containing item of the group is
|
||||
// a conceptual parent of the item.
|
||||
if (aRole == roles::LISTITEM || aRole == roles::OUTLINEITEM) {
|
||||
if (mRole == roles::LISTITEM || mRole == roles::OUTLINEITEM) {
|
||||
Accessible* grandParent = parent->Parent();
|
||||
if (grandParent && grandParent->Role() == aRole)
|
||||
if (grandParent && grandParent->Role() == mRole)
|
||||
mParent = grandParent;
|
||||
}
|
||||
}
|
||||
|
@ -34,6 +34,11 @@ public:
|
||||
*/
|
||||
Accessible* ConceptualParent() const { return mParent; }
|
||||
|
||||
/**
|
||||
* Update group information.
|
||||
*/
|
||||
void Update();
|
||||
|
||||
/**
|
||||
* Create group info.
|
||||
*/
|
||||
@ -99,6 +104,8 @@ private:
|
||||
uint32_t mPosInSet;
|
||||
uint32_t mSetSize;
|
||||
Accessible* mParent;
|
||||
Accessible* mItem;
|
||||
a11y::role mRole;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -89,8 +89,8 @@ public:
|
||||
NotificationController(DocAccessible* aDocument, nsIPresShell* aPresShell);
|
||||
virtual ~NotificationController();
|
||||
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void);
|
||||
NS_IMETHOD_(nsrefcnt) Release(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release(void);
|
||||
|
||||
NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(NotificationController)
|
||||
|
||||
|
@ -52,7 +52,6 @@ NS_IMPL_CYCLE_COLLECTION_3(nsAccessiblePivot, mRoot, mPosition, mObservers)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsAccessiblePivot)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIAccessiblePivot)
|
||||
NS_INTERFACE_MAP_ENTRY(nsAccessiblePivot)
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAccessiblePivot)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
|
@ -2522,6 +2522,7 @@ Accessible::BindToParent(Accessible* aParent, uint32_t aIndexInParent)
|
||||
if (mParent != aParent) {
|
||||
NS_ERROR("Adopting child!");
|
||||
mParent->RemoveChild(this);
|
||||
mParent->InvalidateChildrenGroupInfo();
|
||||
} else {
|
||||
NS_ERROR("Binding to the same parent!");
|
||||
return;
|
||||
@ -2530,12 +2531,15 @@ Accessible::BindToParent(Accessible* aParent, uint32_t aIndexInParent)
|
||||
|
||||
mParent = aParent;
|
||||
mIndexInParent = aIndexInParent;
|
||||
|
||||
mParent->InvalidateChildrenGroupInfo();
|
||||
}
|
||||
|
||||
// Accessible protected
|
||||
void
|
||||
Accessible::UnbindFromParent()
|
||||
{
|
||||
mParent->InvalidateChildrenGroupInfo();
|
||||
mParent = nullptr;
|
||||
mIndexInParent = -1;
|
||||
mIndexOfEmbeddedChild = -1;
|
||||
@ -3127,13 +3131,29 @@ Accessible::GetActionRule()
|
||||
AccGroupInfo*
|
||||
Accessible::GetGroupInfo()
|
||||
{
|
||||
if (mGroupInfo)
|
||||
if (mGroupInfo){
|
||||
if (HasDirtyGroupInfo()) {
|
||||
mGroupInfo->Update();
|
||||
SetDirtyGroupInfo(false);
|
||||
}
|
||||
|
||||
return mGroupInfo;
|
||||
}
|
||||
|
||||
mGroupInfo = AccGroupInfo::CreateGroupInfo(this);
|
||||
return mGroupInfo;
|
||||
}
|
||||
|
||||
void
|
||||
Accessible::InvalidateChildrenGroupInfo()
|
||||
{
|
||||
uint32_t length = mChildren.Length();
|
||||
for (uint32_t i = 0; i < length; i++) {
|
||||
Accessible* child = mChildren[i];
|
||||
child->SetDirtyGroupInfo(true);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Accessible::GetPositionAndSizeInternal(int32_t *aPosInSet, int32_t *aSetSize)
|
||||
{
|
||||
@ -3215,13 +3235,13 @@ Accessible::GetLevelInternal()
|
||||
void
|
||||
Accessible::StaticAsserts() const
|
||||
{
|
||||
static_assert(eLastChildrenFlag <= (2 << kChildrenFlagsBits) - 1,
|
||||
static_assert(eLastChildrenFlag <= (1 << kChildrenFlagsBits) - 1,
|
||||
"Accessible::mChildrenFlags was oversized by eLastChildrenFlag!");
|
||||
static_assert(eLastStateFlag <= (2 << kStateFlagsBits) - 1,
|
||||
static_assert(eLastStateFlag <= (1 << kStateFlagsBits) - 1,
|
||||
"Accessible::mStateFlags was oversized by eLastStateFlag!");
|
||||
static_assert(eLastAccType <= (2 << kTypeBits) - 1,
|
||||
static_assert(eLastAccType <= (1 << kTypeBits) - 1,
|
||||
"Accessible::mType was oversized by eLastAccType!");
|
||||
static_assert(eLastAccGenericType <= (2 << kGenericTypesBits) - 1,
|
||||
static_assert(eLastAccGenericType <= (1 << kGenericTypesBits) - 1,
|
||||
"Accessible::mGenericType was oversized by eLastAccGenericType!");
|
||||
}
|
||||
|
||||
|
@ -765,6 +765,11 @@ public:
|
||||
bool IsNodeMapEntry() const
|
||||
{ return HasOwnContent() && !(mStateFlags & eNotNodeMapEntry); }
|
||||
|
||||
/**
|
||||
* Return true if the accessible's group info needs to be updated.
|
||||
*/
|
||||
inline bool HasDirtyGroupInfo() const { return mStateFlags & eGroupInfoDirty; }
|
||||
|
||||
/**
|
||||
* Return true if the accessible has associated DOM content.
|
||||
*/
|
||||
@ -856,9 +861,10 @@ protected:
|
||||
eSharedNode = 1 << 2, // accessible shares DOM node from another accessible
|
||||
eNotNodeMapEntry = 1 << 3, // accessible shouldn't be in document node map
|
||||
eHasNumericValue = 1 << 4, // accessible has a numeric value
|
||||
eIgnoreDOMUIEvent = 1 << 5, // don't process DOM UI events for a11y events
|
||||
eGroupInfoDirty = 1 << 5, // accessible needs to update group info
|
||||
eIgnoreDOMUIEvent = 1 << 6, // don't process DOM UI events for a11y events
|
||||
|
||||
eLastStateFlag = eHasNumericValue
|
||||
eLastStateFlag = eGroupInfoDirty
|
||||
};
|
||||
|
||||
protected:
|
||||
@ -938,6 +944,22 @@ protected:
|
||||
*/
|
||||
AccGroupInfo* GetGroupInfo();
|
||||
|
||||
/**
|
||||
* Set dirty state of the accessible's group info.
|
||||
*/
|
||||
inline void SetDirtyGroupInfo(bool aIsDirty)
|
||||
{
|
||||
if (aIsDirty)
|
||||
mStateFlags |= eGroupInfoDirty;
|
||||
else
|
||||
mStateFlags &= ~eGroupInfoDirty;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flag all children group info as needing to be updated.
|
||||
*/
|
||||
void InvalidateChildrenGroupInfo();
|
||||
|
||||
// Data Members
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
DocAccessible* mDoc;
|
||||
@ -947,7 +969,7 @@ protected:
|
||||
int32_t mIndexInParent;
|
||||
|
||||
static const uint8_t kChildrenFlagsBits = 2;
|
||||
static const uint8_t kStateFlagsBits = 5;
|
||||
static const uint8_t kStateFlagsBits = 6;
|
||||
static const uint8_t kTypeBits = 6;
|
||||
static const uint8_t kGenericTypesBits = 12;
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
||||
src="../common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../attributes.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../events.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
function doTest()
|
||||
@ -184,6 +186,15 @@
|
||||
testGroupAttrs("combo1_opt3", 3, 4);
|
||||
testGroupAttrs("combo1_opt4", 4, 4);
|
||||
|
||||
// Test that group position information updates after deleting node.
|
||||
testGroupAttrs("tree4_ti1", 1, 2, 1);
|
||||
testGroupAttrs("tree4_ti2", 2, 2, 1);
|
||||
var tree4element = document.getElementById("tree4_ti1");
|
||||
var tree4acc = getAccessible("tree4");
|
||||
tree4element.parentNode.removeChild(tree4element);
|
||||
waitForEvent(EVENT_REORDER, tree4acc, function() {
|
||||
testGroupAttrs("tree4_ti2", 1, 1, 1); });
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
||||
@ -198,6 +209,11 @@
|
||||
title="Expose level for nested lists in HTML">
|
||||
Mozilla Bug 468418
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=844023"
|
||||
title="group info might not be properly updated when flat trees mutate">
|
||||
Bug 844023
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=864224"
|
||||
title="Support nested ARIA listitems structured by role='group'">
|
||||
@ -377,6 +393,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- IMPORTANT: Need to have no whitespace between elements in this tree. -->
|
||||
<div role="tree" id="tree4"><div role="treeitem"
|
||||
id="tree4_ti1">Item 1</div><div role="treeitem"
|
||||
id="tree4_ti2">Item 2</div></div>
|
||||
|
||||
<table role="grid">
|
||||
<tr role="row" id="grid_row1">
|
||||
<td role="gridcell" id="grid_cell1">cell1</td>
|
||||
|
@ -898,6 +898,8 @@ pref("apz.y_skate_size_multiplier", "1.5");
|
||||
pref("apz.x_stationary_size_multiplier", "1.5");
|
||||
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);
|
||||
|
||||
// This preference allows FirefoxOS apps (and content, I think) to force
|
||||
// the use of software (instead of hardware accelerated) 2D canvases by
|
||||
|
@ -10,9 +10,6 @@ const DEBUG = false; /* set to false to suppress debug messages */
|
||||
|
||||
const SIDEBAR_CONTRACTID = "@mozilla.org/sidebar;1";
|
||||
const SIDEBAR_CID = Components.ID("{22117140-9c6e-11d3-aaf1-00805f8a4905}");
|
||||
const nsISidebar = Components.interfaces.nsISidebar;
|
||||
const nsISidebarExternal = Components.interfaces.nsISidebarExternal;
|
||||
const nsIClassInfo = Components.interfaces.nsIClassInfo;
|
||||
|
||||
// File extension for Sherlock search plugin description files
|
||||
const SHERLOCK_FILE_EXT_REGEXP = /\.src$/i;
|
||||
@ -119,13 +116,7 @@ function (aSearchURL)
|
||||
return 0;
|
||||
}
|
||||
|
||||
nsSidebar.prototype.classInfo = XPCOMUtils.generateCI({classID: SIDEBAR_CID,
|
||||
contractID: SIDEBAR_CONTRACTID,
|
||||
classDescription: "Sidebar",
|
||||
interfaces: [nsISidebar, nsISidebarExternal],
|
||||
flags: nsIClassInfo.DOM_OBJECT});
|
||||
|
||||
nsSidebar.prototype.QueryInterface = XPCOMUtils.generateQI([nsISidebar, nsISidebarExternal]);
|
||||
nsSidebar.prototype.QueryInterface = XPCOMUtils.generateQI([Components.interfaces.nsISupports]);
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([nsSidebar]);
|
||||
|
||||
|
@ -1,4 +1,2 @@
|
||||
component {22117140-9c6e-11d3-aaf1-00805f8a4905} nsSidebar.js
|
||||
contract @mozilla.org/sidebar;1 {22117140-9c6e-11d3-aaf1-00805f8a4905}
|
||||
category JavaScript-global-property sidebar @mozilla.org/sidebar;1
|
||||
category JavaScript-global-property external @mozilla.org/sidebar;1
|
||||
|
@ -12,8 +12,8 @@
|
||||
"filename": "gcc.tar.xz"
|
||||
},
|
||||
{
|
||||
"size": 150816,
|
||||
"digest": "af25ecf03b65795d21f011939984b130db167a4efc4f306700f373854f9d7ae664662cb7812c3d737eace7f3735324daa6eb540b5e42f90189b0d9a8dd5f4c9f",
|
||||
"size": 160232,
|
||||
"digest": "8656c3fc2daa66839ec81a0edbd9759040a83c7a41c3e472d7f90508b80eefd008b87305dc8549b4ff6098dc33fe17fedc9b4eb76cf5307d5f22dae925c033db",
|
||||
"algorithm": "sha512",
|
||||
"filename": "sccache.tar.xz"
|
||||
}
|
||||
|
@ -12,8 +12,8 @@
|
||||
"filename": "gcc.tar.xz"
|
||||
},
|
||||
{
|
||||
"size": 150816,
|
||||
"digest": "af25ecf03b65795d21f011939984b130db167a4efc4f306700f373854f9d7ae664662cb7812c3d737eace7f3735324daa6eb540b5e42f90189b0d9a8dd5f4c9f",
|
||||
"size": 160232,
|
||||
"digest": "8656c3fc2daa66839ec81a0edbd9759040a83c7a41c3e472d7f90508b80eefd008b87305dc8549b4ff6098dc33fe17fedc9b4eb76cf5307d5f22dae925c033db",
|
||||
"algorithm": "sha512",
|
||||
"filename": "sccache.tar.xz"
|
||||
}
|
||||
|
8
browser/config/tooltool-manifests/win32/releng.manifest
Normal file
8
browser/config/tooltool-manifests/win32/releng.manifest
Normal file
@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"size": 266240,
|
||||
"digest": "bb345b0e700ffab4d09436981f14b5de84da55a3f18a7f09ebc4364a4488acdeab8d46f447b12ac70f2da1444a68b8ce8b8675f0dae2ccf845e966d1df0f0869",
|
||||
"algorithm": "sha512",
|
||||
"filename": "mozmake.exe"
|
||||
}
|
||||
]
|
8
browser/config/tooltool-manifests/win64/releng.manifest
Normal file
8
browser/config/tooltool-manifests/win64/releng.manifest
Normal file
@ -0,0 +1,8 @@
|
||||
[
|
||||
{
|
||||
"size": 266240,
|
||||
"digest": "bb345b0e700ffab4d09436981f14b5de84da55a3f18a7f09ebc4364a4488acdeab8d46f447b12ac70f2da1444a68b8ce8b8675f0dae2ccf845e966d1df0f0869",
|
||||
"algorithm": "sha512",
|
||||
"filename": "mozmake.exe"
|
||||
}
|
||||
]
|
@ -66,5 +66,6 @@ MOZ_PAY=1
|
||||
MOZ_ACTIVITIES=1
|
||||
MOZ_JSDOWNLOADS=1
|
||||
MOZ_WEBM_ENCODER=1
|
||||
# Enable exact rooting on desktop.
|
||||
# Enable exact rooting and generational GC on desktop.
|
||||
JSGC_USE_EXACT_ROOTING=1
|
||||
JSGC_GENERATIONAL=1
|
||||
|
@ -69,7 +69,6 @@ Sidebar.prototype = {
|
||||
return true;
|
||||
},
|
||||
|
||||
// =========================== nsISidebar ===========================
|
||||
// The suggestedTitle and suggestedCategory parameters are ignored, but remain
|
||||
// for backward compatibility.
|
||||
addSearchEngine: function addSearchEngine(engineURL, iconURL, suggestedTitle,
|
||||
@ -92,7 +91,6 @@ Sidebar.prototype = {
|
||||
Services.search.addEngine(engineURL, dataType, iconURL, true);
|
||||
},
|
||||
|
||||
// =========================== nsISidebarExternal ===========================
|
||||
// This function exists to implement window.external.AddSearchProvider(),
|
||||
// to match other browsers' APIs. The capitalization, although nonstandard here,
|
||||
// is therefore important.
|
||||
@ -122,17 +120,8 @@ Sidebar.prototype = {
|
||||
return 0;
|
||||
},
|
||||
|
||||
// =========================== nsIClassInfo ===========================
|
||||
classInfo: XPCOMUtils.generateCI({classID: SIDEBAR_CID,
|
||||
contractID: SIDEBAR_CONTRACTID,
|
||||
interfaces: [Ci.nsISidebar,
|
||||
Ci.nsISidebarExternal],
|
||||
flags: Ci.nsIClassInfo.DOM_OBJECT,
|
||||
classDescription: "Sidebar"}),
|
||||
|
||||
// =========================== nsISupports ===========================
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsISidebar,
|
||||
Ci.nsISidebarExternal]),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupports]),
|
||||
|
||||
// XPCOMUtils stuff
|
||||
classID: SIDEBAR_CID,
|
||||
|
@ -22,8 +22,6 @@ category xpcom-directory-providers browser-directory-provider @mozilla.org/brows
|
||||
# Sidebar.js
|
||||
component {22117140-9c6e-11d3-aaf1-00805f8a4905} Sidebar.js
|
||||
contract @mozilla.org/sidebar;1 {22117140-9c6e-11d3-aaf1-00805f8a4905}
|
||||
category JavaScript-global-property sidebar @mozilla.org/sidebar;1
|
||||
category JavaScript-global-property external @mozilla.org/sidebar;1
|
||||
category wakeup-request Sidebar @mozilla.org/sidebar;1,nsISidebarExternal,getService,Sidebar:AddSearchProvider
|
||||
|
||||
# SessionStore.js
|
||||
|
@ -22,4 +22,6 @@ else
|
||||
mk_add_options "export SCCACHE_BUCKET=$bucket"
|
||||
mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
|
||||
ac_add_options "--with-compiler-wrapper=python2.7 $topsrcdir/sccache/sccache.py"
|
||||
mk_add_options MOZ_PREFLIGHT+=build/sccache.mk
|
||||
mk_add_options MOZ_POSTFLIGHT+=build/sccache.mk
|
||||
fi
|
||||
|
@ -12,6 +12,20 @@ import pymake.command, pymake.process
|
||||
import gc
|
||||
|
||||
if __name__ == '__main__':
|
||||
if 'TINDERBOX_OUTPUT' in os.environ:
|
||||
# When building on mozilla build slaves, execute mozmake instead. Until bug
|
||||
# 978211, this is the easiest, albeit hackish, way to do this.
|
||||
import subprocess
|
||||
mozmake = os.path.join(os.path.dirname(__file__), '..', '..',
|
||||
'mozmake.exe')
|
||||
if os.path.exists(mozmake):
|
||||
cmd = [mozmake]
|
||||
cmd.extend(sys.argv[1:])
|
||||
shell = os.environ.get('SHELL')
|
||||
if shell and not shell.lower().endswith('.exe'):
|
||||
cmd += ['SHELL=%s.exe' % shell]
|
||||
sys.exit(subprocess.call(cmd))
|
||||
|
||||
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
|
||||
sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)
|
||||
|
||||
|
7
build/sccache.mk
Normal file
7
build/sccache.mk
Normal file
@ -0,0 +1,7 @@
|
||||
preflight:
|
||||
# Terminate any sccache server that might still be around
|
||||
-python2.7 $(TOPSRCDIR)/sccache/sccache.py > /dev/null 2>&1
|
||||
|
||||
postflight:
|
||||
# Terminate sccache server. This prints sccache stats.
|
||||
-python2.7 $(TOPSRCDIR)/sccache/sccache.py
|
@ -28,8 +28,8 @@ protected:
|
||||
virtual ~nsBasePrincipal();
|
||||
|
||||
public:
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void);
|
||||
NS_IMETHOD_(nsrefcnt) Release(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release(void);
|
||||
NS_IMETHOD GetCsp(nsIContentSecurityPolicy** aCsp);
|
||||
NS_IMETHOD SetCsp(nsIContentSecurityPolicy* aCsp);
|
||||
public:
|
||||
|
@ -35,7 +35,7 @@ NS_IMPL_CI_INTERFACE_GETTER2(nsNullPrincipal,
|
||||
nsIPrincipal,
|
||||
nsISerializable)
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsNullPrincipal::AddRef()
|
||||
{
|
||||
NS_PRECONDITION(int32_t(refcount) >= 0, "illegal refcnt");
|
||||
@ -44,7 +44,7 @@ nsNullPrincipal::AddRef()
|
||||
return count;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsNullPrincipal::Release()
|
||||
{
|
||||
NS_PRECONDITION(0 != refcount, "dup release");
|
||||
|
@ -46,7 +46,7 @@ static bool URIIsImmutable(nsIURI* aURI)
|
||||
// Static member variables
|
||||
const char nsBasePrincipal::sInvalid[] = "Invalid";
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsBasePrincipal::AddRef()
|
||||
{
|
||||
NS_PRECONDITION(int32_t(refcount) >= 0, "illegal refcnt");
|
||||
@ -56,7 +56,7 @@ nsBasePrincipal::AddRef()
|
||||
return count;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsBasePrincipal::Release()
|
||||
{
|
||||
NS_PRECONDITION(0 != refcount, "dup release");
|
||||
|
@ -29,7 +29,7 @@ NS_IMPL_CI_INTERFACE_GETTER2(nsSystemPrincipal,
|
||||
nsIPrincipal,
|
||||
nsISerializable)
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsSystemPrincipal::AddRef()
|
||||
{
|
||||
NS_PRECONDITION(int32_t(refcount) >= 0, "illegal refcnt");
|
||||
@ -38,7 +38,7 @@ nsSystemPrincipal::AddRef()
|
||||
return count;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsSystemPrincipal::Release()
|
||||
{
|
||||
NS_PRECONDITION(0 != refcount, "dup release");
|
||||
|
@ -22,6 +22,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=758258
|
||||
|
||||
var Ci = Components.interfaces;
|
||||
|
||||
if (navigator.platform.startsWith("Mac")) {
|
||||
SimpleTest.expectAssertions(2);
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
/*
|
||||
|
12
configure.in
12
configure.in
@ -4012,6 +4012,7 @@ NSS_NO_LIBPKIX=
|
||||
MOZ_CONTENT_SANDBOX=
|
||||
MOZ_CONTENT_SANDBOX_REPORTER=1
|
||||
JSGC_USE_EXACT_ROOTING=
|
||||
JSGC_GENERATIONAL=
|
||||
|
||||
case "$target_os" in
|
||||
mingw*)
|
||||
@ -7210,10 +7211,10 @@ fi
|
||||
dnl ========================================================
|
||||
dnl = Use generational GC
|
||||
dnl ========================================================
|
||||
MOZ_ARG_ENABLE_BOOL(gcgenerational,
|
||||
[ --enable-gcgenerational Enable generational GC],
|
||||
JSGC_GENERATIONAL=1,
|
||||
JSGC_GENERATIONAL= )
|
||||
MOZ_ARG_DISABLE_BOOL(gcgenerational,
|
||||
[ --disable-gcgenerational Disable generational GC],
|
||||
JSGC_GENERATIONAL= ,
|
||||
JSGC_GENERATIONAL=1 )
|
||||
if test -n "$JSGC_GENERATIONAL"; then
|
||||
AC_DEFINE(JSGC_GENERATIONAL)
|
||||
fi
|
||||
@ -9228,6 +9229,9 @@ fi
|
||||
if test -z "$JSGC_USE_EXACT_ROOTING" ; then
|
||||
ac_configure_args="$ac_configure_args --disable-exact-rooting"
|
||||
fi
|
||||
if test -z "$JSGC_GENERATIONAL" ; then
|
||||
ac_configure_args="$ac_configure_args --disable-gcgenerational"
|
||||
fi
|
||||
if test -z "$MOZ_NATIVE_NSPR"; then
|
||||
ac_configure_args="$ac_configure_args --with-nspr-cflags='$NSPR_CFLAGS'"
|
||||
ac_configure_args="$ac_configure_args --with-nspr-libs='$NSPR_LIBS'"
|
||||
|
@ -1634,8 +1634,8 @@ public:
|
||||
*
|
||||
* @return the document associated with the script context
|
||||
*/
|
||||
static already_AddRefed<nsIDocument>
|
||||
GetDocumentFromScriptContext(nsIScriptContext *aScriptContext);
|
||||
static nsIDocument*
|
||||
GetDocumentFromScriptContext(nsIScriptContext* aScriptContext);
|
||||
|
||||
static bool CheckMayLoad(nsIPrincipal* aPrincipal, nsIChannel* aChannel, bool aAllowIfInheritsPrincipal);
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "mozilla/dom/Comment.h"
|
||||
#include "mozilla/dom/CommentBinding.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace dom;
|
||||
@ -49,7 +50,7 @@ Comment::List(FILE* out, int32_t aIndent) const
|
||||
int32_t indx;
|
||||
for (indx = aIndent; --indx >= 0; ) fputs(" ", out);
|
||||
|
||||
fprintf(out, "Comment@%p refcount=%d<!--", (void*)this, mRefCnt.get());
|
||||
fprintf(out, "Comment@%p refcount=%" PRIuPTR "<!--", (void*)this, mRefCnt.get());
|
||||
|
||||
nsAutoString tmp;
|
||||
ToCString(tmp, 0, mText.GetLength());
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "mozilla/dom/DocumentFragmentBinding.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -72,7 +73,7 @@ DocumentFragment::List(FILE* out, int32_t aIndent) const
|
||||
fprintf(out, "DocumentFragment@%p", (void *)this);
|
||||
|
||||
fprintf(out, " flags=[%08x]", static_cast<unsigned int>(GetFlags()));
|
||||
fprintf(out, " refcount=%d<", mRefCnt.get());
|
||||
fprintf(out, " refcount=%" PRIuPTR "<", mRefCnt.get());
|
||||
|
||||
nsIContent* child = GetFirstChild();
|
||||
if (child) {
|
||||
|
@ -128,6 +128,7 @@
|
||||
#include "nsITextControlElement.h"
|
||||
#include "nsISupportsImpl.h"
|
||||
#include "mozilla/dom/DocumentFragment.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
@ -2199,7 +2200,7 @@ Element::List(FILE* out, int32_t aIndent,
|
||||
fprintf(out, " ranges:%d", ranges ? ranges->Count() : 0);
|
||||
}
|
||||
fprintf(out, " primaryframe=%p", static_cast<void*>(GetPrimaryFrame()));
|
||||
fprintf(out, " refcount=%d<", mRefCnt.get());
|
||||
fprintf(out, " refcount=%" PRIuPTR "<", mRefCnt.get());
|
||||
|
||||
nsIContent* child = GetFirstChild();
|
||||
if (child) {
|
||||
|
@ -520,10 +520,6 @@ FragmentOrElement::nsDOMSlots::~nsDOMSlots()
|
||||
if (mAttributeMap) {
|
||||
mAttributeMap->DropReference();
|
||||
}
|
||||
|
||||
if (mClassList) {
|
||||
mClassList->DropReference();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -589,10 +585,7 @@ FragmentOrElement::nsDOMSlots::Unlink(bool aIsXUL)
|
||||
mChildrenList = nullptr;
|
||||
mUndoManager = nullptr;
|
||||
mCustomElementData = nullptr;
|
||||
if (mClassList) {
|
||||
mClassList->DropReference();
|
||||
mClassList = nullptr;
|
||||
}
|
||||
mClassList = nullptr;
|
||||
}
|
||||
|
||||
size_t
|
||||
@ -1251,10 +1244,10 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(FragmentOrElement)
|
||||
|
||||
if (tmp->HasProperties()) {
|
||||
if (tmp->IsHTML()) {
|
||||
tmp->DeleteProperty(nsGkAtoms::microdataProperties);
|
||||
tmp->DeleteProperty(nsGkAtoms::itemtype);
|
||||
tmp->DeleteProperty(nsGkAtoms::itemref);
|
||||
tmp->DeleteProperty(nsGkAtoms::itemprop);
|
||||
nsIAtom*** props = nsGenericHTMLElement::PropertiesToTraverseAndUnlink();
|
||||
for (uint32_t i = 0; props[i]; ++i) {
|
||||
tmp->DeleteProperty(*props[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1798,15 +1791,12 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(FragmentOrElement)
|
||||
|
||||
if (tmp->HasProperties()) {
|
||||
if (tmp->IsHTML()) {
|
||||
nsISupports* property = static_cast<nsISupports*>
|
||||
(tmp->GetProperty(nsGkAtoms::microdataProperties));
|
||||
cb.NoteXPCOMChild(property);
|
||||
property = static_cast<nsISupports*>(tmp->GetProperty(nsGkAtoms::itemref));
|
||||
cb.NoteXPCOMChild(property);
|
||||
property = static_cast<nsISupports*>(tmp->GetProperty(nsGkAtoms::itemprop));
|
||||
cb.NoteXPCOMChild(property);
|
||||
property = static_cast<nsISupports*>(tmp->GetProperty(nsGkAtoms::itemtype));
|
||||
cb.NoteXPCOMChild(property);
|
||||
nsIAtom*** props = nsGenericHTMLElement::PropertiesToTraverseAndUnlink();
|
||||
for (uint32_t i = 0; props[i]; ++i) {
|
||||
nsISupports* property =
|
||||
static_cast<nsISupports*>(tmp->GetProperty(*props[i]));
|
||||
cb.NoteXPCOMChild(property);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,3 +229,7 @@ LOCAL_INCLUDES += [
|
||||
'/layout/xul',
|
||||
'/netwerk/base/src',
|
||||
]
|
||||
|
||||
if CONFIG['GNU_CC'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
# Work around bug 986928
|
||||
CXXFLAGS += ['-Wno-error=format']
|
||||
|
@ -5560,21 +5560,20 @@ nsContentUtils::GetUTFNonNullOrigin(nsIURI* aURI, nsString& aOrigin)
|
||||
}
|
||||
|
||||
/* static */
|
||||
already_AddRefed<nsIDocument>
|
||||
nsIDocument*
|
||||
nsContentUtils::GetDocumentFromScriptContext(nsIScriptContext *aScriptContext)
|
||||
{
|
||||
if (!aScriptContext)
|
||||
if (!aScriptContext) {
|
||||
return nullptr;
|
||||
|
||||
nsCOMPtr<nsIDOMWindow> window =
|
||||
do_QueryInterface(aScriptContext->GetGlobalObject());
|
||||
nsCOMPtr<nsIDocument> doc;
|
||||
if (window) {
|
||||
nsCOMPtr<nsIDOMDocument> domdoc;
|
||||
window->GetDocument(getter_AddRefs(domdoc));
|
||||
doc = do_QueryInterface(domdoc);
|
||||
}
|
||||
return doc.forget();
|
||||
|
||||
nsCOMPtr<nsPIDOMWindow> window =
|
||||
do_QueryInterface(aScriptContext->GetGlobalObject());
|
||||
if (!window) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return window->GetDoc();
|
||||
}
|
||||
|
||||
/* static */
|
||||
|
@ -29,7 +29,7 @@ nsDOMTokenList::nsDOMTokenList(Element* aElement, nsIAtom* aAttrAtom)
|
||||
|
||||
nsDOMTokenList::~nsDOMTokenList() { }
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(nsDOMTokenList)
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(nsDOMTokenList, mElement)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsDOMTokenList)
|
||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||
@ -40,12 +40,6 @@ NS_INTERFACE_MAP_END
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDOMTokenList)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(nsDOMTokenList)
|
||||
|
||||
void
|
||||
nsDOMTokenList::DropReference()
|
||||
{
|
||||
mElement = nullptr;
|
||||
}
|
||||
|
||||
const nsAttrValue*
|
||||
nsDOMTokenList::GetParsedAttr()
|
||||
{
|
||||
|
@ -37,8 +37,6 @@ public:
|
||||
|
||||
nsDOMTokenList(Element* aElement, nsIAtom* aAttrAtom);
|
||||
|
||||
void DropReference();
|
||||
|
||||
virtual JSObject* WrapObject(JSContext *cx,
|
||||
JS::Handle<JSObject*> scope) MOZ_OVERRIDE;
|
||||
|
||||
@ -80,7 +78,7 @@ protected:
|
||||
const nsTArray<nsString>& aTokens);
|
||||
inline const nsAttrValue* GetParsedAttr();
|
||||
|
||||
Element* mElement;
|
||||
nsCOMPtr<Element> mElement;
|
||||
nsCOMPtr<nsIAtom> mAttrAtom;
|
||||
};
|
||||
|
||||
|
@ -1783,7 +1783,7 @@ NS_INTERFACE_MAP_END
|
||||
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsDocument)
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
nsDocument::Release()
|
||||
{
|
||||
NS_PRECONDITION(0 != mRefCnt, "dup release");
|
||||
|
@ -1040,8 +1040,6 @@ nsScriptLoader::EvaluateScript(nsScriptLoadRequest* aRequest,
|
||||
const nsAFlatString& aScript,
|
||||
void** aOffThreadToken)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
// We need a document to evaluate scripts.
|
||||
if (!mDocument) {
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -1070,6 +1068,11 @@ nsScriptLoader::EvaluateScript(nsScriptLoadRequest* aRequest,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
JSVersion version = JSVersion(aRequest->mJSVersion);
|
||||
if (version == JSVERSION_UNKNOWN) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// New script entry point required, due to the "Create a script" sub-step of
|
||||
// http://www.whatwg.org/specs/web-apps/current-work/#execute-the-script-block
|
||||
AutoEntryScript entryScript(globalObject, true, context->GetNativeContext());
|
||||
@ -1083,14 +1086,12 @@ nsScriptLoader::EvaluateScript(nsScriptLoadRequest* aRequest,
|
||||
nsCOMPtr<nsIScriptElement> oldCurrent = mCurrentScript;
|
||||
mCurrentScript = aRequest->mElement;
|
||||
|
||||
JSVersion version = JSVersion(aRequest->mJSVersion);
|
||||
if (version != JSVERSION_UNKNOWN) {
|
||||
JS::CompileOptions options(entryScript.cx());
|
||||
FillCompileOptionsForRequest(aRequest, global, &options);
|
||||
nsJSUtils::EvaluateOptions evalOptions;
|
||||
rv = nsJSUtils::EvaluateString(entryScript.cx(), aScript, global, options,
|
||||
evalOptions, nullptr, aOffThreadToken);
|
||||
}
|
||||
JS::CompileOptions options(entryScript.cx());
|
||||
FillCompileOptionsForRequest(aRequest, global, &options);
|
||||
nsJSUtils::EvaluateOptions evalOptions;
|
||||
nsresult rv = nsJSUtils::EvaluateString(entryScript.cx(), aScript, global,
|
||||
options, evalOptions, nullptr,
|
||||
aOffThreadToken);
|
||||
|
||||
// Put the old script back in case it wants to do anything else.
|
||||
mCurrentScript = oldCurrent;
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsStubMutationObserver.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
#ifdef DEBUG
|
||||
#include "nsRange.h"
|
||||
#endif
|
||||
@ -169,7 +170,7 @@ nsTextNode::List(FILE* out, int32_t aIndent) const
|
||||
fprintf(out, " ranges:%d", ranges ? ranges->Count() : 0);
|
||||
}
|
||||
fprintf(out, " primaryframe=%p", static_cast<void*>(GetPrimaryFrame()));
|
||||
fprintf(out, " refcount=%d<", mRefCnt.get());
|
||||
fprintf(out, " refcount=%" PRIuPTR "<", mRefCnt.get());
|
||||
|
||||
nsAutoString tmp;
|
||||
ToCString(tmp, 0, mText.GetLength());
|
||||
|
@ -272,9 +272,10 @@ class HTMLInputElementState MOZ_FINAL : public nsISupports
|
||||
bool mCheckedSet;
|
||||
};
|
||||
|
||||
NS_IMPL_ISUPPORTS1(HTMLInputElementState, HTMLInputElementState)
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(HTMLInputElementState, NS_INPUT_ELEMENT_STATE_IID)
|
||||
|
||||
NS_IMPL_ISUPPORTS1(HTMLInputElementState, HTMLInputElementState)
|
||||
|
||||
HTMLInputElement::nsFilePickerShownCallback::nsFilePickerShownCallback(
|
||||
HTMLInputElement* aInput, nsIFilePicker* aFilePicker)
|
||||
: mFilePicker(aFilePicker)
|
||||
|
@ -30,9 +30,6 @@ HTMLOutputElement::HTMLOutputElement(already_AddRefed<nsINodeInfo>& aNodeInfo)
|
||||
|
||||
HTMLOutputElement::~HTMLOutputElement()
|
||||
{
|
||||
if (mTokenList) {
|
||||
mTokenList->DropReference();
|
||||
}
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLOutputElement)
|
||||
@ -40,10 +37,7 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(HTMLOutputElement)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(HTMLOutputElement,
|
||||
nsGenericHTMLFormElement)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mValidity)
|
||||
if (tmp->mTokenList) {
|
||||
tmp->mTokenList->DropReference();
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTokenList)
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTokenList)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(HTMLOutputElement,
|
||||
nsGenericHTMLFormElement)
|
||||
|
@ -41,7 +41,6 @@ namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
NS_IMPL_ISUPPORTS1(SelectState, SelectState)
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(SelectState, NS_SELECT_STATE_IID)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//
|
||||
|
@ -77,6 +77,8 @@ private:
|
||||
nsCheapSet<nsUint32HashKey> mIndices;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(SelectState, NS_SELECT_STATE_IID)
|
||||
|
||||
class MOZ_STACK_CLASS SafeOptionListMutation
|
||||
{
|
||||
public:
|
||||
|
@ -183,6 +183,5 @@ LOCAL_INCLUDES += [
|
||||
'/layout/tables',
|
||||
'/layout/xul',
|
||||
'/netwerk/base/src',
|
||||
'/xpcom/ds',
|
||||
]
|
||||
|
||||
|
@ -3142,13 +3142,42 @@ nsDOMSettableTokenListPropertyDestructor(void *aObject, nsIAtom *aProperty,
|
||||
{
|
||||
nsDOMSettableTokenList* list =
|
||||
static_cast<nsDOMSettableTokenList*>(aPropertyValue);
|
||||
list->DropReference();
|
||||
NS_RELEASE(list);
|
||||
}
|
||||
|
||||
static nsIAtom** sPropertiesToTraverseAndUnlink[] =
|
||||
{
|
||||
&nsGkAtoms::microdataProperties,
|
||||
&nsGkAtoms::itemtype,
|
||||
&nsGkAtoms::itemref,
|
||||
&nsGkAtoms::itemprop,
|
||||
&nsGkAtoms::sandbox,
|
||||
nullptr
|
||||
};
|
||||
|
||||
// static
|
||||
nsIAtom***
|
||||
nsGenericHTMLElement::PropertiesToTraverseAndUnlink()
|
||||
{
|
||||
return sPropertiesToTraverseAndUnlink;
|
||||
}
|
||||
|
||||
nsDOMSettableTokenList*
|
||||
nsGenericHTMLElement::GetTokenList(nsIAtom* aAtom)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
nsIAtom*** props =
|
||||
nsGenericHTMLElement::PropertiesToTraverseAndUnlink();
|
||||
bool found = false;
|
||||
for (uint32_t i = 0; props[i]; ++i) {
|
||||
if (*props[i] == aAtom) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
MOZ_ASSERT(found, "Trying to use an unknown tokenlist!");
|
||||
#endif
|
||||
|
||||
nsDOMSettableTokenList* list = nullptr;
|
||||
if (HasProperties()) {
|
||||
list = static_cast<nsDOMSettableTokenList*>(GetProperty(aAtom));
|
||||
|
@ -296,6 +296,7 @@ public:
|
||||
return rcFrame.height;
|
||||
}
|
||||
|
||||
static nsIAtom*** PropertiesToTraverseAndUnlink();
|
||||
protected:
|
||||
// These methods are used to implement element-specific behavior of Get/SetItemValue
|
||||
// when an element has @itemprop but no @itemscope.
|
||||
|
@ -39,7 +39,6 @@ LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
'/dom/events',
|
||||
'/layout/style',
|
||||
'/xpcom/ds',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
|
@ -1316,6 +1316,8 @@ void MediaDecoder::DurationChanged()
|
||||
// Duration has changed so we should recompute playback rate
|
||||
UpdatePlaybackRate();
|
||||
|
||||
SetInfinite(mDuration == -1);
|
||||
|
||||
if (mOwner && oldDuration != mDuration && !IsInfinite()) {
|
||||
DECODER_LOG(PR_LOG_DEBUG, ("%p duration changed to %lld", this, mDuration));
|
||||
mOwner->DispatchEvent(NS_LITERAL_STRING("durationchange"));
|
||||
|
@ -397,6 +397,9 @@ RtspMediaResource::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
return size;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// RtspMediaResource::Listener
|
||||
//----------------------------------------------------------------------------
|
||||
NS_IMPL_ISUPPORTS2(RtspMediaResource::Listener,
|
||||
nsIInterfaceRequestor, nsIStreamingProtocolListener);
|
||||
|
||||
@ -435,6 +438,15 @@ RtspMediaResource::Listener::GetInterface(const nsIID & aIID, void **aResult)
|
||||
return QueryInterface(aIID, aResult);
|
||||
}
|
||||
|
||||
void
|
||||
RtspMediaResource::Listener::Revoke()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Don't call on non-main thread");
|
||||
if (mResource) {
|
||||
mResource = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
RtspMediaResource::ReadFrameFromTrack(uint8_t* aBuffer, uint32_t aBufferSize,
|
||||
uint32_t aTrackIdx, uint32_t& aBytes,
|
||||
@ -595,25 +607,27 @@ RtspMediaResource::OnDisconnected(uint8_t aTrackIdx, nsresult aReason)
|
||||
mTrackBuffer[i]->Reset();
|
||||
}
|
||||
|
||||
// If mDecoder is null pointer, it means this OnDisconnected event is
|
||||
// triggered when media element was destroyed and mDecoder was already
|
||||
// shutdown.
|
||||
if (!mDecoder) {
|
||||
return NS_OK;
|
||||
if (mDecoder) {
|
||||
if (aReason == NS_ERROR_NOT_INITIALIZED ||
|
||||
aReason == NS_ERROR_CONNECTION_REFUSED ||
|
||||
aReason == NS_ERROR_NOT_CONNECTED ||
|
||||
aReason == NS_ERROR_NET_TIMEOUT) {
|
||||
// Report error code to Decoder.
|
||||
RTSPMLOG("Error in OnDisconnected 0x%x", aReason);
|
||||
mDecoder->NetworkError();
|
||||
} else {
|
||||
// Resetting the decoder and media element when the connection
|
||||
// between RTSP client and server goes down.
|
||||
mDecoder->ResetConnectionState();
|
||||
}
|
||||
}
|
||||
|
||||
if (aReason == NS_ERROR_NOT_INITIALIZED ||
|
||||
aReason == NS_ERROR_CONNECTION_REFUSED ||
|
||||
aReason == NS_ERROR_NOT_CONNECTED ||
|
||||
aReason == NS_ERROR_NET_TIMEOUT) {
|
||||
RTSPMLOG("Error in OnDisconnected 0x%x", aReason);
|
||||
mDecoder->NetworkError();
|
||||
return NS_OK;
|
||||
if (mListener) {
|
||||
// Note: Listener's Revoke() kills its reference to us, which means it would
|
||||
// release |this| object. So, ensure it is called in the end of this method.
|
||||
mListener->Revoke();
|
||||
}
|
||||
|
||||
// Resetting the decoder and media element when the connection
|
||||
// between Rtsp client and server goes down.
|
||||
mDecoder->ResetConnectionState();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ public:
|
||||
// mMediaStreamController's callback function.
|
||||
// It holds RtspMediaResource reference to notify the connection status and
|
||||
// data arrival. The Revoke function releases the reference when
|
||||
// RtspMediaResource is destroyed.
|
||||
// RtspMediaResource::OnDisconnected is called.
|
||||
class Listener MOZ_FINAL : public nsIInterfaceRequestor,
|
||||
public nsIStreamingProtocolListener
|
||||
{
|
||||
@ -209,7 +209,7 @@ public:
|
||||
NS_DECL_NSIINTERFACEREQUESTOR
|
||||
NS_DECL_NSISTREAMINGPROTOCOLLISTENER
|
||||
|
||||
void Revoke() { mResource = nullptr; }
|
||||
void Revoke();
|
||||
|
||||
private:
|
||||
nsRefPtr<RtspMediaResource> mResource;
|
||||
|
@ -118,7 +118,7 @@ SharedThreadPool::Get(const nsCString& aName, uint32_t aThreadLimit)
|
||||
return instance.forget();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt) SharedThreadPool::AddRef(void)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType) SharedThreadPool::AddRef(void)
|
||||
{
|
||||
MOZ_ASSERT(sMonitor);
|
||||
ReentrantMonitorAutoEnter mon(*sMonitor);
|
||||
@ -128,7 +128,7 @@ NS_IMETHODIMP_(nsrefcnt) SharedThreadPool::AddRef(void)
|
||||
return count;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt) SharedThreadPool::Release(void)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType) SharedThreadPool::Release(void)
|
||||
{
|
||||
MOZ_ASSERT(sMonitor);
|
||||
bool dispatchShutdownEvent;
|
||||
|
@ -44,8 +44,8 @@ public:
|
||||
// are implemented using locking, so it's not recommended that you use them
|
||||
// in a tight loop.
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void);
|
||||
NS_IMETHOD_(nsrefcnt) Release(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release(void);
|
||||
|
||||
// Forward behaviour to wrapped thread pool implementation.
|
||||
NS_FORWARD_SAFE_NSITHREADPOOL(mPool);
|
||||
@ -87,4 +87,4 @@ private:
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // SharedThreadPool_h_
|
||||
#endif // SharedThreadPool_h_
|
||||
|
@ -122,6 +122,7 @@ GST_FUNC(LIBGSTREAMER, gst_buffer_set_size)
|
||||
GST_FUNC(LIBGSTREAMER, gst_buffer_unmap)
|
||||
GST_FUNC(LIBGSTREAMER, gst_element_factory_get_metadata)
|
||||
GST_FUNC(LIBGSTREAMER, gst_event_parse_segment)
|
||||
GST_FUNC(LIBGSTREAMER, gst_event_type_get_name)
|
||||
GST_FUNC(LIBGSTREAMER, gst_memory_init)
|
||||
GST_FUNC(LIBGSTREAMER, gst_memory_map)
|
||||
GST_FUNC(LIBGSTREAMER, gst_memory_unmap)
|
||||
|
@ -32,7 +32,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(AudioNode, nsDOMEventTargetHelper)
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
AudioNode::Release()
|
||||
{
|
||||
if (mRefCnt.get() == 1) {
|
||||
|
@ -29,7 +29,7 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(AudioParam)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_NATIVE_ADDREF(AudioParam)
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
AudioParam::Release()
|
||||
{
|
||||
if (mRefCnt.get() == 1) {
|
||||
|
@ -31,8 +31,8 @@ public:
|
||||
float aDefaultValue);
|
||||
virtual ~AudioParam();
|
||||
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void);
|
||||
NS_IMETHOD_(nsrefcnt) Release(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef(void);
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release(void);
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AudioParam)
|
||||
|
||||
AudioContext* GetParentObject() const
|
||||
|
@ -1,3 +1,7 @@
|
||||
/* 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 "nsGlobalWindow.h"
|
||||
#include "nsDOMWindowUtils.h"
|
||||
#include "nsIDOMClientRect.h"
|
||||
@ -16,26 +20,18 @@
|
||||
#include "VideoUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIPrefService.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
|
||||
NS_IMPL_ISUPPORTS1(MediaEngineTabVideoSource, MediaEngineVideoSource)
|
||||
NS_IMPL_ISUPPORTS2(MediaEngineTabVideoSource, nsIDOMEventListener, nsITimerCallback)
|
||||
|
||||
MediaEngineTabVideoSource::MediaEngineTabVideoSource()
|
||||
: mName(NS_LITERAL_STRING("&getUserMedia.videoDevice.tabShare;")),
|
||||
mUuid(NS_LITERAL_STRING("uuid")),
|
||||
mData(0),
|
||||
mMonitor("MediaEngineTabVideoSource")
|
||||
: mMonitor("MediaEngineTabVideoSource")
|
||||
{
|
||||
}
|
||||
|
||||
MediaEngineTabVideoSource::~MediaEngineTabVideoSource()
|
||||
{
|
||||
if (mData)
|
||||
free(mData);
|
||||
}
|
||||
|
||||
nsresult
|
||||
MediaEngineTabVideoSource::StartRunnable::Run()
|
||||
{
|
||||
@ -111,14 +107,13 @@ MediaEngineTabVideoSource::InitRunnable::Run()
|
||||
void
|
||||
MediaEngineTabVideoSource::GetName(nsAString_internal& aName)
|
||||
{
|
||||
aName.Assign(mName);
|
||||
|
||||
aName.Assign(NS_LITERAL_STRING("&getUserMedia.videoDevice.tabShare;"));
|
||||
}
|
||||
|
||||
void
|
||||
MediaEngineTabVideoSource::GetUUID(nsAString_internal& aUuid)
|
||||
{
|
||||
aUuid.Assign(mUuid);
|
||||
aUuid.Assign(NS_LITERAL_STRING("uuid"));
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -250,7 +245,7 @@ MediaEngineTabVideoSource::Draw() {
|
||||
|
||||
nsRefPtr<layers::ImageContainer> container = layers::LayerManager::CreateImageContainer();
|
||||
nsRefPtr<gfxASurface> surf;
|
||||
surf = new gfxImageSurface(static_cast<unsigned char*>(mData),
|
||||
surf = new gfxImageSurface(mData.rwget(),
|
||||
ThebesIntSize(size), stride, format);
|
||||
if (surf->CairoStatus() != 0) {
|
||||
return;
|
||||
|
@ -17,7 +17,6 @@ class MediaEngineTabVideoSource : public MediaEngineVideoSource, nsIDOMEventList
|
||||
NS_DECL_NSIDOMEVENTLISTENER
|
||||
NS_DECL_NSITIMERCALLBACK
|
||||
MediaEngineTabVideoSource();
|
||||
~MediaEngineTabVideoSource();
|
||||
|
||||
virtual void GetName(nsAString_internal&);
|
||||
virtual void GetUUID(nsAString_internal&);
|
||||
@ -56,11 +55,10 @@ private:
|
||||
int mBufW;
|
||||
int mBufH;
|
||||
int mTimePerFrame;
|
||||
unsigned char *mData;
|
||||
ScopedFreePtr<unsigned char> mData;
|
||||
nsCOMPtr<nsIDOMWindow> mWindow;
|
||||
nsRefPtr<layers::CairoImage> mImage;
|
||||
nsCOMPtr<nsITimer> mTimer;
|
||||
nsAutoString mName, mUuid;
|
||||
Monitor mMonitor;
|
||||
nsCOMPtr<nsITabSource> mTabSource;
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -77,6 +77,8 @@ protected:
|
||||
static EnumInfo sEnumInfo[1];
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(SVGComponentTransferFunctionElement, NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID)
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
|
@ -64,8 +64,6 @@ nsSVGElement::LengthInfo nsSVGFE::sLengthInfo[4] =
|
||||
NS_IMPL_ADDREF_INHERITED(nsSVGFE,nsSVGFEBase)
|
||||
NS_IMPL_RELEASE_INHERITED(nsSVGFE,nsSVGFEBase)
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsSVGFE, NS_SVG_FE_CID)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(nsSVGFE)
|
||||
// nsISupports is an ambiguous base of nsSVGFE so we have to work
|
||||
// around that
|
||||
@ -245,8 +243,6 @@ nsSVGElement::EnumInfo SVGComponentTransferFunctionElement::sEnumInfo[1] =
|
||||
NS_IMPL_ADDREF_INHERITED(SVGComponentTransferFunctionElement,SVGComponentTransferFunctionElementBase)
|
||||
NS_IMPL_RELEASE_INHERITED(SVGComponentTransferFunctionElement,SVGComponentTransferFunctionElementBase)
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(SVGComponentTransferFunctionElement, NS_SVG_FE_COMPONENT_TRANSFER_FUNCTION_ELEMENT_CID)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN(SVGComponentTransferFunctionElement)
|
||||
// nsISupports is an ambiguous base of nsSVGFE so we have to work
|
||||
// around that
|
||||
|
@ -147,6 +147,8 @@ protected:
|
||||
static LengthInfo sLengthInfo[4];
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsSVGFE, NS_SVG_FE_CID)
|
||||
|
||||
typedef nsSVGElement SVGFEUnstyledElementBase;
|
||||
|
||||
class SVGFEUnstyledElement : public SVGFEUnstyledElementBase
|
||||
|
@ -21,7 +21,6 @@ LOCAL_INCLUDES += [
|
||||
'/content/xml/document/src',
|
||||
'/dom/events',
|
||||
'/layout/style',
|
||||
'/xpcom/ds',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
#include "mozilla/dom/CDATASection.h"
|
||||
#include "mozilla/dom/CDATASectionBinding.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -48,7 +49,7 @@ CDATASection::List(FILE* out, int32_t aIndent) const
|
||||
int32_t index;
|
||||
for (index = aIndent; --index >= 0; ) fputs(" ", out);
|
||||
|
||||
fprintf(out, "CDATASection refcount=%d<", mRefCnt.get());
|
||||
fprintf(out, "CDATASection refcount=%" PRIuPTR "<", mRefCnt.get());
|
||||
|
||||
nsAutoString tmp;
|
||||
ToCString(tmp, 0, mText.GetLength());
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "mozilla/dom/ProcessingInstruction.h"
|
||||
#include "mozilla/dom/ProcessingInstructionBinding.h"
|
||||
#include "mozilla/dom/XMLStylesheetProcessingInstruction.h"
|
||||
#include "mozilla/IntegerPrintfMacros.h"
|
||||
#include "nsContentUtils.h"
|
||||
|
||||
already_AddRefed<mozilla::dom::ProcessingInstruction>
|
||||
@ -111,7 +112,7 @@ ProcessingInstruction::List(FILE* out, int32_t aIndent) const
|
||||
int32_t index;
|
||||
for (index = aIndent; --index >= 0; ) fputs(" ", out);
|
||||
|
||||
fprintf(out, "Processing instruction refcount=%d<", mRefCnt.get());
|
||||
fprintf(out, "Processing instruction refcount=%" PRIuPTR "<", mRefCnt.get());
|
||||
|
||||
nsAutoString tmp;
|
||||
ToCString(tmp, 0, mText.GetLength());
|
||||
|
@ -30,3 +30,7 @@ LOCAL_INCLUDES += [
|
||||
RESOURCE_FILES.dtd += [
|
||||
'htmlmathml-f.ent',
|
||||
]
|
||||
|
||||
if CONFIG['GNU_CC'] and CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
||||
# Work around bug 986928
|
||||
CXXFLAGS += ['-Wno-error=format']
|
||||
|
@ -27,7 +27,6 @@ LOCAL_INCLUDES += [
|
||||
'/dom/base',
|
||||
'/dom/events',
|
||||
'/layout/style',
|
||||
'/xpcom/ds',
|
||||
]
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
|
@ -27,7 +27,6 @@ LOCAL_INCLUDES += [
|
||||
'/layout/generic',
|
||||
'/layout/style',
|
||||
'/layout/xul',
|
||||
'/xpcom/ds',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
|
@ -34,7 +34,6 @@ LOCAL_INCLUDES += [
|
||||
'/layout/generic',
|
||||
'/layout/style',
|
||||
'/layout/xul',
|
||||
'/xpcom/ds',
|
||||
]
|
||||
|
||||
FINAL_LIBRARY = 'gklayout'
|
||||
|
@ -124,6 +124,6 @@ protected:
|
||||
void Finish();
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsRDFQuery, NS_ITEMPLATERDFQUERY_IID)
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsITemplateRDFQuery, NS_ITEMPLATERDFQUERY_IID)
|
||||
|
||||
#endif // nsRDFQuery_h__
|
||||
|
@ -56,8 +56,8 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
NS_METHOD_(nsrefcnt) AddRef();
|
||||
NS_METHOD_(nsrefcnt) Release();
|
||||
NS_METHOD_(MozExternalRefCountType) AddRef();
|
||||
NS_METHOD_(MozExternalRefCountType) Release();
|
||||
NS_DECL_OWNINGTHREAD
|
||||
NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(nsXMLBindingSet)
|
||||
|
||||
|
@ -81,7 +81,6 @@ LOCAL_INCLUDES += [
|
||||
'/layout/generic',
|
||||
'/layout/xul',
|
||||
'/netwerk/protocol/viewsource',
|
||||
'/xpcom/ds',
|
||||
]
|
||||
|
||||
if CONFIG['MOZ_TOOLKIT_SEARCH']:
|
||||
|
@ -1726,10 +1726,10 @@ GetBuildId(JS::BuildIdCharVector* aBuildID)
|
||||
class Client : public quota::Client
|
||||
{
|
||||
public:
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
NS_IMETHOD_(MozExternalRefCountType)
|
||||
AddRef() MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
NS_IMETHOD_(MozExternalRefCountType)
|
||||
Release() MOZ_OVERRIDE;
|
||||
|
||||
virtual Type
|
||||
|
@ -169,9 +169,11 @@ FINAL_LIBRARY = 'gklayout'
|
||||
LOCAL_INCLUDES += [
|
||||
'/js/xpconnect/src',
|
||||
'/js/xpconnect/wrappers',
|
||||
'/xpcom/ds',
|
||||
]
|
||||
|
||||
for var in ('MOZ_JSDEBUGGER', 'MOZ_B2G_RIL', 'MOZ_B2G_FM'):
|
||||
if CONFIG[var]:
|
||||
DEFINES[var] = True
|
||||
|
||||
if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
|
||||
DEFINES['HAVE_SIDEBAR'] = True
|
||||
|
@ -3498,6 +3498,8 @@ NS_IMETHODIMP
|
||||
nsLocationSH::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
JSObject *obj, jsid aId, jsval *vp, bool *_retval)
|
||||
{
|
||||
JS::Rooted<JSObject*> rootedObj(cx, obj);
|
||||
|
||||
// Shadowing protection. This will go away when nsLocation moves to the new
|
||||
// bindings.
|
||||
JS::Rooted<jsid> id(cx, aId);
|
||||
@ -3506,6 +3508,9 @@ nsLocationSH::AddProperty(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsLocation* location = static_cast<nsLocation*>(GetNative(wrapper, rootedObj));
|
||||
location->PreserveWrapper(location);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -216,6 +216,9 @@
|
||||
#include "nsITabChild.h"
|
||||
#include "mozilla/dom/MediaQueryList.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
#ifdef HAVE_SIDEBAR
|
||||
#include "mozilla/dom/ExternalBinding.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WEBSPEECH
|
||||
#include "mozilla/dom/SpeechSynthesis.h"
|
||||
@ -1446,6 +1449,8 @@ nsGlobalWindow::CleanUp()
|
||||
|
||||
mConsole = nullptr;
|
||||
|
||||
mExternal = nullptr;
|
||||
|
||||
mPerformance = nullptr;
|
||||
|
||||
#ifdef MOZ_WEBSPEECH
|
||||
@ -1761,6 +1766,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsGlobalWindow)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mScrollbars)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mCrypto)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mConsole)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mExternal)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindow)
|
||||
@ -1819,6 +1825,7 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(nsGlobalWindow)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mScrollbars)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mCrypto)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mConsole)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mExternal)
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -2135,27 +2142,6 @@ WindowStateHolder::~WindowStateHolder()
|
||||
|
||||
NS_IMPL_ISUPPORTS1(WindowStateHolder, WindowStateHolder)
|
||||
|
||||
nsresult
|
||||
nsGlobalWindow::CreateOuterObject(nsGlobalWindow* aNewInner)
|
||||
{
|
||||
AutoPushJSContext cx(mContext->GetNativeContext());
|
||||
|
||||
JS::Rooted<JSObject*> global(cx, aNewInner->FastGetGlobalJSObject());
|
||||
JS::Rooted<JSObject*> outer(cx, NewOuterWindowProxy(cx, global, IsChromeWindow()));
|
||||
if (!outer) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
js::SetProxyExtra(outer, 0, js::PrivateValue(ToSupports(this)));
|
||||
|
||||
JSAutoCompartment ac(cx, outer);
|
||||
|
||||
// Inform the nsJSContext, which is the canonical holder of the outer.
|
||||
MOZ_ASSERT(IsOuterWindow());
|
||||
mContext->SetWindowProxy(outer);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// We need certain special behavior for remote XUL whitelisted domains, but we
|
||||
// don't want that behavior to take effect in automation, because we whitelist
|
||||
// all the mochitest domains. So we need to check a pref here.
|
||||
@ -2462,7 +2448,14 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
||||
mInnerWindow = newInnerWindow;
|
||||
|
||||
if (!mJSObject) {
|
||||
CreateOuterObject(newInnerWindow);
|
||||
JS::Rooted<JSObject*> global(cx, newInnerWindow->FastGetGlobalJSObject());
|
||||
JS::Rooted<JSObject*> outer(cx, NewOuterWindowProxy(cx, global, thisChrome));
|
||||
NS_ENSURE_TRUE(outer, NS_ERROR_FAILURE);
|
||||
|
||||
js::SetProxyExtra(outer, 0, js::PrivateValue(ToSupports(this)));
|
||||
|
||||
// Inform the nsJSContext, which is the canonical holder of the outer.
|
||||
mContext->SetWindowProxy(outer);
|
||||
mContext->DidInitializeContext();
|
||||
|
||||
mJSObject = mContext->GetWindowProxy();
|
||||
@ -13511,6 +13504,54 @@ nsGlobalWindow::GetConsole(ErrorResult& aRv)
|
||||
return mConsole;
|
||||
}
|
||||
|
||||
already_AddRefed<External>
|
||||
nsGlobalWindow::GetExternal(ErrorResult& aRv)
|
||||
{
|
||||
FORWARD_TO_INNER_OR_THROW(GetExternal, (aRv), aRv, nullptr);
|
||||
|
||||
#ifdef HAVE_SIDEBAR
|
||||
if (!mExternal) {
|
||||
AutoJSContext cx;
|
||||
JS::Rooted<JSObject*> jsImplObj(cx);
|
||||
ConstructJSImplementation(cx, "@mozilla.org/sidebar;1",
|
||||
this, &jsImplObj, aRv);
|
||||
if (aRv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
mExternal = new External(jsImplObj, this);
|
||||
}
|
||||
|
||||
nsRefPtr<External> external = static_cast<External*>(mExternal.get());
|
||||
return external.forget();
|
||||
#else
|
||||
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
nsGlobalWindow::GetSidebar(OwningExternalOrWindowProxy& aResult,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
FORWARD_TO_INNER_OR_THROW(GetSidebar, (aResult, aRv), aRv, );
|
||||
|
||||
#ifdef HAVE_SIDEBAR
|
||||
// First check for a named frame named "sidebar"
|
||||
nsCOMPtr<nsIDOMWindow> domWindow = GetChildWindow(NS_LITERAL_STRING("sidebar"));
|
||||
if (domWindow) {
|
||||
aResult.SetAsWindowProxy() = domWindow.forget();
|
||||
return;
|
||||
}
|
||||
|
||||
nsRefPtr<External> external = GetExternal(aRv);
|
||||
if (external) {
|
||||
aResult.SetAsExternal() = external;
|
||||
}
|
||||
#else
|
||||
aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
void
|
||||
nsGlobalWindow::EnableNetworkEvent(uint32_t aType)
|
||||
|
@ -107,10 +107,12 @@ class Selection;
|
||||
namespace dom {
|
||||
class BarProp;
|
||||
class Console;
|
||||
class External;
|
||||
class Function;
|
||||
class Gamepad;
|
||||
class MediaQueryList;
|
||||
class Navigator;
|
||||
class OwningExternalOrWindowProxy;
|
||||
class SpeechSynthesis;
|
||||
class WakeLock;
|
||||
namespace indexedDB {
|
||||
@ -823,6 +825,10 @@ public:
|
||||
|
||||
mozilla::dom::Console* GetConsole(mozilla::ErrorResult& aRv);
|
||||
|
||||
void GetSidebar(mozilla::dom::OwningExternalOrWindowProxy& aResult,
|
||||
mozilla::ErrorResult& aRv);
|
||||
already_AddRefed<mozilla::dom::External> GetExternal(mozilla::ErrorResult& aRv);
|
||||
|
||||
protected:
|
||||
bool AlertOrConfirm(bool aAlert, const nsAString& aMessage,
|
||||
mozilla::ErrorResult& aError);
|
||||
@ -1301,8 +1307,6 @@ protected:
|
||||
|
||||
inline int32_t DOMMinTimeoutValue() const;
|
||||
|
||||
nsresult CreateOuterObject(nsGlobalWindow* aNewInner);
|
||||
nsresult SetOuterObject(JSContext* aCx, JS::Handle<JSObject*> aOuterObject);
|
||||
nsresult CloneStorageEvent(const nsAString& aType,
|
||||
nsCOMPtr<nsIDOMStorageEvent>& aEvent);
|
||||
|
||||
@ -1457,6 +1461,11 @@ protected:
|
||||
nsGlobalWindowObserver* mObserver; // Inner windows only.
|
||||
nsCOMPtr<nsIDOMCrypto> mCrypto;
|
||||
nsRefPtr<mozilla::dom::Console> mConsole;
|
||||
// We need to store an nsISupports pointer to this object because the
|
||||
// mozilla::dom::External class doesn't exist on b2g and using the type
|
||||
// forward declared here means that ~nsGlobalWindow wouldn't compile because
|
||||
// it wouldn't see the ~External function's declaration.
|
||||
nsCOMPtr<nsISupports> mExternal;
|
||||
|
||||
nsCOMPtr<nsIDOMStorage> mLocalStorage;
|
||||
nsCOMPtr<nsIDOMStorage> mSessionStorage;
|
||||
|
@ -191,7 +191,6 @@ static uint32_t sPreviousSuspectedCount = 0;
|
||||
static uint32_t sCleanupsSinceLastGC = UINT32_MAX;
|
||||
static bool sNeedsFullCC = false;
|
||||
static bool sNeedsGCAfterCC = false;
|
||||
static nsJSContext *sContextList = nullptr;
|
||||
static bool sIncrementalCC = false;
|
||||
|
||||
static nsScriptNameSpaceManager *gNameSpaceManager;
|
||||
@ -767,13 +766,6 @@ nsJSContext::nsJSContext(bool aGCOnDestruction,
|
||||
{
|
||||
EnsureStatics();
|
||||
|
||||
mNext = sContextList;
|
||||
mPrev = &sContextList;
|
||||
if (sContextList) {
|
||||
sContextList->mPrev = &mNext;
|
||||
}
|
||||
sContextList = this;
|
||||
|
||||
++sContextCount;
|
||||
|
||||
mContext = ::JS_NewContext(sRuntime, gStackSize);
|
||||
@ -795,11 +787,6 @@ nsJSContext::nsJSContext(bool aGCOnDestruction,
|
||||
|
||||
nsJSContext::~nsJSContext()
|
||||
{
|
||||
*mPrev = mNext;
|
||||
if (mNext) {
|
||||
mNext->mPrev = mPrev;
|
||||
}
|
||||
|
||||
mGlobalObjectRef = nullptr;
|
||||
|
||||
DestroyJSContext();
|
||||
|
@ -160,9 +160,6 @@ private:
|
||||
PRTime mModalStateTime;
|
||||
uint32_t mModalStateDepth;
|
||||
|
||||
nsJSContext *mNext;
|
||||
nsJSContext **mPrev;
|
||||
|
||||
// mGlobalObjectRef ensures that the outer window stays alive as long as the
|
||||
// context does. It is eventually collected by the cycle collector.
|
||||
nsCOMPtr<nsIScriptGlobalObject> mGlobalObjectRef;
|
||||
|
@ -43,7 +43,7 @@ nsWindowMemoryReporter::~nsWindowMemoryReporter()
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS3(nsWindowMemoryReporter, nsIMemoryReporter, nsIObserver,
|
||||
nsSupportsWeakReference)
|
||||
nsISupportsWeakReference)
|
||||
|
||||
static nsresult
|
||||
AddNonJSSizeOfWindowAndItsDescendents(nsGlobalWindow* aWindow,
|
||||
|
@ -1988,6 +1988,20 @@ ConstructJSImplementation(JSContext* aCx, const char* aContractId,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ConstructJSImplementation(aCx, aContractId, window, aObject, aRv);
|
||||
|
||||
if (aRv.Failed()) {
|
||||
return nullptr;
|
||||
}
|
||||
return window.forget();
|
||||
}
|
||||
|
||||
void
|
||||
ConstructJSImplementation(JSContext* aCx, const char* aContractId,
|
||||
nsPIDOMWindow* aWindow,
|
||||
JS::MutableHandle<JSObject*> aObject,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
// Make sure to divorce ourselves from the calling JS while creating and
|
||||
// initializing the object, so exceptions from that will get reported
|
||||
// properly, since those are never exceptions that a spec wants to be thrown.
|
||||
@ -1999,17 +2013,17 @@ ConstructJSImplementation(JSContext* aCx, const char* aContractId,
|
||||
if (!implISupports) {
|
||||
NS_WARNING("Failed to get JS implementation for contract");
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
return;
|
||||
}
|
||||
// Initialize the object, if it implements nsIDOMGlobalPropertyInitializer.
|
||||
nsCOMPtr<nsIDOMGlobalPropertyInitializer> gpi =
|
||||
do_QueryInterface(implISupports);
|
||||
if (gpi) {
|
||||
JS::Rooted<JS::Value> initReturn(aCx);
|
||||
nsresult rv = gpi->Init(window, &initReturn);
|
||||
nsresult rv = gpi->Init(aWindow, &initReturn);
|
||||
if (NS_FAILED(rv)) {
|
||||
aRv.Throw(rv);
|
||||
return nullptr;
|
||||
return;
|
||||
}
|
||||
// With JS-implemented WebIDL, the return value of init() is not used to determine
|
||||
// if init() failed, so init() should only return undefined. Any kind of permission
|
||||
@ -2025,16 +2039,13 @@ ConstructJSImplementation(JSContext* aCx, const char* aContractId,
|
||||
MOZ_ASSERT(implWrapped, "Failed to get wrapped JS from XPCOM component.");
|
||||
if (!implWrapped) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
return;
|
||||
}
|
||||
aObject.set(implWrapped->GetJSObject());
|
||||
if (!aObject) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
return window.forget();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -2293,6 +2293,12 @@ bool
|
||||
GetWindowForJSImplementedObject(JSContext* cx, JS::Handle<JSObject*> obj,
|
||||
nsPIDOMWindow** window);
|
||||
|
||||
void
|
||||
ConstructJSImplementation(JSContext* aCx, const char* aContractId,
|
||||
nsPIDOMWindow* aWindow,
|
||||
JS::MutableHandle<JSObject*> aObject,
|
||||
ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<nsPIDOMWindow>
|
||||
ConstructJSImplementation(JSContext* aCx, const char* aContractId,
|
||||
const GlobalObject& aGlobal,
|
||||
|
@ -90,3 +90,7 @@ FINAL_LIBRARY = 'xul'
|
||||
|
||||
SPHINX_TREES['webidl'] = 'docs'
|
||||
SPHINX_PYTHON_PACKAGE_DIRS += ['mozwebidlcodegen']
|
||||
|
||||
if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
|
||||
# This is needed for Window.webidl
|
||||
DEFINES['HAVE_SIDEBAR'] = True
|
||||
|
@ -48,6 +48,8 @@ public:
|
||||
virtual nsISupports* GetParentObject();
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(nsRenamedInterface, NS_RENAMED_INTERFACE_IID)
|
||||
|
||||
// IID for the IndirectlyImplementedInterface
|
||||
#define NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID \
|
||||
{ 0xfed55b69, 0x7012, 0x4849, \
|
||||
@ -68,6 +70,8 @@ public:
|
||||
void IndirectlyImplementedMethod();
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(IndirectlyImplementedInterface, NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID)
|
||||
|
||||
// IID for the TestExternalInterface
|
||||
#define NS_TEST_EXTERNAL_INTERFACE_IID \
|
||||
{ 0xd5ba0c99, 0x9b1d, 0x4e71, \
|
||||
@ -79,6 +83,8 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(TestExternalInterface, NS_TEST_EXTERNAL_INTERFACE_IID)
|
||||
|
||||
class TestNonWrapperCacheInterface : public nsISupports
|
||||
{
|
||||
public:
|
||||
|
@ -24,8 +24,8 @@ class DeviceStorageRequestParent : public PDeviceStorageRequestParent
|
||||
public:
|
||||
DeviceStorageRequestParent(const DeviceStorageParams& aParams);
|
||||
|
||||
NS_IMETHOD_(nsrefcnt) AddRef();
|
||||
NS_IMETHOD_(nsrefcnt) Release();
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef();
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release();
|
||||
|
||||
bool EnsureRequiredPermissions(mozilla::dom::ContentParent* aParent);
|
||||
void Dispatch();
|
||||
|
@ -23,10 +23,10 @@ class LockedFile;
|
||||
class FileHelperListener
|
||||
{
|
||||
public:
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
NS_IMETHOD_(MozExternalRefCountType)
|
||||
AddRef() = 0;
|
||||
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
NS_IMETHOD_(MozExternalRefCountType)
|
||||
Release() = 0;
|
||||
|
||||
virtual void
|
||||
|
@ -69,10 +69,10 @@ private:
|
||||
friend class FileService;
|
||||
|
||||
public:
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
NS_IMETHOD_(MozExternalRefCountType)
|
||||
AddRef() MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
NS_IMETHOD_(MozExternalRefCountType)
|
||||
Release() MOZ_OVERRIDE;
|
||||
|
||||
inline nsresult
|
||||
|
@ -630,14 +630,14 @@ AsyncConnectionHelper::ConvertToArrayAndCleanup(
|
||||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
StackBasedEventTarget::AddRef()
|
||||
{
|
||||
NS_NOTREACHED("Don't call me!");
|
||||
return 2;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt)
|
||||
NS_IMETHODIMP_(MozExternalRefCountType)
|
||||
StackBasedEventTarget::Release()
|
||||
{
|
||||
NS_NOTREACHED("Don't call me!");
|
||||
|
@ -22,10 +22,10 @@ class Client : public mozilla::dom::quota::Client
|
||||
typedef mozilla::dom::quota::UsageInfo UsageInfo;
|
||||
|
||||
public:
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
NS_IMETHOD_(MozExternalRefCountType)
|
||||
AddRef() MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD_(nsrefcnt)
|
||||
NS_IMETHOD_(MozExternalRefCountType)
|
||||
Release() MOZ_OVERRIDE;
|
||||
|
||||
virtual Type
|
||||
|
@ -15,8 +15,6 @@
|
||||
USING_INDEXEDDB_NAMESPACE
|
||||
using namespace mozilla::dom;
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(IDBVersionChangeEvent, IDBVERSIONCHANGEEVENT_IID)
|
||||
|
||||
namespace {
|
||||
|
||||
class EventFiringRunnable : public nsRunnable
|
||||
|
@ -158,6 +158,8 @@ protected:
|
||||
uint64_t mNewVersion;
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(IDBVersionChangeEvent, IDBVERSIONCHANGEEVENT_IID)
|
||||
|
||||
END_INDEXEDDB_NAMESPACE
|
||||
|
||||
#endif // mozilla_dom_indexeddb_idbevents_h__
|
||||
|
@ -75,12 +75,12 @@ public:
|
||||
};
|
||||
|
||||
// Could really use those NS_REFCOUNTING_HAHA_YEAH_RIGHT macros here.
|
||||
NS_IMETHODIMP_(nsrefcnt) StartTransactionRunnable::AddRef()
|
||||
NS_IMETHODIMP_(MozExternalRefCountType) StartTransactionRunnable::AddRef()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP_(nsrefcnt) StartTransactionRunnable::Release()
|
||||
NS_IMETHODIMP_(MozExternalRefCountType) StartTransactionRunnable::Release()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -49,8 +49,8 @@ class UpdateRefcountFunction;
|
||||
class IDBTransactionListener
|
||||
{
|
||||
public:
|
||||
NS_IMETHOD_(nsrefcnt) AddRef() = 0;
|
||||
NS_IMETHOD_(nsrefcnt) Release() = 0;
|
||||
NS_IMETHOD_(MozExternalRefCountType) AddRef() = 0;
|
||||
NS_IMETHOD_(MozExternalRefCountType) Release() = 0;
|
||||
|
||||
// Called just before dispatching the final events on the transaction.
|
||||
virtual nsresult NotifyTransactionPreComplete(IDBTransaction* aTransaction) = 0;
|
||||
|
@ -5,7 +5,6 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsISidebar.idl',
|
||||
'nsIWebContentHandlerRegistrar.idl',
|
||||
]
|
||||
|
||||
|
@ -1,29 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
*
|
||||
* 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 "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(351887ca-56b2-4458-96fc-88baeb57b6e7)]
|
||||
interface nsISidebar : nsISupports
|
||||
{
|
||||
void addSearchEngine(in DOMString engineURL, in DOMString iconURL,
|
||||
in DOMString suggestedTitle, in DOMString suggestedCategory);
|
||||
};
|
||||
|
||||
[scriptable, uuid(5895076f-e28e-434a-9fdb-a69f94eb323f)]
|
||||
interface nsISidebarExternal : nsISupports
|
||||
{
|
||||
void AddSearchProvider(in DOMString aDescriptionURL);
|
||||
unsigned long IsSearchProviderInstalled(in DOMString aSearchURL);
|
||||
};
|
||||
|
||||
%{ C++
|
||||
// {577CB744-8CAF-11d3-AAEF-00805F8A4905}
|
||||
#define NS_SIDEBAR_CID \
|
||||
{ 0x577cb744, 0x8caf, 0x11d3, { 0xaa, 0xef, 0x0, 0x80, 0x5f, 0x8a, 0x49, 0x5 } }
|
||||
|
||||
#define NS_SIDEBAR_CONTRACTID "@mozilla.org/sidebar;1"
|
||||
%}
|
@ -102,8 +102,9 @@ class ParticularProcessPriorityManager;
|
||||
* can call StaticInit, but it won't do anything, and GetSingleton() will
|
||||
* return null.)
|
||||
*
|
||||
* ProcessPriorityManager::CurrentProcessIsForeground(), which can be called in
|
||||
* any process, is handled separately, by the ProcessPriorityManagerChild
|
||||
* ProcessPriorityManager::CurrentProcessIsForeground() and
|
||||
* ProcessPriorityManager::AnyProcessHasHighPriority() which can be called in
|
||||
* any process, are handled separately, by the ProcessPriorityManagerChild
|
||||
* class.
|
||||
*/
|
||||
class ProcessPriorityManagerImpl MOZ_FINAL
|
||||
@ -143,6 +144,11 @@ public:
|
||||
bool OtherProcessHasHighPriority(
|
||||
ParticularProcessPriorityManager* aParticularManager);
|
||||
|
||||
/**
|
||||
* Does one of the child processes have priority FOREGROUND_HIGH?
|
||||
*/
|
||||
bool ChildProcessHasHighPriority();
|
||||
|
||||
/**
|
||||
* This must be called by a ParticularProcessPriorityManager when it changes
|
||||
* its priority.
|
||||
@ -191,6 +197,7 @@ public:
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
bool CurrentProcessIsForeground();
|
||||
bool CurrentProcessIsHighPriority();
|
||||
|
||||
private:
|
||||
static StaticRefPtr<ProcessPriorityManagerChild> sSingleton;
|
||||
@ -540,6 +547,12 @@ ProcessPriorityManagerImpl::OtherProcessHasHighPriority(
|
||||
return mHighPriorityChildIDs.Count() > 0;
|
||||
}
|
||||
|
||||
bool
|
||||
ProcessPriorityManagerImpl::ChildProcessHasHighPriority( void )
|
||||
{
|
||||
return mHighPriorityChildIDs.Count() > 0;
|
||||
}
|
||||
|
||||
void
|
||||
ProcessPriorityManagerImpl::NotifyProcessPriorityChanged(
|
||||
ParticularProcessPriorityManager* aParticularManager,
|
||||
@ -1204,6 +1217,13 @@ ProcessPriorityManagerChild::CurrentProcessIsForeground()
|
||||
mCachedPriority >= PROCESS_PRIORITY_FOREGROUND;
|
||||
}
|
||||
|
||||
bool
|
||||
ProcessPriorityManagerChild::CurrentProcessIsHighPriority()
|
||||
{
|
||||
return mCachedPriority == PROCESS_PRIORITY_UNKNOWN ||
|
||||
mCachedPriority >= PROCESS_PRIORITY_FOREGROUND_HIGH;
|
||||
}
|
||||
|
||||
/* static */ StaticAutoPtr<BackgroundProcessLRUPool>
|
||||
BackgroundProcessLRUPool::sSingleton;
|
||||
|
||||
@ -1435,4 +1455,18 @@ ProcessPriorityManager::CurrentProcessIsForeground()
|
||||
CurrentProcessIsForeground();
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
ProcessPriorityManager::AnyProcessHasHighPriority()
|
||||
{
|
||||
ProcessPriorityManagerImpl* singleton =
|
||||
ProcessPriorityManagerImpl::GetSingleton();
|
||||
|
||||
if (singleton) {
|
||||
return singleton->ChildProcessHasHighPriority();
|
||||
} else {
|
||||
return ProcessPriorityManagerChild::Singleton()->
|
||||
CurrentProcessIsHighPriority();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -68,6 +68,12 @@ public:
|
||||
*/
|
||||
static bool CurrentProcessIsForeground();
|
||||
|
||||
/**
|
||||
* Returns true if one or more processes with FOREGROUND_HIGH priority are
|
||||
* present, false otherwise.
|
||||
*/
|
||||
static bool AnyProcessHasHighPriority();
|
||||
|
||||
/**
|
||||
* Used to remove a ContentParent from background LRU pool when
|
||||
* it is destroyed or its priority changed from BACKGROUND to others.
|
||||
|
@ -288,7 +288,7 @@ TabChildBase::HandlePossibleViewportChange()
|
||||
metrics.mResolution = metrics.mCumulativeResolution / LayoutDeviceToParentLayerScale(1);
|
||||
utils->SetResolution(metrics.mResolution.scale, metrics.mResolution.scale);
|
||||
|
||||
CSSSize scrollPort = CSSSize(metrics.CalculateCompositedRectInCssPixels().Size());
|
||||
CSSSize scrollPort = metrics.CalculateCompositedSizeInCssPixels();
|
||||
utils->SetScrollPositionClampingScrollPortSize(scrollPort.width, scrollPort.height);
|
||||
|
||||
// The call to GetPageSize forces a resize event to content, so we need to
|
||||
@ -424,7 +424,7 @@ TabChildBase::ProcessUpdateFrame(const FrameMetrics& aFrameMetrics)
|
||||
FrameMetrics newMetrics = aFrameMetrics;
|
||||
APZCCallbackHelper::UpdateRootFrame(utils, newMetrics);
|
||||
|
||||
CSSRect cssCompositedRect = CSSRect(newMetrics.CalculateCompositedRectInCssPixels());
|
||||
CSSSize cssCompositedSize = newMetrics.CalculateCompositedSizeInCssPixels();
|
||||
// The BrowserElementScrolling helper must know about these updated metrics
|
||||
// for other functions it performs, such as double tap handling.
|
||||
// Note, %f must not be used because it is locale specific!
|
||||
@ -453,9 +453,9 @@ TabChildBase::ProcessUpdateFrame(const FrameMetrics& aFrameMetrics)
|
||||
data.AppendPrintf(" }");
|
||||
data.AppendLiteral(", \"cssCompositedRect\" : ");
|
||||
data.AppendLiteral("{ \"width\" : ");
|
||||
data.AppendFloat(cssCompositedRect.width);
|
||||
data.AppendFloat(cssCompositedSize.width);
|
||||
data.AppendLiteral(", \"height\" : ");
|
||||
data.AppendFloat(cssCompositedRect.height);
|
||||
data.AppendFloat(cssCompositedSize.height);
|
||||
data.AppendLiteral(" }");
|
||||
data.AppendLiteral(" }");
|
||||
|
||||
@ -966,7 +966,7 @@ NS_INTERFACE_MAP_BEGIN(TabChild)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIWebProgressListener)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITabChild)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIObserver)
|
||||
NS_INTERFACE_MAP_ENTRY(nsSupportsWeakReference)
|
||||
NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
|
||||
NS_INTERFACE_MAP_ENTRY(nsITooltipListener)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
|
9
dom/media/tests/ipc/ipc.json
Normal file
9
dom/media/tests/ipc/ipc.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"runtests":{
|
||||
"dom/media/tests/mochitest/test_getUserMedia_basicVideoAudio.html":"included",
|
||||
"dom/media/tests/mochitest/test_peerConnection_basicAudioVideo.html":"included",
|
||||
"dom/media/tests/mochitest/test_dataChannel_basicAudioVideo.html":"included"
|
||||
},
|
||||
"excludetests":{
|
||||
}
|
||||
}
|
@ -1,4 +1,7 @@
|
||||
[DEFAULT]
|
||||
support-files =
|
||||
ipc.json
|
||||
|
||||
skip-if = e10s
|
||||
|
||||
[test_ipc.html]
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
function iframeScriptSecond() {
|
||||
let TestRunner = content.wrappedJSObject.TestRunner;
|
||||
|
||||
let oldComplete = TestRunner.onComplete;
|
||||
|
||||
TestRunner.onComplete = function() {
|
||||
@ -45,11 +44,13 @@
|
||||
oldComplete();
|
||||
}
|
||||
};
|
||||
|
||||
let oldLog = TestRunner.log;
|
||||
TestRunner.log = function(msg) {
|
||||
sendAsyncMessage("test:PeerConnection:ipcTestMessage", { msg: msg });
|
||||
}
|
||||
};
|
||||
TestRunner.error = function(msg) {
|
||||
sendAsyncMessage("test:PeerConnection:ipcTestMessage", { msg: msg });
|
||||
};
|
||||
}
|
||||
|
||||
let regex = /^(TEST-PASS|TEST-UNEXPECTED-PASS|TEST-KNOWN-FAIL|TEST-UNEXPECTED-FAIL|TEST-DEBUG-INFO) \| ([^\|]+) \|(.*)/;
|
||||
@ -148,8 +149,8 @@
|
||||
let href = window.location.href;
|
||||
href = href.substring(0, href.lastIndexOf('/'));
|
||||
href = href.substring(0, href.lastIndexOf('/'));
|
||||
iframe.src = href + "/mochitest?consoleLevel=INFO";
|
||||
|
||||
let manifest = "tests/dom/media/tests/ipc/ipc.json";
|
||||
iframe.src = href + "/mochitest?consoleLevel=INFO&testManifest=" + manifest;
|
||||
document.body.appendChild(iframe);
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user