mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Merge m-c to elm
This commit is contained in:
commit
85101095c8
1
.hgtags
1
.hgtags
@ -96,3 +96,4 @@ d7ce9089999719d5186595d160f25123a4e63e39 FIREFOX_AURORA_23_BASE
|
||||
8d3810543edccf4fbe458178b88dd4a6e420b010 FIREFOX_AURORA_24_BASE
|
||||
ad0ae007aa9e03cd74e9005cd6652e544139b3b5 FIREFOX_AURORA_25_BASE
|
||||
2520866d58740851d862c7c59246a4e3f8b4a176 FIREFOX_AURORA_26_BASE
|
||||
05025f4889a0bf4dc99ce0c244c750adc002f015 FIREFOX_AURORA_27_BASE
|
||||
|
@ -32,9 +32,9 @@ DIST_GARBAGE = config.cache config.log config.status* config-defs.h \
|
||||
.mozconfig.mk
|
||||
|
||||
ifndef MOZ_PROFILE_USE
|
||||
# We need to explicitly put backend.RecursiveMakeBackend.built here
|
||||
# We need to explicitly put backend.RecursiveMakeBackend here
|
||||
# otherwise the rule in rules.mk doesn't run early enough.
|
||||
libs binaries export tools:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend.built
|
||||
libs binaries export tools:: CLOBBER $(topsrcdir)/configure config.status backend.RecursiveMakeBackend
|
||||
ifndef LIBXUL_SDK
|
||||
libs binaries export tools:: js-config-status
|
||||
endif
|
||||
@ -63,7 +63,7 @@ config.status: $(topsrcdir)/configure
|
||||
ifndef LIBXUL_SDK
|
||||
.PHONY: js-config-status
|
||||
js-config-status:
|
||||
$(call SUBMAKE,backend.RecursiveMakeBackend.built,js/src,1)
|
||||
$(call SUBMAKE,backend.RecursiveMakeBackend,js/src,1)
|
||||
endif
|
||||
|
||||
install_manifests := bin idl include public private sdk
|
||||
@ -71,7 +71,7 @@ install_manifest_depends = \
|
||||
CLOBBER \
|
||||
$(topsrcdir)/configure \
|
||||
config.status \
|
||||
backend.RecursiveMakeBackend.built \
|
||||
backend.RecursiveMakeBackend \
|
||||
$(NULL)
|
||||
|
||||
ifndef LIBXUL_SDK
|
||||
|
@ -84,7 +84,7 @@ cpp_quote("//")
|
||||
cpp_quote("//")
|
||||
cpp_quote("// get_localInterface(/* [out] */ void **localInterface);")
|
||||
cpp_quote("// ---------------------------------------------------------------------------------------------------=")
|
||||
cpp_quote("// Only available in Gecko's process - casts to an XPCOM nsAccessNode object pointer")
|
||||
cpp_quote("// Only available in Gecko's process")
|
||||
cpp_quote("//")
|
||||
cpp_quote("//")
|
||||
cpp_quote("// get_language(/* [out] */ BSTR *htmlText);")
|
||||
|
@ -52,7 +52,6 @@ public:
|
||||
virtual ~AccessibleWrap();
|
||||
void ShutdownAtkObject();
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// return the atk object for this AccessibleWrap
|
||||
|
@ -45,7 +45,6 @@ public:
|
||||
AtkSocketAccessible(nsIContent* aContent, DocAccessible* aDoc,
|
||||
const nsCString& aPlugId);
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// nsIAccessible
|
||||
|
@ -10,8 +10,7 @@ MODULE = 'accessibility'
|
||||
|
||||
EXPORTS += [
|
||||
'AccEvent.h',
|
||||
'nsAccessibilityService.h',
|
||||
'nsAccessNode.h',
|
||||
'nsAccessibilityService.h'
|
||||
]
|
||||
|
||||
EXPORTS.mozilla.a11y += [
|
||||
@ -45,7 +44,6 @@ SOURCES += [
|
||||
'NotificationController.cpp',
|
||||
'nsAccessibilityService.cpp',
|
||||
'nsAccessiblePivot.cpp',
|
||||
'nsAccessNode.cpp',
|
||||
'nsAccUtils.cpp',
|
||||
'nsCoreUtils.cpp',
|
||||
'nsEventShell.cpp',
|
||||
|
@ -1,117 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsAccessNode.h"
|
||||
|
||||
#include "nsAccUtils.h"
|
||||
#include "nsCoreUtils.h"
|
||||
#include "RootAccessible.h"
|
||||
|
||||
#include "nsIDocShell.h"
|
||||
|
||||
using namespace mozilla::a11y;
|
||||
|
||||
/* For documentation of the accessibility architecture,
|
||||
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
|
||||
*/
|
||||
|
||||
/*
|
||||
* Class nsAccessNode
|
||||
*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// AccessNode. nsISupports
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_1(nsAccessNode, mContent)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsAccessNode)
|
||||
NS_INTERFACE_MAP_ENTRY(nsAccessNode)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(nsAccessNode)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(nsAccessNode, LastRelease())
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode construction/desctruction
|
||||
|
||||
nsAccessNode::
|
||||
nsAccessNode(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
mContent(aContent), mDoc(aDoc)
|
||||
{
|
||||
}
|
||||
|
||||
nsAccessNode::~nsAccessNode()
|
||||
{
|
||||
NS_ASSERTION(!mDoc, "LastRelease was never called!?!");
|
||||
}
|
||||
|
||||
void nsAccessNode::LastRelease()
|
||||
{
|
||||
// First cleanup if needed...
|
||||
if (mDoc) {
|
||||
Shutdown();
|
||||
NS_ASSERTION(!mDoc, "A Shutdown() impl forgot to call its parent's Shutdown?");
|
||||
}
|
||||
// ... then die.
|
||||
delete this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode public
|
||||
|
||||
|
||||
void
|
||||
nsAccessNode::Shutdown()
|
||||
{
|
||||
mContent = nullptr;
|
||||
mDoc = nullptr;
|
||||
}
|
||||
|
||||
RootAccessible*
|
||||
nsAccessNode::RootAccessible() const
|
||||
{
|
||||
nsCOMPtr<nsIDocShell> docShell = nsCoreUtils::GetDocShellFor(GetNode());
|
||||
NS_ASSERTION(docShell, "No docshell for mContent");
|
||||
if (!docShell) {
|
||||
return nullptr;
|
||||
}
|
||||
nsCOMPtr<nsIDocShellTreeItem> root;
|
||||
docShell->GetRootTreeItem(getter_AddRefs(root));
|
||||
NS_ASSERTION(root, "No root content tree item");
|
||||
if (!root) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
|
||||
return docAcc ? docAcc->AsRoot() : nullptr;
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
nsAccessNode::GetFrame() const
|
||||
{
|
||||
return mContent ? mContent->GetPrimaryFrame() : nullptr;
|
||||
}
|
||||
|
||||
nsINode*
|
||||
nsAccessNode::GetNode() const
|
||||
{
|
||||
return mContent;
|
||||
}
|
||||
|
||||
void
|
||||
nsAccessNode::Language(nsAString& aLanguage)
|
||||
{
|
||||
aLanguage.Truncate();
|
||||
|
||||
if (!mDoc)
|
||||
return;
|
||||
|
||||
nsCoreUtils::GetLanguageFor(mContent, nullptr, aLanguage);
|
||||
if (aLanguage.IsEmpty()) { // Nothing found, so use document's language
|
||||
mDoc->DocumentNode()->GetHeaderData(nsGkAtoms::headerContentLanguage,
|
||||
aLanguage);
|
||||
}
|
||||
}
|
||||
|
@ -1,94 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* For documentation of the accessibility architecture,
|
||||
* see http://lxr.mozilla.org/seamonkey/source/accessible/accessible-docs.html
|
||||
*/
|
||||
|
||||
#ifndef _nsAccessNode_H_
|
||||
#define _nsAccessNode_H_
|
||||
|
||||
#include "nsINode.h"
|
||||
|
||||
class nsIContent;
|
||||
class nsIFrame;
|
||||
|
||||
namespace mozilla {
|
||||
namespace a11y {
|
||||
|
||||
class DocAccessible;
|
||||
class RootAccessible;
|
||||
|
||||
class nsAccessNode : public nsISupports
|
||||
{
|
||||
public:
|
||||
|
||||
nsAccessNode(nsIContent* aContent, DocAccessible* aDoc);
|
||||
virtual ~nsAccessNode();
|
||||
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS(nsAccessNode)
|
||||
|
||||
/**
|
||||
* Return the document accessible for this access node.
|
||||
*/
|
||||
DocAccessible* Document() const { return mDoc; }
|
||||
|
||||
/**
|
||||
* Return the root document accessible for this accessnode.
|
||||
*/
|
||||
a11y::RootAccessible* RootAccessible() const;
|
||||
|
||||
/**
|
||||
* Shutdown the access node object.
|
||||
*/
|
||||
virtual void Shutdown();
|
||||
|
||||
/**
|
||||
* Return frame for the given access node object.
|
||||
*/
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
|
||||
/**
|
||||
* Return DOM node associated with the accessible.
|
||||
*/
|
||||
virtual nsINode* GetNode() const;
|
||||
nsIContent* GetContent() const { return mContent; }
|
||||
|
||||
/**
|
||||
* Return node type information of DOM node associated with the accessible.
|
||||
*/
|
||||
bool IsContent() const
|
||||
{
|
||||
return GetNode() && GetNode()->IsNodeOfType(nsINode::eCONTENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the unique identifier of the accessible.
|
||||
*/
|
||||
void* UniqueID() { return static_cast<void*>(this); }
|
||||
|
||||
/**
|
||||
* Interface methods on nsIAccessible shared with ISimpleDOM.
|
||||
*/
|
||||
void Language(nsAString& aLocale);
|
||||
|
||||
protected:
|
||||
void LastRelease();
|
||||
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
DocAccessible* mDoc;
|
||||
|
||||
private:
|
||||
nsAccessNode() MOZ_DELETE;
|
||||
nsAccessNode(const nsAccessNode&) MOZ_DELETE;
|
||||
nsAccessNode& operator =(const nsAccessNode&) MOZ_DELETE;
|
||||
};
|
||||
|
||||
} // namespace a11y
|
||||
} // namespace mozilla
|
||||
|
||||
#endif
|
||||
|
@ -40,7 +40,7 @@ NS_IMPL_ISUPPORTS_INHERITED1(ARIAGridAccessible,
|
||||
nsIAccessibleTable)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//nsAccessNode
|
||||
// Accessible
|
||||
|
||||
void
|
||||
ARIAGridAccessible::Shutdown()
|
||||
|
@ -36,8 +36,6 @@ public:
|
||||
|
||||
// Accessible
|
||||
virtual TableAccessible* AsTable() { return this; }
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// TableAccessible
|
||||
|
@ -88,69 +88,27 @@ using namespace mozilla::a11y;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible. nsISupports
|
||||
// Accessible: nsISupports and cycle collection
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(Accessible, nsAccessNode,
|
||||
mParent, mChildren)
|
||||
NS_IMPL_CYCLE_COLLECTION_3(Accessible,
|
||||
mContent, mParent, mChildren)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(Accessible, nsAccessNode)
|
||||
NS_IMPL_RELEASE_INHERITED(Accessible, nsAccessNode)
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Accessible)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIAccessible)
|
||||
if (aIID.Equals(NS_GET_IID(Accessible)))
|
||||
foundInterface = static_cast<nsIAccessible*>(this);
|
||||
else
|
||||
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleSelectable, IsSelect())
|
||||
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleValue, HasNumericValue())
|
||||
NS_INTERFACE_MAP_ENTRY_CONDITIONAL(nsIAccessibleHyperLink, IsLink())
|
||||
NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIAccessible)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
nsresult
|
||||
Accessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
{
|
||||
// Custom-built QueryInterface() knows when we support nsIAccessibleSelectable
|
||||
// based on role attribute and aria-multiselectable
|
||||
*aInstancePtr = nullptr;
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsXPCOMCycleCollectionParticipant))) {
|
||||
*aInstancePtr = NS_CYCLE_COLLECTION_PARTICIPANT(Accessible);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIAccessible))) {
|
||||
*aInstancePtr = static_cast<nsIAccessible*>(this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(Accessible))) {
|
||||
*aInstancePtr = static_cast<Accessible*>(this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIAccessibleSelectable))) {
|
||||
if (IsSelect()) {
|
||||
*aInstancePtr = static_cast<nsIAccessibleSelectable*>(this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIAccessibleValue))) {
|
||||
if (HasNumericValue()) {
|
||||
*aInstancePtr = static_cast<nsIAccessibleValue*>(this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if (aIID.Equals(NS_GET_IID(nsIAccessibleHyperLink))) {
|
||||
if (IsLink()) {
|
||||
*aInstancePtr = static_cast<nsIAccessibleHyperLink*>(this);
|
||||
NS_ADDREF_THIS();
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
|
||||
return nsAccessNode::QueryInterface(aIID, aInstancePtr);
|
||||
}
|
||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(Accessible)
|
||||
NS_IMPL_CYCLE_COLLECTING_RELEASE_WITH_DESTROY(Accessible, LastRelease())
|
||||
|
||||
Accessible::Accessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
nsAccessNode(aContent, aDoc),
|
||||
mContent(aContent), mDoc(aDoc),
|
||||
mParent(nullptr), mIndexInParent(-1), mChildrenFlags(eChildrenUninitialized),
|
||||
mStateFlags(0), mType(0), mGenericTypes(0), mIndexOfEmbeddedChild(-1),
|
||||
mRoleMapEntry(nullptr)
|
||||
@ -175,11 +133,9 @@ Accessible::Accessible(nsIContent* aContent, DocAccessible* aDoc) :
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// destruction
|
||||
//-----------------------------------------------------
|
||||
Accessible::~Accessible()
|
||||
{
|
||||
NS_ASSERTION(!mDoc, "LastRelease was never called!?!");
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -2624,9 +2580,6 @@ Accessible::AppendTextTo(nsAString& aText, uint32_t aStartOffset,
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode public methods
|
||||
|
||||
void
|
||||
Accessible::Shutdown()
|
||||
{
|
||||
@ -2638,7 +2591,8 @@ Accessible::Shutdown()
|
||||
if (mParent)
|
||||
mParent->RemoveChild(this);
|
||||
|
||||
nsAccessNode::Shutdown();
|
||||
mContent = nullptr;
|
||||
mDoc = nullptr;
|
||||
}
|
||||
|
||||
// Accessible protected
|
||||
@ -2716,6 +2670,53 @@ Accessible::UnbindFromParent()
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible public methods
|
||||
|
||||
RootAccessible*
|
||||
Accessible::RootAccessible() const
|
||||
{
|
||||
nsCOMPtr<nsIDocShell> docShell = nsCoreUtils::GetDocShellFor(GetNode());
|
||||
NS_ASSERTION(docShell, "No docshell for mContent");
|
||||
if (!docShell) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> root;
|
||||
docShell->GetRootTreeItem(getter_AddRefs(root));
|
||||
NS_ASSERTION(root, "No root content tree item");
|
||||
if (!root) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
DocAccessible* docAcc = nsAccUtils::GetDocAccessibleFor(root);
|
||||
return docAcc ? docAcc->AsRoot() : nullptr;
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
Accessible::GetFrame() const
|
||||
{
|
||||
return mContent ? mContent->GetPrimaryFrame() : nullptr;
|
||||
}
|
||||
|
||||
nsINode*
|
||||
Accessible::GetNode() const
|
||||
{
|
||||
return mContent;
|
||||
}
|
||||
|
||||
void
|
||||
Accessible::Language(nsAString& aLanguage)
|
||||
{
|
||||
aLanguage.Truncate();
|
||||
|
||||
if (!mDoc)
|
||||
return;
|
||||
|
||||
nsCoreUtils::GetLanguageFor(mContent, nullptr, aLanguage);
|
||||
if (aLanguage.IsEmpty()) { // Nothing found, so use document's language
|
||||
mDoc->DocumentNode()->GetHeaderData(nsGkAtoms::headerContentLanguage,
|
||||
aLanguage);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Accessible::InvalidateChildren()
|
||||
{
|
||||
@ -3127,6 +3128,19 @@ Accessible::ContainerWidget() const
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible protected methods
|
||||
|
||||
void
|
||||
Accessible::LastRelease()
|
||||
{
|
||||
// First cleanup if needed...
|
||||
if (mDoc) {
|
||||
Shutdown();
|
||||
NS_ASSERTION(!mDoc,
|
||||
"A Shutdown() impl forgot to call its parent's Shutdown?");
|
||||
}
|
||||
// ... then die.
|
||||
delete this;
|
||||
}
|
||||
|
||||
void
|
||||
Accessible::CacheChildren()
|
||||
{
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "mozilla/a11y/RelationType.h"
|
||||
#include "mozilla/a11y/Role.h"
|
||||
#include "mozilla/a11y/States.h"
|
||||
#include "nsAccessNode.h"
|
||||
|
||||
#include "nsIAccessible.h"
|
||||
#include "nsIAccessibleHyperLink.h"
|
||||
@ -36,6 +35,7 @@ namespace a11y {
|
||||
class Accessible;
|
||||
class AccEvent;
|
||||
class AccGroupInfo;
|
||||
class DocAccessible;
|
||||
class EmbeddedObjCollector;
|
||||
class HTMLImageMapAccessible;
|
||||
class HTMLLIAccessible;
|
||||
@ -43,6 +43,7 @@ class HyperTextAccessible;
|
||||
class ImageAccessible;
|
||||
class KeyBinding;
|
||||
class Relation;
|
||||
class RootAccessible;
|
||||
class TableAccessible;
|
||||
class TableCellAccessible;
|
||||
class TextLeafAccessible;
|
||||
@ -101,8 +102,7 @@ typedef nsRefPtrHashtable<nsPtrHashKey<const void>, Accessible>
|
||||
{ 0xbd, 0x50, 0x42, 0x6b, 0xd1, 0xd6, 0xe1, 0xad } \
|
||||
}
|
||||
|
||||
class Accessible : public nsAccessNode,
|
||||
public nsIAccessible,
|
||||
class Accessible : public nsIAccessible,
|
||||
public nsIAccessibleHyperLink,
|
||||
public nsIAccessibleSelectable,
|
||||
public nsIAccessibleValue
|
||||
@ -111,8 +111,8 @@ public:
|
||||
Accessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
virtual ~Accessible();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(Accessible, nsAccessNode)
|
||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(Accessible, nsIAccessible)
|
||||
|
||||
NS_DECL_NSIACCESSIBLE
|
||||
NS_DECL_NSIACCESSIBLEHYPERLINK
|
||||
@ -120,14 +120,51 @@ public:
|
||||
NS_DECL_NSIACCESSIBLEVALUE
|
||||
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLE_IMPL_IID)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode
|
||||
|
||||
virtual void Shutdown();
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Public methods
|
||||
|
||||
/**
|
||||
* Return the document accessible for this accessible.
|
||||
*/
|
||||
DocAccessible* Document() const { return mDoc; }
|
||||
|
||||
/**
|
||||
* Return the root document accessible for this accessible.
|
||||
*/
|
||||
a11y::RootAccessible* RootAccessible() const;
|
||||
|
||||
/**
|
||||
* Return frame for this accessible.
|
||||
*/
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
|
||||
/**
|
||||
* Return DOM node associated with the accessible.
|
||||
*/
|
||||
virtual nsINode* GetNode() const;
|
||||
inline already_AddRefed<nsIDOMNode> DOMNode() const
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> DOMNode = do_QueryInterface(GetNode());
|
||||
return DOMNode.forget();
|
||||
}
|
||||
nsIContent* GetContent() const { return mContent; }
|
||||
|
||||
/**
|
||||
* Return node type information of DOM node associated with the accessible.
|
||||
*/
|
||||
bool IsContent() const
|
||||
{ return GetNode() && GetNode()->IsNodeOfType(nsINode::eCONTENT); }
|
||||
|
||||
/**
|
||||
* Return the unique identifier of the accessible.
|
||||
*/
|
||||
void* UniqueID() { return static_cast<void*>(this); }
|
||||
|
||||
/**
|
||||
* Return language associated with the accessible.
|
||||
*/
|
||||
void Language(nsAString& aLocale);
|
||||
|
||||
/**
|
||||
* Get the description of this accessible.
|
||||
*/
|
||||
@ -146,15 +183,6 @@ public:
|
||||
*/
|
||||
virtual ENameValueFlag Name(nsString& aName);
|
||||
|
||||
/**
|
||||
* Return DOM node associated with this accessible.
|
||||
*/
|
||||
inline already_AddRefed<nsIDOMNode> DOMNode() const
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> DOMNode = do_QueryInterface(GetNode());
|
||||
return DOMNode.forget();
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps ARIA state attributes to state of accessible. Note the given state
|
||||
* argument should hold states for accessible before you pass it into this
|
||||
@ -300,6 +328,11 @@ public:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Initializing methods
|
||||
|
||||
/**
|
||||
* Shutdown this accessible object.
|
||||
*/
|
||||
virtual void Shutdown();
|
||||
|
||||
/**
|
||||
* Set the ARIA role map entry for a new accessible.
|
||||
*/
|
||||
@ -384,7 +417,6 @@ public:
|
||||
return childCount != 0 ? GetChildAt(childCount - 1) : nullptr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return embedded accessible children count.
|
||||
*/
|
||||
@ -756,6 +788,11 @@ protected:
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Initializing, cache and tree traverse methods
|
||||
|
||||
/**
|
||||
* Destroy the object.
|
||||
*/
|
||||
void LastRelease();
|
||||
|
||||
/**
|
||||
* Cache accessible children.
|
||||
*/
|
||||
@ -900,6 +937,9 @@ protected:
|
||||
AccGroupInfo* GetGroupInfo();
|
||||
|
||||
// Data Members
|
||||
nsCOMPtr<nsIContent> mContent;
|
||||
DocAccessible* mDoc;
|
||||
|
||||
nsRefPtr<Accessible> mParent;
|
||||
nsTArray<nsRefPtr<Accessible> > mChildren;
|
||||
int32_t mIndexInParent;
|
||||
@ -932,6 +972,12 @@ protected:
|
||||
* Non-null indicates author-supplied role; possibly state & value as well
|
||||
*/
|
||||
nsRoleMapEntry* mRoleMapEntry;
|
||||
|
||||
private:
|
||||
Accessible() MOZ_DELETE;
|
||||
Accessible(const Accessible&) MOZ_DELETE;
|
||||
Accessible& operator =(const Accessible&) MOZ_DELETE;
|
||||
|
||||
};
|
||||
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(Accessible,
|
||||
|
@ -265,7 +265,7 @@ ApplicationAccessible::GetPlatformVersion(nsAString& aVersion)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode public methods
|
||||
// Accessible public methods
|
||||
|
||||
void
|
||||
ApplicationAccessible::Shutdown()
|
||||
@ -273,10 +273,6 @@ ApplicationAccessible::Shutdown()
|
||||
mAppInfo = nullptr;
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible public methods
|
||||
|
||||
void
|
||||
ApplicationAccessible::ApplyARIAState(uint64_t* aState) const
|
||||
{
|
||||
|
@ -57,10 +57,8 @@ public:
|
||||
// nsIAccessibleApplication
|
||||
NS_DECL_NSIACCESSIBLEAPPLICATION
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual already_AddRefed<nsIPersistentProperties> NativeAttributes() MOZ_OVERRIDE;
|
||||
virtual GroupPos GroupPosition();
|
||||
virtual ENameValueFlag Name(nsString& aName);
|
||||
|
@ -155,7 +155,7 @@ LinkableAccessible::AccessKey() const
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// LinkableAccessible. nsAccessNode
|
||||
// LinkableAccessible. Accessible
|
||||
|
||||
void
|
||||
LinkableAccessible::Shutdown()
|
||||
|
@ -64,10 +64,8 @@ public:
|
||||
NS_IMETHOD DoAction(uint8_t index);
|
||||
NS_IMETHOD TakeFocus();
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual void Value(nsString& aValue);
|
||||
virtual uint64_t NativeLinkState() const;
|
||||
|
||||
|
@ -552,7 +552,7 @@ DocAccessible::GetAccessible(nsINode* aNode) const
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode
|
||||
// Accessible
|
||||
|
||||
void
|
||||
DocAccessible::Init()
|
||||
|
@ -71,14 +71,13 @@ public:
|
||||
// nsIDocumentObserver
|
||||
NS_DECL_NSIDOCUMENTOBSERVER
|
||||
|
||||
// nsAccessNode
|
||||
// Accessible
|
||||
virtual void Init();
|
||||
virtual void Shutdown();
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
virtual nsINode* GetNode() const { return mDocumentNode; }
|
||||
nsIDocument* DocumentNode() const { return mDocumentNode; }
|
||||
|
||||
// Accessible
|
||||
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName);
|
||||
virtual void Description(nsString& aDescription);
|
||||
virtual Accessible* FocusedChild();
|
||||
@ -222,7 +221,7 @@ public:
|
||||
/**
|
||||
* Return the cached accessible by the given unique ID within this document.
|
||||
*
|
||||
* @note the unique ID matches with the uniqueID() of nsAccessNode
|
||||
* @note the unique ID matches with the uniqueID() of Accessible
|
||||
*
|
||||
* @param aUniqueID [in] the unique ID used to cache the node.
|
||||
*/
|
||||
|
@ -102,7 +102,7 @@ OuterDocAccessible::DoAction(uint8_t aIndex)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode public
|
||||
// Accessible public
|
||||
|
||||
void
|
||||
OuterDocAccessible::Shutdown()
|
||||
@ -133,9 +133,6 @@ OuterDocAccessible::Shutdown()
|
||||
AccessibleWrap::Shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Accessible public
|
||||
|
||||
void
|
||||
OuterDocAccessible::InvalidateChildren()
|
||||
{
|
||||
|
@ -33,10 +33,8 @@ public:
|
||||
NS_IMETHOD GetActionDescription(uint8_t aIndex, nsAString& aDescription);
|
||||
NS_IMETHOD DoAction(uint8_t aIndex);
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
|
||||
EWhichChildAtPoint aWhichChild);
|
||||
|
@ -467,12 +467,12 @@ RootAccessible::ProcessDOMEvent(nsIDOMEvent* aDOMEvent)
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode
|
||||
// Accessible
|
||||
|
||||
void
|
||||
RootAccessible::Shutdown()
|
||||
{
|
||||
// Called manually or by nsAccessNode::LastRelease()
|
||||
// Called manually or by Accessible::LastRelease()
|
||||
if (!PresShell())
|
||||
return; // Already shutdown
|
||||
|
||||
|
@ -29,10 +29,8 @@ public:
|
||||
// nsIDOMEventListener
|
||||
NS_IMETHOD HandleEvent(nsIDOMEvent* aEvent);
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual mozilla::a11y::ENameValueFlag Name(nsString& aName);
|
||||
virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
|
@ -147,7 +147,7 @@ HTMLListBulletAccessible::
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLListBulletAccessible: nsAccessNode
|
||||
// HTMLListBulletAccessible: Accessible
|
||||
|
||||
nsIFrame*
|
||||
HTMLListBulletAccessible::GetFrame() const
|
||||
@ -156,9 +156,6 @@ HTMLListBulletAccessible::GetFrame() const
|
||||
return blockFrame ? blockFrame->GetBullet() : nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLListBulletAccessible: Accessible
|
||||
|
||||
ENameValueFlag
|
||||
HTMLListBulletAccessible::Name(nsString &aName)
|
||||
{
|
||||
|
@ -46,14 +46,12 @@ public:
|
||||
// nsISupports
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// nsIAccessible
|
||||
NS_IMETHOD GetBounds(int32_t* aX, int32_t* aY,
|
||||
int32_t* aWidth, int32_t* aHeight);
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual a11y::role NativeRole();
|
||||
virtual uint64_t NativeState();
|
||||
|
||||
@ -78,10 +76,8 @@ public:
|
||||
HTMLListBulletAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
virtual ~HTMLListBulletAccessible() { }
|
||||
|
||||
// nsAccessNode
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
|
||||
// Accessible
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
virtual ENameValueFlag Name(nsString& aName);
|
||||
virtual a11y::role NativeRole();
|
||||
virtual uint64_t NativeState();
|
||||
|
@ -595,7 +595,7 @@ HTMLComboboxListAccessible::
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLComboboxAccessible: nsAccessNode
|
||||
// HTMLComboboxAccessible: Accessible
|
||||
|
||||
nsIFrame*
|
||||
HTMLComboboxListAccessible::GetFrame() const
|
||||
@ -612,9 +612,6 @@ HTMLComboboxListAccessible::GetFrame() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLComboboxAccessible: Accessible
|
||||
|
||||
role
|
||||
HTMLComboboxListAccessible::NativeRole()
|
||||
{
|
||||
|
@ -175,10 +175,8 @@ public:
|
||||
NS_IMETHOD DoAction(uint8_t index);
|
||||
NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName);
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual void Description(nsString& aDescription);
|
||||
virtual void Value(nsString& aValue);
|
||||
virtual a11y::role NativeRole();
|
||||
@ -221,10 +219,8 @@ public:
|
||||
DocAccessible* aDoc);
|
||||
virtual ~HTMLComboboxListAccessible() {}
|
||||
|
||||
// nsAccessNode
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
|
||||
// Accessible
|
||||
virtual nsIFrame* GetFrame() const;
|
||||
virtual a11y::role NativeRole();
|
||||
virtual uint64_t NativeState();
|
||||
virtual void GetBoundsRect(nsRect& aBounds, nsIFrame** aBoundingFrame);
|
||||
|
@ -365,7 +365,7 @@ NS_IMPL_ISUPPORTS_INHERITED1(HTMLTableAccessible, Accessible,
|
||||
nsIAccessibleTable)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//nsAccessNode
|
||||
// HTMLTableAccessible: Accessible
|
||||
|
||||
void
|
||||
HTMLTableAccessible::Shutdown()
|
||||
@ -374,10 +374,6 @@ HTMLTableAccessible::Shutdown()
|
||||
AccessibleWrap::Shutdown();
|
||||
}
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLTableAccessible: Accessible implementation
|
||||
|
||||
void
|
||||
HTMLTableAccessible::CacheChildren()
|
||||
{
|
||||
|
@ -163,10 +163,8 @@ public:
|
||||
virtual bool IsProbablyLayoutTable();
|
||||
virtual Accessible* AsAccessible() { return this; }
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual TableAccessible* AsTable() { return this; }
|
||||
virtual void Description(nsString& aDescription);
|
||||
virtual a11y::role NativeRole();
|
||||
|
@ -77,7 +77,7 @@ DocAccessibleWrap::get_accValue(VARIANT aVarChild, BSTR __RPC_FAR* aValue)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// nsAccessNode
|
||||
// Accessible
|
||||
|
||||
void
|
||||
DocAccessibleWrap::Shutdown()
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
/* [optional][in] */ VARIANT varChild,
|
||||
/* [retval][out] */ BSTR __RPC_FAR *pszValue);
|
||||
|
||||
// nsAccessNode
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
|
||||
// DocAccessible
|
||||
|
@ -25,7 +25,7 @@ HTMLWin32ObjectOwnerAccessible::
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLWin32ObjectOwnerAccessible: nsAccessNode implementation
|
||||
// HTMLWin32ObjectOwnerAccessible: Accessible implementation
|
||||
|
||||
void
|
||||
HTMLWin32ObjectOwnerAccessible::Shutdown()
|
||||
@ -34,9 +34,6 @@ HTMLWin32ObjectOwnerAccessible::Shutdown()
|
||||
mNativeAccessible = nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HTMLWin32ObjectOwnerAccessible: Accessible implementation
|
||||
|
||||
role
|
||||
HTMLWin32ObjectOwnerAccessible::NativeRole()
|
||||
{
|
||||
|
@ -26,10 +26,8 @@ public:
|
||||
DocAccessible* aDoc, void* aHwnd);
|
||||
virtual ~HTMLWin32ObjectOwnerAccessible() {}
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual mozilla::a11y::role NativeRole();
|
||||
virtual bool NativelyUnavailable() const;
|
||||
|
||||
|
@ -133,7 +133,7 @@ XULListboxAccessible::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//nsAccessNode
|
||||
// Accessible
|
||||
|
||||
void
|
||||
XULListboxAccessible::Shutdown()
|
||||
|
@ -92,10 +92,8 @@ public:
|
||||
virtual void UnselectRow(uint32_t aRowIdx);
|
||||
virtual Accessible* AsAccessible() { return this; }
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual void Value(nsString& aValue);
|
||||
virtual TableAccessible* AsTable() { return this; }
|
||||
virtual a11y::role NativeRole();
|
||||
|
@ -36,7 +36,7 @@ XULSelectControlAccessible::
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULSelectControlAccessible: nsAccessNode
|
||||
// XULSelectControlAccessible: Accessible
|
||||
|
||||
void
|
||||
XULSelectControlAccessible::Shutdown()
|
||||
|
@ -22,7 +22,7 @@ public:
|
||||
XULSelectControlAccessible(nsIContent* aContent, DocAccessible* aDoc);
|
||||
virtual ~XULSelectControlAccessible() {}
|
||||
|
||||
// nsAccessNode
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
|
||||
// SelectAccessible
|
||||
|
@ -134,7 +134,7 @@ XULTreeAccessible::Value(nsString& aValue)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeAccessible: nsAccessNode implementation
|
||||
// XULTreeAccessible: Accessible implementation
|
||||
|
||||
void
|
||||
XULTreeAccessible::Shutdown()
|
||||
@ -151,9 +151,6 @@ XULTreeAccessible::Shutdown()
|
||||
AccessibleWrap::Shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeAccessible: Accessible implementation (put methods here)
|
||||
|
||||
role
|
||||
XULTreeAccessible::NativeRole()
|
||||
{
|
||||
@ -889,7 +886,7 @@ XULTreeItemAccessibleBase::DoAction(uint8_t aIndex)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeItemAccessibleBase: nsAccessNode implementation
|
||||
// XULTreeItemAccessibleBase: Accessible implementation
|
||||
|
||||
void
|
||||
XULTreeItemAccessibleBase::Shutdown()
|
||||
@ -901,10 +898,6 @@ XULTreeItemAccessibleBase::Shutdown()
|
||||
AccessibleWrap::Shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeItemAccessibleBase: Accessible public methods
|
||||
|
||||
// nsIAccessible::groupPosition
|
||||
GroupPos
|
||||
XULTreeItemAccessibleBase::GroupPosition()
|
||||
{
|
||||
@ -1134,7 +1127,7 @@ XULTreeItemAccessible::Name(nsString& aName)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeItemAccessible: nsAccessNode implementation
|
||||
// XULTreeItemAccessible: Accessible implementation
|
||||
|
||||
void
|
||||
XULTreeItemAccessible::Shutdown()
|
||||
@ -1143,9 +1136,6 @@ XULTreeItemAccessible::Shutdown()
|
||||
XULTreeItemAccessibleBase::Shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeItemAccessible: Accessible implementation
|
||||
|
||||
role
|
||||
XULTreeItemAccessible::NativeRole()
|
||||
{
|
||||
|
@ -38,10 +38,8 @@ public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeAccessible, Accessible)
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual void Value(nsString& aValue);
|
||||
virtual a11y::role NativeRole();
|
||||
virtual uint64_t NativeState();
|
||||
@ -155,10 +153,8 @@ public:
|
||||
NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName);
|
||||
NS_IMETHOD DoAction(uint8_t aIndex);
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual GroupPos GroupPosition();
|
||||
virtual uint64_t NativeState();
|
||||
virtual uint64_t NativeInteractiveState() const;
|
||||
@ -236,10 +232,8 @@ public:
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeItemAccessible,
|
||||
XULTreeItemAccessibleBase)
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual ENameValueFlag Name(nsString& aName);
|
||||
virtual a11y::role NativeRole();
|
||||
|
||||
|
@ -220,7 +220,7 @@ XULTreeGridAccessible::UnselectRow(uint32_t aRowIdx)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeGridAccessible: nsAccessNode implementation
|
||||
// XULTreeGridAccessible: Accessible implementation
|
||||
|
||||
void
|
||||
XULTreeGridAccessible::Shutdown()
|
||||
@ -229,9 +229,6 @@ XULTreeGridAccessible::Shutdown()
|
||||
XULTreeAccessible::Shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeGridAccessible: Accessible implementation
|
||||
|
||||
role
|
||||
XULTreeGridAccessible::NativeRole()
|
||||
{
|
||||
@ -291,7 +288,7 @@ NS_IMPL_RELEASE_INHERITED(XULTreeGridRowAccessible,
|
||||
XULTreeItemAccessibleBase)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeGridRowAccessible: nsAccessNode implementation
|
||||
// XULTreeGridRowAccessible: Accessible implementation
|
||||
|
||||
void
|
||||
XULTreeGridRowAccessible::Shutdown()
|
||||
@ -300,9 +297,6 @@ XULTreeGridRowAccessible::Shutdown()
|
||||
XULTreeItemAccessibleBase::Shutdown();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// XULTreeGridRowAccessible: Accessible implementation
|
||||
|
||||
role
|
||||
XULTreeGridRowAccessible::NativeRole()
|
||||
{
|
||||
|
@ -54,10 +54,8 @@ public:
|
||||
virtual void UnselectRow(uint32_t aRowIdx);
|
||||
virtual Accessible* AsAccessible() { return this; }
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual TableAccessible* AsTable() { return this; }
|
||||
virtual a11y::role NativeRole();
|
||||
|
||||
@ -86,10 +84,8 @@ public:
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(XULTreeGridRowAccessible,
|
||||
XULTreeItemAccessibleBase)
|
||||
|
||||
// nsAccessNode
|
||||
virtual void Shutdown();
|
||||
|
||||
// Accessible
|
||||
virtual void Shutdown();
|
||||
virtual a11y::role NativeRole();
|
||||
virtual ENameValueFlag Name(nsString& aName);
|
||||
virtual Accessible* ChildAtPoint(int32_t aX, int32_t aY,
|
||||
|
@ -568,6 +568,10 @@ pref("dom.disable_window_showModalDialog", true);
|
||||
pref("dom.experimental_forms", true);
|
||||
pref("dom.forms.number", true);
|
||||
|
||||
// Don't enable <input type=color> yet as we don't have a color picker
|
||||
// implemented for b2g (bug 875751)
|
||||
pref("dom.forms.color", false);
|
||||
|
||||
// Turns on gralloc-based direct texturing for Gonk
|
||||
pref("gfx.gralloc.enabled", false);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{
|
||||
"revision": "166023c341cca944563c410f05dff37a992cb05b",
|
||||
"revision": "d2dbad943faf566fe36dbe79086127da837af6a3",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
MOZ_APP_BASENAME=B2G
|
||||
MOZ_APP_VENDOR=Mozilla
|
||||
|
||||
MOZ_APP_VERSION=27.0a1
|
||||
MOZ_APP_VERSION=28.0a1
|
||||
MOZ_APP_UA_NAME=Firefox
|
||||
|
||||
MOZ_UA_OS_AGNOSTIC=1
|
||||
|
@ -545,9 +545,6 @@
|
||||
@BINPATH@/components/TCPSocketParentIntermediary.js
|
||||
@BINPATH@/components/TCPSocket.manifest
|
||||
|
||||
@BINPATH@/components/AppProtocolHandler.js
|
||||
@BINPATH@/components/AppProtocolHandler.manifest
|
||||
|
||||
@BINPATH@/components/Payment.js
|
||||
@BINPATH@/components/PaymentFlowInfo.js
|
||||
@BINPATH@/components/PaymentRequestInfo.js
|
||||
|
@ -1186,7 +1186,7 @@ pref("devtools.webconsole.filter.network", true);
|
||||
pref("devtools.webconsole.filter.networkinfo", true);
|
||||
pref("devtools.webconsole.filter.netwarn", true);
|
||||
pref("devtools.webconsole.filter.csserror", true);
|
||||
pref("devtools.webconsole.filter.cssparser", true);
|
||||
pref("devtools.webconsole.filter.cssparser", false);
|
||||
pref("devtools.webconsole.filter.csslog", false);
|
||||
pref("devtools.webconsole.filter.exception", true);
|
||||
pref("devtools.webconsole.filter.jswarn", true);
|
||||
|
@ -149,60 +149,28 @@ function basicNotification() {
|
||||
}
|
||||
}
|
||||
};
|
||||
this.addOptions = function(options) {
|
||||
for (let [name, value] in Iterator(options))
|
||||
self.options[name] = value;
|
||||
}
|
||||
}
|
||||
|
||||
basicNotification.prototype.addOptions = function(options) {
|
||||
for (let [name, value] in Iterator(options))
|
||||
this.options[name] = value;
|
||||
};
|
||||
|
||||
function errorNotification() {
|
||||
var self = this;
|
||||
this.browser = gBrowser.selectedBrowser;
|
||||
this.id = "test-notification-" + gTestIndex;
|
||||
this.message = "This is popup notification " + this.id + " from test " + gTestIndex;
|
||||
this.anchorID = null;
|
||||
this.mainAction = {
|
||||
label: "Main Action",
|
||||
accessKey: "M",
|
||||
callback: function () {
|
||||
self.mainActionClicked = true;
|
||||
throw new Error("Oops!");
|
||||
}
|
||||
this.mainAction.callback = function () {
|
||||
self.mainActionClicked = true;
|
||||
throw new Error("Oops!");
|
||||
};
|
||||
this.secondaryActions = [
|
||||
{
|
||||
label: "Secondary Action",
|
||||
accessKey: "S",
|
||||
callback: function () {
|
||||
self.secondaryActionClicked = true;
|
||||
throw new Error("Oops!");
|
||||
}
|
||||
}
|
||||
];
|
||||
this.options = {
|
||||
eventCallback: function (eventName) {
|
||||
switch (eventName) {
|
||||
case "dismissed":
|
||||
self.dismissalCallbackTriggered = true;
|
||||
break;
|
||||
case "showing":
|
||||
self.showingCallbackTriggered = true;
|
||||
break;
|
||||
case "shown":
|
||||
self.shownCallbackTriggered = true;
|
||||
break;
|
||||
case "removed":
|
||||
self.removedCallbackTriggered = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.secondaryActions[0].callback = function () {
|
||||
self.secondaryActionClicked = true;
|
||||
throw new Error("Oops!");
|
||||
};
|
||||
this.addOptions = function(options) {
|
||||
for (let [name, value] in Iterator(options))
|
||||
self.options[name] = value;
|
||||
}
|
||||
}
|
||||
|
||||
errorNotification.prototype = new basicNotification();
|
||||
errorNotification.prototype.constructor = errorNotification;
|
||||
|
||||
var wrongBrowserNotificationObject = new basicNotification();
|
||||
var wrongBrowserNotification;
|
||||
|
||||
|
@ -91,6 +91,9 @@ support-files =
|
||||
[browser_485563.js]
|
||||
[browser_490040.js]
|
||||
[browser_491168.js]
|
||||
# Disabled for too many intermittent failures.
|
||||
# Can be re-enabled once bug 930202 lands.
|
||||
skip-if = true
|
||||
[browser_491577.js]
|
||||
[browser_495495.js]
|
||||
[browser_500328.js]
|
||||
|
@ -64,6 +64,9 @@ support-files =
|
||||
[browser_tabview_bug622835.js]
|
||||
[browser_tabview_bug623768.js]
|
||||
[browser_tabview_bug624265_perwindowpb.js]
|
||||
# Disabled for too many intermittent failures (bug 921984).
|
||||
# Will hopefully be fixed by bug 930202.
|
||||
skip-if = true
|
||||
[browser_tabview_bug624692.js]
|
||||
[browser_tabview_bug624727_perwindowpb.js]
|
||||
[browser_tabview_bug624847.js]
|
||||
|
@ -1 +1 @@
|
||||
27.0a1
|
||||
28.0a1
|
||||
|
@ -14,7 +14,7 @@ const {AppProjects} = require("devtools/app-manager/app-projects");
|
||||
const {AppValidator} = require("devtools/app-manager/app-validator");
|
||||
const {Services} = Cu.import("resource://gre/modules/Services.jsm");
|
||||
const {FileUtils} = Cu.import("resource://gre/modules/FileUtils.jsm");
|
||||
const {installHosted, installPackaged, getTargetForApp} = require("devtools/app-actor-front");
|
||||
const {installHosted, installPackaged, getTargetForApp, reloadApp} = require("devtools/app-actor-front");
|
||||
const {EventEmitter} = Cu.import("resource:///modules/devtools/shared/event-emitter.js");
|
||||
|
||||
const promise = require("sdk/core/promise");
|
||||
@ -176,16 +176,26 @@ let UI = {
|
||||
return this.install(project);
|
||||
}
|
||||
})
|
||||
.then(
|
||||
() => {
|
||||
.then(() => {
|
||||
button.disabled = false;
|
||||
},
|
||||
(res) => {
|
||||
button.disabled = false;
|
||||
let message = res.error + ": " + res.message;
|
||||
alert(message);
|
||||
this.connection.log(message);
|
||||
});
|
||||
// Finally try to reload the app if it is already opened
|
||||
this.reload(project);
|
||||
},
|
||||
(res) => {
|
||||
button.disabled = false;
|
||||
let message = res.error + ": " + res.message;
|
||||
alert(message);
|
||||
this.connection.log(message);
|
||||
});
|
||||
},
|
||||
|
||||
reload: function (project) {
|
||||
return reloadApp(this.connection.client,
|
||||
this.listTabsResponse.webappsActor,
|
||||
this._getProjectManifestURL(project)).
|
||||
then(() => {
|
||||
this.connection.log("App reloaded");
|
||||
});
|
||||
},
|
||||
|
||||
remove: function(location, event) {
|
||||
|
@ -201,7 +201,7 @@ function navigate(aTarget, aUrl) {
|
||||
|
||||
function reload(aTarget) {
|
||||
let navigated = once(aTarget, "navigate");
|
||||
aTarget.client.activeTab.reload();
|
||||
executeSoon(() => aTarget.client.activeTab.reload());
|
||||
return navigated;
|
||||
}
|
||||
|
||||
|
@ -521,9 +521,6 @@
|
||||
@BINPATH@/components/TCPSocketParentIntermediary.js
|
||||
@BINPATH@/components/TCPSocket.manifest
|
||||
|
||||
@BINPATH@/components/AppProtocolHandler.js
|
||||
@BINPATH@/components/AppProtocolHandler.manifest
|
||||
|
||||
@BINPATH@/components/Payment.js
|
||||
@BINPATH@/components/PaymentFlowInfo.js
|
||||
@BINPATH@/components/PaymentRequestInfo.js
|
||||
|
@ -238,7 +238,8 @@
|
||||
autocompletesearch="history"
|
||||
autocompletepopup="urlbar-autocomplete"
|
||||
completeselectedindex="true"
|
||||
placeholder="&urlbar.emptytext;"/>
|
||||
placeholder="&urlbar.emptytext;"
|
||||
onclick="SelectionHelperUI.urlbarClick();"/>
|
||||
|
||||
<toolbarbutton id="go-button" class="urlbar-button"
|
||||
command="cmd_go"/>
|
||||
|
@ -25,6 +25,7 @@ var SelectionHandler = {
|
||||
addMessageListener("Browser:SelectionSwitchMode", this);
|
||||
addMessageListener("Browser:RepositionInfoRequest", this);
|
||||
addMessageListener("Browser:SelectionHandlerPing", this);
|
||||
addMessageListener("Browser:ResetLastPos", this);
|
||||
},
|
||||
|
||||
shutdown: function shutdown() {
|
||||
@ -44,6 +45,7 @@ var SelectionHandler = {
|
||||
removeMessageListener("Browser:SelectionSwitchMode", this);
|
||||
removeMessageListener("Browser:RepositionInfoRequest", this);
|
||||
removeMessageListener("Browser:SelectionHandlerPing", this);
|
||||
removeMessageListener("Browser:ResetLastPos", this);
|
||||
},
|
||||
|
||||
sendAsync: function sendAsync(aMsg, aJson) {
|
||||
@ -543,6 +545,10 @@ var SelectionHandler = {
|
||||
case "Browser:SelectionHandlerPing":
|
||||
this._onPing(json.id);
|
||||
break;
|
||||
|
||||
case "Browser:ResetLastPos":
|
||||
this._onClickCoords(json.xPos, json.yPos);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -792,6 +792,16 @@ var SelectionHelperUI = {
|
||||
* Event handlers for document events
|
||||
*/
|
||||
|
||||
urlbarClick: function() {
|
||||
// Workaround for bug 925457: taping browser chrome resets last tap
|
||||
// co-ordinates to 'undefined' so that we know not to shift the browser
|
||||
// when the keyboard is up (in SelectionHandler._calcNewContentPosition())
|
||||
Browser.selectedTab.browser.messageManager.sendAsyncMessage("Browser:ResetLastPos", {
|
||||
xPos: null,
|
||||
yPos: null
|
||||
});
|
||||
},
|
||||
|
||||
/*
|
||||
* Handles taps that move the current caret around in text edits,
|
||||
* clear active selection and focus when neccessary, or change
|
||||
|
@ -648,3 +648,7 @@ pref("full-screen-api.ignore-widgets", true);
|
||||
pref("layout.imagevisibility.enabled", true);
|
||||
pref("layout.imagevisibility.numscrollportwidths", 1);
|
||||
pref("layout.imagevisibility.numscrollportheights", 1);
|
||||
|
||||
// Don't enable <input type=color> yet as we don't have a color picker
|
||||
// implemented for Windows Metro (bug 895464)
|
||||
pref("dom.forms.color", false);
|
||||
|
@ -63,7 +63,8 @@
|
||||
|
||||
.theme-comment,
|
||||
.cm-s-mozilla .cm-meta,
|
||||
.cm-s-mozilla .cm-hr { /* grey */
|
||||
.cm-s-mozilla .cm-hr,
|
||||
.cm-s-mozilla .cm-comment { /* grey */
|
||||
color: #5c6773;
|
||||
}
|
||||
|
||||
@ -79,8 +80,7 @@
|
||||
|
||||
.theme-fg-color1,
|
||||
.cm-s-mozilla .cm-variable-2,
|
||||
.cm-s-mozilla .cm-quote,
|
||||
.cm-s-mozilla .CodeMirror-matchingbracket { /* green */
|
||||
.cm-s-mozilla .cm-quote { /* green */
|
||||
color: #5c9966;
|
||||
}
|
||||
|
||||
@ -101,8 +101,7 @@
|
||||
color: #a673bf;
|
||||
}
|
||||
|
||||
.theme-fg-color4,
|
||||
.cm-s-mozilla .cm-comment { /* purple/violet */
|
||||
.theme-fg-color4 { /* purple/violet */
|
||||
color: #6270b2;
|
||||
}
|
||||
|
||||
@ -119,7 +118,6 @@
|
||||
}
|
||||
|
||||
.theme-fg-color7,
|
||||
.cm-s-mozilla .CodeMirror-nonmatchingbracket,
|
||||
.cm-s-mozilla .cm-string-2,
|
||||
.cm-s-mozilla .cm-error { /* Red */
|
||||
color: #bf5656;
|
||||
@ -160,12 +158,20 @@
|
||||
background: rgb(185, 215, 253);
|
||||
}
|
||||
|
||||
.dcm-s-mozilla .CodeMirror-selected { /* selected text (unfocused) */
|
||||
.cm-s-mozilla .CodeMirror-selected { /* selected text (unfocused) */
|
||||
background: rgb(176, 176, 176);
|
||||
}
|
||||
|
||||
.CodeMirror-activeline-background { /* selected color with alpha */
|
||||
background: rgba(185, 215, 253, .05);
|
||||
background: rgba(185, 215, 253, .15);
|
||||
}
|
||||
|
||||
.cm-s-mozilla .CodeMirror-linenumber { /* line number text */
|
||||
color: #5f7387;
|
||||
}
|
||||
|
||||
.cm-s-mozilla .CodeMirror-gutters { /* vertical line next to line numbers */
|
||||
border-right-color: #343c45;
|
||||
}
|
||||
|
||||
.cm-s-markup-view pre {
|
||||
|
@ -63,7 +63,8 @@
|
||||
|
||||
.theme-comment,
|
||||
.cm-s-mozilla .cm-meta,
|
||||
.cm-s-mozilla .cm-hr { /* grey */
|
||||
.cm-s-mozilla .cm-hr,
|
||||
.cm-s-mozilla .cm-comment { /* grey */
|
||||
color: hsl(90,2%,46%);
|
||||
}
|
||||
|
||||
@ -79,8 +80,7 @@
|
||||
|
||||
.theme-fg-color1,
|
||||
.cm-s-mozilla .cm-variable-2,
|
||||
.cm-s-mozilla .cm-quote,
|
||||
.cm-s-mozilla .CodeMirror-matchingbracket { /* green */
|
||||
.cm-s-mozilla .cm-quote { /* green */
|
||||
color: hsl(72,100%,27%);
|
||||
}
|
||||
|
||||
@ -101,8 +101,7 @@
|
||||
color: hsl(208,81%,21%)
|
||||
}
|
||||
|
||||
.theme-fg-color4,
|
||||
.cm-s-mozilla .cm-comment { /* Orange */
|
||||
.theme-fg-color4 { /* Orange */
|
||||
color: hsl(24,85%,39%);
|
||||
}
|
||||
|
||||
@ -119,7 +118,6 @@
|
||||
}
|
||||
|
||||
.theme-fg-color7,
|
||||
.cm-s-mozilla .CodeMirror-nonmatchingbracket,
|
||||
.cm-s-mozilla .cm-string-2,
|
||||
.cm-s-mozilla .cm-error { /* Red */
|
||||
color: #bf5656;
|
||||
@ -165,7 +163,20 @@
|
||||
}
|
||||
|
||||
.CodeMirror-activeline-background { /* selected color with alpha */
|
||||
background: rgba(185, 215, 253, .4);
|
||||
background: rgba(185, 215, 253, .35);
|
||||
}
|
||||
|
||||
div.cm-s-mozilla span.CodeMirror-matchingbracket { /* highlight brackets */
|
||||
outline: solid 1px rgba(0, 0, 0, .25);
|
||||
color: black;
|
||||
}
|
||||
|
||||
.cm-s-mozilla .CodeMirror-linenumber { /* line number text */
|
||||
color: #667380;
|
||||
}
|
||||
|
||||
.cm-s-mozilla .CodeMirror-gutters { /* vertical line next to line numbers */
|
||||
border-right-color: #a6a6a6;
|
||||
}
|
||||
|
||||
.cm-s-markup-view pre {
|
||||
|
@ -25,54 +25,41 @@ from mozbuild.mozinfo import write_mozinfo
|
||||
log_manager = LoggingManager()
|
||||
|
||||
|
||||
def config_status(topobjdir = '.', topsrcdir = '.',
|
||||
defines = [], non_global_defines = [], substs = [],
|
||||
files = [], headers = []):
|
||||
def config_status(topobjdir='.', topsrcdir='.',
|
||||
defines=[], non_global_defines=[], substs=[]):
|
||||
'''Main function, providing config.status functionality.
|
||||
|
||||
Contrary to config.status, it doesn't use CONFIG_FILES or CONFIG_HEADERS
|
||||
variables, but like config.status from autoconf 2.6, single files may be
|
||||
generated with the --file and --header options. Several such options can
|
||||
be given to generate several files at the same time.
|
||||
variables.
|
||||
|
||||
Without the -n option, this program acts as config.status and considers
|
||||
the current directory as the top object directory, even when config.status
|
||||
is in a different directory. It will, however, treat the directory
|
||||
containing config.status as the top object directory with the -n option,
|
||||
while files given to the --file and --header arguments are considered
|
||||
relative to the current directory.
|
||||
containing config.status as the top object directory with the -n option.
|
||||
|
||||
The --recheck option, like with the original config.status, runs configure
|
||||
again, with the options given in the "ac_configure_args" subst.
|
||||
|
||||
The options to this function are passed when creating the
|
||||
ConfigEnvironment, except for files and headers, which contain the list
|
||||
of files and headers to be generated by default. These lists, as well as
|
||||
the actual wrapper script around this function, are meant to be generated
|
||||
by configure. See build/autoconf/config.status.m4.
|
||||
|
||||
Unlike config.status behaviour with CONFIG_FILES and CONFIG_HEADERS,
|
||||
but like config.status behaviour with --file and --header, providing
|
||||
files or headers on the command line inhibits the default generation of
|
||||
files when given headers and headers when given files.
|
||||
|
||||
Unlike config.status, the FILE:TEMPLATE syntax is not supported for
|
||||
files and headers. The template is always the filename suffixed with
|
||||
'.in', in the corresponding directory under the top source directory.
|
||||
ConfigEnvironment. These lists, as well as the actual wrapper script
|
||||
around this function, are meant to be generated by configure.
|
||||
See build/autoconf/config.status.m4.
|
||||
'''
|
||||
|
||||
if 'CONFIG_FILES' in os.environ:
|
||||
raise Exception, 'Using the CONFIG_FILES environment variable is not supported. Use --file instead.'
|
||||
raise Exception('Using the CONFIG_FILES environment variable is not '
|
||||
'supported.')
|
||||
if 'CONFIG_HEADERS' in os.environ:
|
||||
raise Exception, 'Using the CONFIG_HEADERS environment variable is not supported. Use --header instead.'
|
||||
raise Exception('Using the CONFIG_HEADERS environment variable is not '
|
||||
'supported.')
|
||||
|
||||
if not os.path.isabs(topsrcdir):
|
||||
raise Exception('topsrcdir must be defined as an absolute directory: '
|
||||
'%s' % topsrcdir)
|
||||
|
||||
parser = OptionParser()
|
||||
parser.add_option('--recheck', dest='recheck', action='store_true',
|
||||
help='update config.status by reconfiguring in the same conditions')
|
||||
parser.add_option('--file', dest='files', metavar='FILE', action='append',
|
||||
help='instantiate the configuration file FILE')
|
||||
parser.add_option('--header', dest='headers', metavar='FILE', action='append',
|
||||
help='instantiate the configuration header FILE')
|
||||
parser.add_option('-v', '--verbose', dest='verbose', action='store_true',
|
||||
help='display verbose output')
|
||||
parser.add_option('-n', dest='not_topobjdir', action='store_true',
|
||||
@ -99,39 +86,15 @@ def config_status(topobjdir = '.', topsrcdir = '.',
|
||||
|
||||
if options.recheck:
|
||||
# Execute configure from the top object directory
|
||||
if not os.path.isabs(topsrcdir):
|
||||
topsrcdir = relpath(topsrcdir, topobjdir)
|
||||
os.chdir(topobjdir)
|
||||
os.execlp('sh', 'sh', '-c', ' '.join([os.path.join(topsrcdir, 'configure'), env.substs['ac_configure_args'], '--no-create', '--no-recursion']))
|
||||
|
||||
if options.files:
|
||||
files = options.files
|
||||
headers = []
|
||||
if options.headers:
|
||||
headers = options.headers
|
||||
if not options.files:
|
||||
files = []
|
||||
# Default to display messages when giving --file or --headers on the
|
||||
# command line.
|
||||
log_level = logging.INFO
|
||||
|
||||
if options.files or options.headers or options.verbose:
|
||||
log_level = logging.DEBUG
|
||||
|
||||
log_level = logging.DEBUG if options.verbose else logging.INFO
|
||||
log_manager.add_terminal_logging(level=log_level)
|
||||
log_manager.enable_unstructured()
|
||||
|
||||
if not options.files and not options.headers:
|
||||
print('Reticulating splines...', file=sys.stderr)
|
||||
summary = backend.consume(definitions)
|
||||
print('Reticulating splines...', file=sys.stderr)
|
||||
summary = backend.consume(definitions)
|
||||
|
||||
for line in summary.summaries():
|
||||
print(line, file=sys.stderr)
|
||||
|
||||
files = [os.path.join(topobjdir, f) for f in files]
|
||||
headers = [os.path.join(topobjdir, f) for f in headers]
|
||||
|
||||
for file in files:
|
||||
env.create_config_file(file)
|
||||
for header in headers:
|
||||
env.create_config_header(header)
|
||||
for line in summary.summaries():
|
||||
print(line, file=sys.stderr)
|
||||
|
@ -42,7 +42,7 @@ ifelse($#, 2, _MOZ_AC_DEFINE_UNQUOTED($1, $2), $#, 3, _MOZ_AC_DEFINE_UNQUOTED($1
|
||||
])
|
||||
|
||||
dnl Replace AC_OUTPUT to create and call a python config.status
|
||||
define([AC_OUTPUT],
|
||||
define([_MOZ_AC_OUTPUT],
|
||||
[dnl Top source directory in Windows format (as opposed to msys format).
|
||||
WIN_TOP_SRC=
|
||||
encoding=utf-8
|
||||
@ -121,33 +121,6 @@ done
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
] ]
|
||||
|
||||
dnl List of files to apply AC_SUBSTs to. This is the list of files given
|
||||
dnl as an argument to AC_OUTPUT ($1)
|
||||
files = [
|
||||
EOF
|
||||
|
||||
for out in $1; do
|
||||
echo " '$out'," >> $CONFIG_STATUS
|
||||
done
|
||||
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
]
|
||||
|
||||
dnl List of header files to apply AC_DEFINEs to. This is stored in the
|
||||
dnl AC_LIST_HEADER m4 macro by AC_CONFIG_HEADER.
|
||||
headers = [
|
||||
EOF
|
||||
|
||||
ifdef(<<<AC_LIST_HEADER>>>, <<<
|
||||
HEADERS="AC_LIST_HEADER"
|
||||
for header in $HEADERS; do
|
||||
echo " '$header'," >> $CONFIG_STATUS
|
||||
done
|
||||
>>>)dnl
|
||||
|
||||
cat >> $CONFIG_STATUS <<\EOF
|
||||
]
|
||||
|
||||
dnl List of AC_DEFINEs that aren't to be exposed in ALLDEFINES
|
||||
non_global_defines = [
|
||||
EOF
|
||||
@ -161,7 +134,7 @@ fi
|
||||
cat >> $CONFIG_STATUS <<EOF
|
||||
]
|
||||
|
||||
__all__ = ['topobjdir', 'topsrcdir', 'defines', 'non_global_defines', 'substs', 'files', 'headers']
|
||||
__all__ = ['topobjdir', 'topsrcdir', 'defines', 'non_global_defines', 'substs']
|
||||
|
||||
dnl Do the actual work
|
||||
if __name__ == '__main__':
|
||||
@ -182,4 +155,18 @@ if test "$no_create" != yes && ! ${PYTHON} $CONFIG_STATUS; then
|
||||
fi
|
||||
])
|
||||
|
||||
define([m4_fatal],[
|
||||
errprint([$1
|
||||
])
|
||||
m4exit(1)
|
||||
])
|
||||
|
||||
define([AC_OUTPUT], [ifelse($#_$1, 1_, [_MOZ_AC_OUTPUT()],
|
||||
[m4_fatal([Use CONFIGURE_SUBST_FILES in moz.build files to create substituted files.])]
|
||||
)])
|
||||
|
||||
define([AC_CONFIG_HEADER],
|
||||
[m4_fatal([Use CONFIGURE_DEFINE_FILES in moz.build files to produce header files.])
|
||||
])
|
||||
|
||||
AC_SUBST([MOZ_PSEUDO_DERECURSE])
|
||||
|
@ -53,7 +53,11 @@ In summary, manifests are ini files with section names describing test files::
|
||||
Keys under sections can hold metadata about each test::
|
||||
|
||||
[test_foo.js]
|
||||
skip-if = os == win
|
||||
skip-if = os == "win"
|
||||
[test_foo.js]
|
||||
skip-if = os == "linux" && debug
|
||||
[test_baz.js]
|
||||
fail-if = os == "mac" || os == "android"
|
||||
|
||||
There is a special **DEFAULT** section whose keys/metadata apply to all
|
||||
sections/tests::
|
||||
|
@ -349,25 +349,3 @@ class B2GRemoteAutomation(Automation):
|
||||
# this should never happen
|
||||
raise Exception("'kill' called on B2GInstance")
|
||||
|
||||
|
||||
class B2GDesktopAutomation(Automation):
|
||||
|
||||
def buildCommandLine(self, app, debuggerInfo, profileDir, testURL, extraArgs):
|
||||
""" build the application command line """
|
||||
|
||||
cmd = os.path.abspath(app)
|
||||
args = []
|
||||
|
||||
if debuggerInfo:
|
||||
args.extend(debuggerInfo["args"])
|
||||
args.append(cmd)
|
||||
cmd = os.path.abspath(debuggerInfo["path"])
|
||||
|
||||
if self.IS_MAC:
|
||||
args.append("-foreground")
|
||||
|
||||
profileDirectory = profileDir + "/"
|
||||
|
||||
args.extend(("-profile", profileDirectory))
|
||||
args.extend(extraArgs)
|
||||
return cmd, args
|
||||
|
@ -5,7 +5,12 @@
|
||||
|
||||
package @ANDROID_PACKAGE_NAME@;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.util.Base64;
|
||||
import android.util.Base64OutputStream;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.nio.MappedByteBuffer;
|
||||
@ -44,6 +49,15 @@ public class PaintedSurface {
|
||||
return mHeight;
|
||||
}
|
||||
|
||||
private int pixelAtIndex(int index) {
|
||||
int b1 = mPixelBuffer.get(index) & 0xFF;
|
||||
int b2 = mPixelBuffer.get(index + 1) & 0xFF;
|
||||
int b3 = mPixelBuffer.get(index + 2) & 0xFF;
|
||||
int b4 = mPixelBuffer.get(index + 3) & 0xFF;
|
||||
int value = (b1 << 24) + (b2 << 16) + (b3 << 8) + (b4 << 0);
|
||||
return value;
|
||||
}
|
||||
|
||||
public final int getPixelAt(int x, int y) {
|
||||
if (mPixelBuffer == null) {
|
||||
throw new RoboCopException("Trying to access PaintedSurface with no active PixelBuffer");
|
||||
@ -60,12 +74,27 @@ public class PaintedSurface {
|
||||
// The rows are reversed so row 0 is at the end and we start with the last row.
|
||||
// This is why we do mHeight-y;
|
||||
int index = (x + ((mHeight - y - 1) * mWidth)) * 4;
|
||||
int b1 = mPixelBuffer.get(index) & 0xFF;
|
||||
int b2 = mPixelBuffer.get(index + 1) & 0xFF;
|
||||
int b3 = mPixelBuffer.get(index + 2) & 0xFF;
|
||||
int b4 = mPixelBuffer.get(index + 3) & 0xFF;
|
||||
int value = (b1 << 24) + (b2 << 16) + (b3 << 8) + (b4 << 0);
|
||||
return value;
|
||||
return pixelAtIndex(index);
|
||||
}
|
||||
|
||||
public final String asDataUri() {
|
||||
try {
|
||||
Bitmap bm = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_8888);
|
||||
for (int y = 0; y < mHeight; y++) {
|
||||
for (int x = 0; x < mWidth; x++) {
|
||||
int index = (x + ((mHeight - y - 1) * mWidth)) * 4;
|
||||
bm.setPixel(x, y, pixelAtIndex(index));
|
||||
}
|
||||
}
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
out.write("data:image/png;base64,".getBytes());
|
||||
Base64OutputStream b64 = new Base64OutputStream(out, Base64.NO_WRAP);
|
||||
bm.compress(Bitmap.CompressFormat.PNG, 100, b64);
|
||||
return new String(out.toByteArray());
|
||||
} catch (Exception e) {
|
||||
FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, e);
|
||||
throw new RoboCopException("Unable to convert surface to a PNG data:uri");
|
||||
}
|
||||
}
|
||||
|
||||
public void close() {
|
||||
|
@ -4,10 +4,6 @@
|
||||
# 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/.
|
||||
|
||||
# For sanity's sake, we compile nsinstall without the wrapped system
|
||||
# headers, so that we can use it to set up the wrapped system headers.
|
||||
VISIBILITY_FLAGS =
|
||||
|
||||
# STDCXX_COMPAT is not needed here, and will actually fail because
|
||||
# libstdc++-compat is not built yet.
|
||||
MOZ_LIBSTDCXX_HOST_VERSION =
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
SUPPRESS_DEFAULT_RULES := 1
|
||||
STANDALONE_MAKEFILE := 1
|
||||
NO_MAKEFILE_RULE := 1
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
|
@ -10,4 +10,4 @@
|
||||
# hardcoded milestones in the tree from these two files.
|
||||
#--------------------------------------------------------
|
||||
|
||||
27.0a1
|
||||
28.0a1
|
||||
|
@ -5,6 +5,9 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
NO_DIST_INSTALL = True
|
||||
# For sanity's sake, we compile nsinstall without the wrapped system
|
||||
# headers, so that we can use it to set up the wrapped system headers.
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
||||
CONFIGURE_SUBST_FILES += [
|
||||
'autoconf.mk',
|
||||
|
@ -602,26 +602,21 @@ ifndef MOZBUILD_BACKEND_CHECKED
|
||||
# Makefile/backend.mk is updated as a result of backend regeneration, we
|
||||
# actually pick up the changes. This should reduce the amount of
|
||||
# required clobbers and is thus the lesser evil.
|
||||
Makefile: $(DEPTH)/backend.RecursiveMakeBackend.built
|
||||
Makefile: $(DEPTH)/backend.RecursiveMakeBackend
|
||||
@$(TOUCH) $@
|
||||
|
||||
$(DEPTH)/backend.RecursiveMakeBackend.built:
|
||||
$(DEPTH)/backend.RecursiveMakeBackend:
|
||||
@echo "Build configuration changed. Regenerating backend."
|
||||
@cd $(DEPTH) && $(PYTHON) ./config.status
|
||||
@$(TOUCH) $@
|
||||
|
||||
include $(DEPTH)/backend.RecursiveMakeBackend.built.pp
|
||||
include $(DEPTH)/backend.RecursiveMakeBackend.pp
|
||||
|
||||
default:: $(DEPTH)/backend.RecursiveMakeBackend.built
|
||||
default:: $(DEPTH)/backend.RecursiveMakeBackend
|
||||
|
||||
export MOZBUILD_BACKEND_CHECKED=1
|
||||
endif
|
||||
|
||||
|
||||
# SUBMAKEFILES: List of Makefiles for next level down.
|
||||
# This is used to update or create the Makefiles before invoking them.
|
||||
SUBMAKEFILES += $(addsuffix /Makefile, $(DIRS) $(TOOL_DIRS) $(PARALLEL_DIRS))
|
||||
|
||||
# The root makefile doesn't want to do a plain export/libs, because
|
||||
# of the tiers and because of libxul. Suppress the default rules in favor
|
||||
# of something else. Makefiles which use this var *must* provide a sensible
|
||||
@ -649,14 +644,6 @@ everything::
|
||||
$(MAKE) clean
|
||||
$(MAKE) all
|
||||
|
||||
# Target to only regenerate makefiles
|
||||
makefiles: $(SUBMAKEFILES)
|
||||
ifneq (,$(DIRS)$(TOOL_DIRS)$(PARALLEL_DIRS))
|
||||
$(LOOP_OVER_PARALLEL_DIRS)
|
||||
$(LOOP_OVER_DIRS)
|
||||
$(LOOP_OVER_TOOL_DIRS)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter-out %.$(LIB_SUFFIX),$(SHARED_LIBRARY_LIBS)))
|
||||
$(error SHARED_LIBRARY_LIBS must contain .$(LIB_SUFFIX) files only)
|
||||
endif
|
||||
@ -665,9 +652,6 @@ HOST_LIBS_DEPS = $(filter %.$(LIB_SUFFIX),$(HOST_LIBS))
|
||||
|
||||
# Dependencies which, if modified, should cause everything to rebuild
|
||||
GLOBAL_DEPS += Makefile $(DEPTH)/config/autoconf.mk $(topsrcdir)/config/config.mk
|
||||
ifndef NO_MAKEFILE_RULE
|
||||
GLOBAL_DEPS += Makefile.in
|
||||
endif
|
||||
|
||||
##############################################
|
||||
OBJ_TARGETS = $(OBJS) $(PROGOBJS) $(HOST_OBJS) $(HOST_PROGOBJS)
|
||||
@ -742,7 +726,7 @@ endif # NO_PROFILE_GUIDED_OPTIMIZE
|
||||
checkout:
|
||||
$(MAKE) -C $(topsrcdir) -f client.mk checkout
|
||||
|
||||
clean clobber realclean clobber_all:: $(SUBMAKEFILES)
|
||||
clean clobber realclean clobber_all::
|
||||
-$(RM) $(ALL_TRASH)
|
||||
-$(RM) -r $(ALL_TRASH_DIRS)
|
||||
|
||||
@ -755,7 +739,7 @@ else
|
||||
clean clobber realclean clobber_all distclean::
|
||||
$(foreach dir,$(PARALLEL_DIRS) $(DIRS) $(TOOL_DIRS),-$(call SUBMAKE,$@,$(dir)))
|
||||
|
||||
distclean:: $(SUBMAKEFILES)
|
||||
distclean::
|
||||
$(foreach dir,$(PARALLEL_DIRS) $(DIRS) $(TOOL_DIRS),-$(call SUBMAKE,$@,$(dir)))
|
||||
endif
|
||||
|
||||
@ -1162,34 +1146,6 @@ ifneq (,$(JAVAFILES)$(ANDROID_RESFILES)$(ANDROID_APKNAME)$(JAVA_JAR_TARGETS))
|
||||
include $(topsrcdir)/config/makefiles/java-build.mk
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
# Update Files Managed by Build Backend
|
||||
###############################################################################
|
||||
|
||||
ifndef NO_MAKEFILE_RULE
|
||||
Makefile: Makefile.in
|
||||
@$(PYTHON) $(DEPTH)/config.status -n --file=Makefile
|
||||
@$(TOUCH) $@
|
||||
endif
|
||||
|
||||
ifndef NO_SUBMAKEFILES_RULE
|
||||
ifdef SUBMAKEFILES
|
||||
# VPATH does not work on some machines in this case, so add $(srcdir)
|
||||
$(SUBMAKEFILES): % : $(srcdir)/%.in
|
||||
$(PYTHON) $(DEPTH)$(addprefix /,$(subsrcdir))/config.status -n --file="$@"
|
||||
@$(TOUCH) "$@"
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef AUTOUPDATE_CONFIGURE
|
||||
$(topsrcdir)/configure: $(topsrcdir)/configure.in
|
||||
(cd $(topsrcdir) && $(AUTOCONF)) && $(PYTHON) $(DEPTH)/config.status -n --recheck
|
||||
endif
|
||||
|
||||
$(DEPTH)/config/autoconf.mk: $(topsrcdir)/config/autoconf.mk.in
|
||||
$(PYTHON) $(DEPTH)/config.status -n --file=$(DEPTH)/config/autoconf.mk
|
||||
$(TOUCH) $@
|
||||
|
||||
###############################################################################
|
||||
# Bunch of things that extend the 'export' rule (in order):
|
||||
###############################################################################
|
||||
@ -1625,7 +1581,7 @@ FORCE:
|
||||
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(SUBMAKEFILES) $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
||||
TAGS: $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
||||
-etags $(CSRCS) $(CPPSRCS) $(wildcard *.h)
|
||||
$(LOOP_OVER_PARALLEL_DIRS)
|
||||
$(LOOP_OVER_DIRS)
|
||||
@ -1642,7 +1598,7 @@ documentation:
|
||||
$(DOXYGEN) $(DEPTH)/config/doxygen.cfg
|
||||
|
||||
ifdef ENABLE_TESTS
|
||||
check:: $(SUBMAKEFILES)
|
||||
check::
|
||||
$(LOOP_OVER_PARALLEL_DIRS)
|
||||
$(LOOP_OVER_DIRS)
|
||||
$(LOOP_OVER_TOOL_DIRS)
|
||||
|
11
configure.in
11
configure.in
@ -3985,7 +3985,7 @@ MOZ_PDF_PRINTING=
|
||||
MOZ_DISABLE_CRYPTOLEGACY=
|
||||
NSS_DISABLE_DBM=
|
||||
NECKO_COOKIES=1
|
||||
NECKO_PROTOCOLS_DEFAULT="about data file ftp http res viewsource websocket wyciwyg device"
|
||||
NECKO_PROTOCOLS_DEFAULT="about app data file ftp http res viewsource websocket wyciwyg device"
|
||||
USE_ARM_KUSER=
|
||||
BUILD_CTYPES=1
|
||||
MOZ_USE_NATIVE_POPUP_WINDOWS=
|
||||
@ -8772,17 +8772,10 @@ HAVE_SYS_VFS_H
|
||||
HAVE_SYS_MOUNT_H
|
||||
"
|
||||
|
||||
# FUTURE? Consider moving all these to moz.build files.
|
||||
AC_CONFIG_HEADER(
|
||||
netwerk/necko-config.h
|
||||
xpcom/xpcom-config.h
|
||||
xpcom/xpcom-private.h
|
||||
)
|
||||
|
||||
AC_SUBST(STLPORT_LIBS)
|
||||
|
||||
export WRITE_MOZINFO=1
|
||||
AC_OUTPUT([mozilla-config.h])
|
||||
AC_OUTPUT()
|
||||
unset WRITE_MOZINFO
|
||||
|
||||
# Hack around an Apple bug that affects the egrep that comes with OS X 10.7.
|
||||
|
@ -23,6 +23,7 @@ nsDOMKeyboardEvent::nsDOMKeyboardEvent(mozilla::dom::EventTarget* aOwner,
|
||||
else {
|
||||
mEventIsInternal = true;
|
||||
mEvent->time = PR_Now();
|
||||
mEvent->AsKeyboardEvent()->mKeyNameIndex = KEY_NAME_INDEX_USE_STRING;
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,9 +103,7 @@ nsDOMKeyboardEvent::GetModifierState(const nsAString& aKey,
|
||||
NS_IMETHODIMP
|
||||
nsDOMKeyboardEvent::GetKey(nsAString& aKeyName)
|
||||
{
|
||||
if (!mEventIsInternal) {
|
||||
mEvent->AsKeyboardEvent()->GetDOMKeyName(aKeyName);
|
||||
}
|
||||
mEvent->AsKeyboardEvent()->GetDOMKeyName(aKeyName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,7 @@ RoundDown(double aDouble)
|
||||
static inline bool
|
||||
IsMouseEventReal(WidgetEvent* aEvent)
|
||||
{
|
||||
NS_ABORT_IF_FALSE(aEvent->IsMouseDerivedEvent(), "Not a mouse event");
|
||||
NS_ABORT_IF_FALSE(aEvent->AsMouseEvent(), "Not a mouse event");
|
||||
// Return true if not synthesized.
|
||||
return aEvent->AsMouseEvent()->reason == WidgetMouseEvent::eReal;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "DecoderTraits.h"
|
||||
#include "nsIAudioChannelAgent.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/AudioChannelBinding.h"
|
||||
#include "mozilla/dom/TextTrackManager.h"
|
||||
|
||||
// Define to output information on decoding and painting framerate
|
||||
@ -513,12 +514,8 @@ public:
|
||||
|
||||
double MozFragmentEnd();
|
||||
|
||||
// XPCOM GetMozAudioChannelType() is OK
|
||||
|
||||
void SetMozAudioChannelType(const nsAString& aValue, ErrorResult& aRv)
|
||||
{
|
||||
SetHTMLAttr(nsGkAtoms::mozaudiochannel, aValue, aRv);
|
||||
}
|
||||
AudioChannel MozAudioChannelType() const;
|
||||
void SetMozAudioChannelType(AudioChannel aValue, ErrorResult& aRv);
|
||||
|
||||
TextTrackList* TextTracks() const;
|
||||
|
||||
|
@ -4614,9 +4614,6 @@ HTMLInputElement::SetSelectionRange(int32_t aSelectionStart,
|
||||
aRv = textControlFrame->SetSelectionRange(aSelectionStart, aSelectionEnd, dir);
|
||||
if (!aRv.Failed()) {
|
||||
aRv = textControlFrame->ScrollSelectionIntoView();
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsAsyncDOMEvent(this, NS_LITERAL_STRING("select"), true, false);
|
||||
event->PostDOMEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4740,6 +4737,11 @@ HTMLInputElement::SetRangeText(const nsAString& aReplacement, uint32_t aStart,
|
||||
|
||||
Optional<nsAString> direction;
|
||||
SetSelectionRange(aSelectionStart, aSelectionEnd, direction, aRv);
|
||||
if (!aRv.Failed()) {
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsAsyncDOMEvent(this, NS_LITERAL_STRING("select"), true, false);
|
||||
event->PostDOMEvent();
|
||||
}
|
||||
}
|
||||
|
||||
int32_t
|
||||
|
@ -3928,5 +3928,41 @@ HTMLMediaElement::PopulatePendingTextTrackList()
|
||||
}
|
||||
}
|
||||
|
||||
AudioChannel
|
||||
HTMLMediaElement::MozAudioChannelType() const
|
||||
{
|
||||
switch (mAudioChannelType) {
|
||||
case AUDIO_CHANNEL_CONTENT:
|
||||
return AudioChannel::Content;
|
||||
|
||||
case AUDIO_CHANNEL_NOTIFICATION:
|
||||
return AudioChannel::Notification;
|
||||
|
||||
case AUDIO_CHANNEL_ALARM:
|
||||
return AudioChannel::Alarm;
|
||||
|
||||
case AUDIO_CHANNEL_TELEPHONY:
|
||||
return AudioChannel::Telephony;
|
||||
|
||||
case AUDIO_CHANNEL_RINGER:
|
||||
return AudioChannel::Ringer;
|
||||
|
||||
case AUDIO_CHANNEL_PUBLICNOTIFICATION:
|
||||
return AudioChannel::Publicnotification;
|
||||
|
||||
default:
|
||||
return AudioChannel::Normal;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
HTMLMediaElement::SetMozAudioChannelType(AudioChannel aValue, ErrorResult& aRv)
|
||||
{
|
||||
nsString channel;
|
||||
channel.AssignASCII(AudioChannelValues::strings[uint32_t(aValue)].value,
|
||||
AudioChannelValues::strings[uint32_t(aValue)].length);
|
||||
SetHTMLAttr(nsGkAtoms::mozaudiochannel, channel, aRv);
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -888,9 +888,6 @@ HTMLTextAreaElement::SetSelectionRange(uint32_t aSelectionStart,
|
||||
rv = textControlFrame->SetSelectionRange(aSelectionStart, aSelectionEnd, dir);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = textControlFrame->ScrollSelectionIntoView();
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsAsyncDOMEvent(this, NS_LITERAL_STRING("select"), true, false);
|
||||
event->PostDOMEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -995,6 +992,11 @@ HTMLTextAreaElement::SetRangeText(const nsAString& aReplacement,
|
||||
|
||||
Optional<nsAString> direction;
|
||||
SetSelectionRange(aSelectionStart, aSelectionEnd, direction, aRv);
|
||||
if (!aRv.Failed()) {
|
||||
nsRefPtr<nsAsyncDOMEvent> event =
|
||||
new nsAsyncDOMEvent(this, NS_LITERAL_STRING("select"), true, false);
|
||||
event->PostDOMEvent();
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -81,6 +81,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
|
||||
ok(true, "select event should be fired for " + aEvent.target.id);
|
||||
if (++numOfSelectCalls == expectedNumOfSelectCalls) {
|
||||
SimpleTest.finish();
|
||||
} else if (numOfSelectCalls > expectedNumOfSelectCalls) {
|
||||
ok(false, "Too many select events were fired");
|
||||
}
|
||||
}, false);
|
||||
|
||||
@ -97,7 +99,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
|
||||
is(elem.selectionEnd, 4, msg + ".selectionEnd == 4");
|
||||
elem.setRangeText("mnk");
|
||||
is(elem.value, "0mnk6789ABCDEF", msg + ".value == \"0mnk6789ABCDEF\"");
|
||||
expectedNumOfSelectCalls += 3;
|
||||
expectedNumOfSelectCalls += 2;
|
||||
|
||||
//test SetRange(replacement, start, end, mode) with start > end
|
||||
try {
|
||||
@ -159,7 +161,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
|
||||
is(elem.value, "0Z23456789", msg + ".value == \"0Z23456789\"");
|
||||
is(elem.selectionStart, 6, msg + ".selectionStart == 6, with \"preserve\"");
|
||||
is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"preserve\"");
|
||||
expectedNumOfSelectCalls += 2;
|
||||
expectedNumOfSelectCalls += 1;
|
||||
|
||||
//subcase: selection{Start|End} < end
|
||||
elem.value = "0123456789";
|
||||
@ -168,7 +170,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
|
||||
is(elem.value, "01QRST9", msg + ".value == \"01QRST9\"");
|
||||
is(elem.selectionStart, 2, msg + ".selectionStart == 2, with \"preserve\"");
|
||||
is(elem.selectionEnd, 6, msg + ".selectionEnd == 6, with \"preserve\"");
|
||||
expectedNumOfSelectCalls += 2;
|
||||
expectedNumOfSelectCalls += 1;
|
||||
|
||||
//subcase: selectionStart > end, selectionEnd < end
|
||||
elem.value = "0123456789";
|
||||
@ -177,7 +179,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
|
||||
is(elem.value, "0QRST56789", msg + ".value == \"0QRST56789\"");
|
||||
is(elem.selectionStart, 1, msg + ".selectionStart == 1, with \"default\"");
|
||||
is(elem.selectionEnd, 5, msg + ".selectionEnd == 5, with \"default\"");
|
||||
expectedNumOfSelectCalls += 2;
|
||||
expectedNumOfSelectCalls += 1;
|
||||
|
||||
//subcase: selectionStart < end, selectionEnd > end
|
||||
elem.value = "0123456789";
|
||||
@ -186,7 +188,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=850364
|
||||
is(elem.value, "01QRST6789", msg + ".value == \"01QRST6789\"");
|
||||
is(elem.selectionStart, 2, msg + ".selectionStart == 2, with \"default\"");
|
||||
is(elem.selectionEnd, 9, msg + ".selectionEnd == 9, with \"default\"");
|
||||
expectedNumOfSelectCalls += 2;
|
||||
expectedNumOfSelectCalls += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ ok(audio3.mozAudioChannelType == "content", "Default audio3 channel == 'content'
|
||||
try {
|
||||
audio3.mozAudioChannelType = "foo";
|
||||
} catch(e) {}
|
||||
ok(audio3.mozAudioChannelType == "normal", "audio3 channel == 'normal'");
|
||||
ok(audio3.mozAudioChannelType == "content", "audio3 channel == 'content'");
|
||||
audio3.mozAudioChannelType = "alarm";
|
||||
ok(audio3.mozAudioChannelType == "alarm", "audio3 channel == 'alarm'");
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "nsDOMClassInfo.h"
|
||||
#include "nsHTMLDocument.h"
|
||||
#include "jsapi.h"
|
||||
#include "js/GCAPI.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
@ -75,7 +75,9 @@ TextTrack::SetDefaultSettings()
|
||||
void
|
||||
TextTrack::Update(double aTime)
|
||||
{
|
||||
mCueList->Update(aTime);
|
||||
if (mCueList) {
|
||||
mCueList->Update(aTime);
|
||||
}
|
||||
}
|
||||
|
||||
JSObject*
|
||||
@ -182,8 +184,8 @@ void
|
||||
TextTrack::SetReadyState(uint16_t aState)
|
||||
{
|
||||
mReadyState = aState;
|
||||
if (mReadyState == HTMLTrackElement::LOADED ||
|
||||
mReadyState == HTMLTrackElement::ERROR) {
|
||||
if (mMediaElement && (mReadyState == HTMLTrackElement::LOADED ||
|
||||
mReadyState == HTMLTrackElement::ERROR)) {
|
||||
mMediaElement->RemoveTextTrack(this, true);
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,8 @@ WebVTTListener::OnStopRequest(nsIRequest* aRequest,
|
||||
nsresult aStatus)
|
||||
{
|
||||
if (mElement->ReadyState() != HTMLTrackElement::ERROR) {
|
||||
mElement->mTrack->SetReadyState(HTMLTrackElement::LOADED);
|
||||
TextTrack* track = mElement->Track();
|
||||
track->SetReadyState(HTMLTrackElement::LOADED);
|
||||
}
|
||||
// Attempt to parse any final data the parser might still have.
|
||||
mParserWrapper->Flush();
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "GStreamerLoader.h"
|
||||
#include "mozilla/NullPtr.h"
|
||||
|
||||
#define LIBGSTREAMER 0
|
||||
#define LIBGSTAPP 1
|
||||
|
@ -172,6 +172,8 @@ endif
|
||||
# test_mixed_principals.html
|
||||
# Disabled since we don't play Wave files standalone, for now
|
||||
# test_audioDocumentTitle.html
|
||||
# Bug 751539:
|
||||
# test_played.html
|
||||
|
||||
# The below tests are disabled on Windows due to frequent timeouts.
|
||||
# Bug 832768 and Bug 864682:
|
||||
@ -185,8 +187,6 @@ endif
|
||||
# test_seek.html
|
||||
# Bug 832768, bug 814533, bug 840742
|
||||
# test_playback_rate.html
|
||||
# Bug 751539
|
||||
# test_played.html
|
||||
ifneq ($(OS_ARCH), WINNT)
|
||||
MOCHITEST_FILES += \
|
||||
test_buffered.html \
|
||||
@ -195,7 +195,6 @@ MOCHITEST_FILES += \
|
||||
test_media_selection.html \
|
||||
test_seek.html \
|
||||
test_playback_rate.html \
|
||||
test_played.html \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#ifndef AudioContext_h_
|
||||
#define AudioContext_h_
|
||||
|
||||
#include "mozilla/dom/AudioContextBinding.h"
|
||||
#include "mozilla/dom/AudioChannelBinding.h"
|
||||
#include "EnableWebAudioCheck.h"
|
||||
#include "MediaBufferDecoder.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#ifndef AudioDestinationNode_h_
|
||||
#define AudioDestinationNode_h_
|
||||
|
||||
#include "mozilla/dom/AudioContextBinding.h"
|
||||
#include "mozilla/dom/AudioChannelBinding.h"
|
||||
#include "AudioNode.h"
|
||||
#include "nsIDOMEventListener.h"
|
||||
#include "nsIAudioChannelAgent.h"
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "nsRuleProcessorData.h"
|
||||
#include "nsIWeakReference.h"
|
||||
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
#include "nsIXPConnect.h"
|
||||
#include "nsDOMCID.h"
|
||||
#include "nsIDOMScriptObjectFactory.h"
|
||||
|
@ -7,7 +7,6 @@ SHORT_LIBNAME = mozsqlt3
|
||||
ifndef MOZ_FOLD_LIBS
|
||||
FORCE_SHARED_LIB = 1
|
||||
endif
|
||||
VISIBILITY_FLAGS =
|
||||
LIB_IS_C_ONLY = 1
|
||||
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
|
@ -5,6 +5,7 @@
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
MODULE = 'sqlite3'
|
||||
NO_VISIBILITY_FLAGS = True
|
||||
|
||||
EXPORTS += [
|
||||
'sqlite3.h',
|
||||
|
@ -656,7 +656,7 @@ VibrateWindowListener::HandleEvent(nsIDOMEvent* aEvent)
|
||||
nsCOMPtr<nsIDOMWindow> window = do_QueryReferent(mWindow);
|
||||
hal::CancelVibrate(window);
|
||||
RemoveListener();
|
||||
gVibrateWindowListener = NULL;
|
||||
gVibrateWindowListener = nullptr;
|
||||
// Careful: The line above might have deleted |this|!
|
||||
}
|
||||
|
||||
|
@ -3606,7 +3606,7 @@ nsWindowSH::NewResolve(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
|
||||
}
|
||||
|
||||
// Handle resolving if id refers to a name resolved by DOM worker code.
|
||||
JS::Rooted<JSObject*> tmp(cx, NULL);
|
||||
JS::Rooted<JSObject*> tmp(cx, nullptr);
|
||||
if (!ResolveWorkerClasses(cx, obj, id, flags, &tmp)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -37,9 +37,9 @@ JSObject* GetDefaultScopeFromJSContext(JSContext *cx);
|
||||
// ((JS::Value*)aArgv)[0], ..., ((JS::Value*)aArgv)[aArgc - 1]
|
||||
// The resulting object will take a copy of the array, and ensure each
|
||||
// element is rooted.
|
||||
// Optionally, aArgv may be NULL, in which case the array is allocated and
|
||||
// rooted, but all items remain NULL. This presumably means the caller will
|
||||
// then QI us for nsIJSArgArray, and set our array elements.
|
||||
// Optionally, aArgv may be nullptr, in which case the array is allocated and
|
||||
// rooted, but all items remain nullptr. This presumably means the caller
|
||||
// will then QI us for nsIJSArgArray, and set our array elements.
|
||||
nsresult NS_CreateJSArgv(JSContext *aContext, uint32_t aArgc, void *aArgv,
|
||||
nsIJSArgArray **aArray);
|
||||
|
||||
|
@ -145,7 +145,7 @@ static const char* kObservedPrefs[] = {
|
||||
"accessibility.tabfocus_applies_to_xul",
|
||||
"accessibility.mouse_focuses_formcontrol",
|
||||
"focusmanager.testmode",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
|
||||
nsFocusManager::nsFocusManager()
|
||||
|
@ -518,7 +518,7 @@ private:
|
||||
// When a mouse down event process is finished, ESM sets focus to the target
|
||||
// content. Therefore, while DOM event handlers are handling mouse down
|
||||
// events, the handlers should be able to steal focus from any elements even
|
||||
// if focus is in chrome content. So, if this isn't NULL and the caller
|
||||
// if focus is in chrome content. So, if this isn't nullptr and the caller
|
||||
// can access the document node, the caller should succeed in moving focus.
|
||||
nsCOMPtr<nsIDocument> mMouseDownEventHandlingDocument;
|
||||
|
||||
|
@ -676,7 +676,7 @@ nsOuterWindowProxy::preventExtensions(JSContext *cx,
|
||||
JS::Handle<JSObject*> proxy)
|
||||
{
|
||||
// See above.
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL,
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
|
||||
JSMSG_CANT_CHANGE_EXTENSIBILITY);
|
||||
return false;
|
||||
}
|
||||
@ -1222,7 +1222,7 @@ nsGlobalWindow::~nsGlobalWindow()
|
||||
if (IsOuterWindow()) {
|
||||
JSObject *proxy = GetWrapperPreserveColor();
|
||||
if (proxy) {
|
||||
js::SetProxyExtra(proxy, 0, js::PrivateValue(NULL));
|
||||
js::SetProxyExtra(proxy, 0, js::PrivateValue(nullptr));
|
||||
}
|
||||
|
||||
// An outer window is destroyed with inner windows still possibly
|
||||
@ -2115,7 +2115,7 @@ CreateNativeGlobalForInner(JSContext* aCx,
|
||||
MOZ_ASSERT(aPrincipal);
|
||||
MOZ_ASSERT(aHolder);
|
||||
|
||||
nsGlobalWindow *top = NULL;
|
||||
nsGlobalWindow *top = nullptr;
|
||||
if (aNewInner->GetOuterWindow()) {
|
||||
top = aNewInner->GetTop();
|
||||
}
|
||||
@ -2396,7 +2396,7 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
js::SetProxyExtra(mJSObject, 0, js::PrivateValue(NULL));
|
||||
js::SetProxyExtra(mJSObject, 0, js::PrivateValue(nullptr));
|
||||
|
||||
JS::Rooted<JSObject*> obj(cx, mJSObject);
|
||||
outerObject = xpc::TransplantObject(cx, obj, outerObject);
|
||||
@ -3133,7 +3133,7 @@ void
|
||||
nsGlobalWindow::OnFinalize(JSObject* aObject)
|
||||
{
|
||||
if (aObject == mJSObject) {
|
||||
mJSObject = NULL;
|
||||
mJSObject = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5618,7 +5618,7 @@ nsGlobalWindow::SetFullScreenInternal(bool aFullScreen, bool aRequireTrust)
|
||||
pmService->NewWakeLock(NS_LITERAL_STRING("DOM_Fullscreen"), this, getter_AddRefs(mWakeLock));
|
||||
} else if (mWakeLock && !mFullScreen) {
|
||||
mWakeLock->Unlock();
|
||||
mWakeLock = NULL;
|
||||
mWakeLock = nullptr;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
@ -10441,7 +10441,7 @@ nsGlobalWindow::ShowSlowScriptDialog()
|
||||
}
|
||||
}
|
||||
|
||||
// GetStringFromName can return NS_OK and still give NULL string
|
||||
// GetStringFromName can return NS_OK and still give nullptr string
|
||||
if (NS_FAILED(rv) || !title || !msg || !stopButton || !waitButton ||
|
||||
(!debugButton && debugPossible) || !neverShowDlg) {
|
||||
NS_ERROR("Failed to get localized strings.");
|
||||
@ -10956,7 +10956,7 @@ nsGlobalWindow::GetParentInternal()
|
||||
return parent;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
@ -12697,7 +12697,7 @@ nsGlobalWindow::SyncGamepadState()
|
||||
{
|
||||
FORWARD_TO_INNER_VOID(SyncGamepadState, ());
|
||||
if (mHasSeenGamepadInput) {
|
||||
mGamepads.EnumerateRead(EnumGamepadsForSync, NULL);
|
||||
mGamepads.EnumerateRead(EnumGamepadsForSync, nullptr);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1062,7 +1062,7 @@ nsJSContext::BindCompiledEventHandler(nsISupports* aTarget,
|
||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
} else {
|
||||
funobj = NULL;
|
||||
funobj = nullptr;
|
||||
}
|
||||
|
||||
aBoundHandler.set(funobj);
|
||||
@ -1187,9 +1187,8 @@ nsJSContext::SetProperty(JS::Handle<JSObject*> aTarget, const char* aPropName, n
|
||||
}
|
||||
JS::Value vargs = OBJECT_TO_JSVAL(args);
|
||||
|
||||
return JS_DefineProperty(mContext, aTarget, aPropName, vargs, NULL, NULL, 0)
|
||||
? NS_OK
|
||||
: NS_ERROR_FAILURE;
|
||||
return JS_DefineProperty(mContext, aTarget, aPropName, vargs,
|
||||
nullptr, nullptr, 0) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsresult
|
||||
@ -2519,7 +2518,7 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
|
||||
if (!sShuttingDown) {
|
||||
CallCreateInstance("@mozilla.org/timer;1", &sInterSliceGCTimer);
|
||||
sInterSliceGCTimer->InitWithFuncCallback(InterSliceGCTimerFired,
|
||||
NULL,
|
||||
nullptr,
|
||||
NS_INTERSLICE_GC_DELAY,
|
||||
nsITimer::TYPE_ONE_SHOT);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INTERNAL(nsJSScriptTimeoutHandler)
|
||||
JS_GetObjectFunction(js::UncheckedUnwrap(tmp->mFunction->Callable()));
|
||||
if (fun && JS_GetFunctionId(fun)) {
|
||||
JSFlatString *funId = JS_ASSERT_STRING_IS_FLAT(JS_GetFunctionId(fun));
|
||||
size_t size = 1 + JS_PutEscapedFlatString(NULL, 0, funId, 0);
|
||||
size_t size = 1 + JS_PutEscapedFlatString(nullptr, 0, funId, 0);
|
||||
char *funIdName = new char[size];
|
||||
if (funIdName) {
|
||||
JS_PutEscapedFlatString(funIdName, size, funId, 0);
|
||||
|
@ -100,7 +100,7 @@ nsWindowMemoryReporter::Init()
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
if (os) {
|
||||
// DOM_WINDOW_DESTROYED_TOPIC announces what we call window "detachment",
|
||||
// when a window's docshell is set to NULL.
|
||||
// when a window's docshell is set to nullptr.
|
||||
os->AddObserver(sWindowReporter, DOM_WINDOW_DESTROYED_TOPIC,
|
||||
/* weakRef = */ true);
|
||||
os->AddObserver(sWindowReporter, "after-minimize-memory-usage",
|
||||
@ -185,7 +185,7 @@ CollectWindowReports(nsGlobalWindow *aWindow,
|
||||
|
||||
// Avoid calling aWindow->GetTop() if there's no outer window. It will work
|
||||
// just fine, but will spew a lot of warnings.
|
||||
nsGlobalWindow *top = NULL;
|
||||
nsGlobalWindow *top = nullptr;
|
||||
nsCOMPtr<nsIURI> location;
|
||||
if (aWindow->GetOuterWindow()) {
|
||||
// Our window should have a null top iff it has a null docshell.
|
||||
@ -483,9 +483,12 @@ nsWindowMemoryReporter::CollectReports(nsIMemoryReporterCallback* aCb,
|
||||
WindowPaths topWindowPaths;
|
||||
|
||||
// Collect window memory usage.
|
||||
nsWindowSizes windowTotalSizes(NULL);
|
||||
nsCOMPtr<amIAddonManager> addonManager =
|
||||
do_GetService("@mozilla.org/addons/integration;1");
|
||||
nsWindowSizes windowTotalSizes(nullptr);
|
||||
nsCOMPtr<amIAddonManager> addonManager;
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// Only try to access the service from the main process.
|
||||
addonManager = do_GetService("@mozilla.org/addons/integration;1");
|
||||
}
|
||||
for (uint32_t i = 0; i < windows.Length(); i++) {
|
||||
rv = CollectWindowReports(windows[i], addonManager,
|
||||
&windowTotalSizes, &ghostWindows,
|
||||
@ -772,7 +775,7 @@ GetNonDetachedWindowDomainsEnumerator(const uint64_t& aId, nsGlobalWindow* aWind
|
||||
*/
|
||||
void
|
||||
nsWindowMemoryReporter::CheckForGhostWindows(
|
||||
nsTHashtable<nsUint64HashKey> *aOutGhostIDs /* = NULL */)
|
||||
nsTHashtable<nsUint64HashKey> *aOutGhostIDs /* = nullptr */)
|
||||
{
|
||||
nsCOMPtr<nsIEffectiveTLDService> tldService = do_GetService(
|
||||
NS_EFFECTIVETLDSERVICE_CONTRACTID);
|
||||
|
@ -202,7 +202,7 @@ private:
|
||||
* This is called asynchronously after we observe a DOM window being detached
|
||||
* from its docshell, and also right before we generate a memory report.
|
||||
*/
|
||||
void CheckForGhostWindows(nsTHashtable<nsUint64HashKey> *aOutGhostIDs = NULL);
|
||||
void CheckForGhostWindows(nsTHashtable<nsUint64HashKey> *aOutGhostIDs = nullptr);
|
||||
|
||||
/**
|
||||
* Maps a weak reference to a detached window (nsIWeakReference) to the time
|
||||
|
@ -459,7 +459,7 @@ GetWrapperCache(nsGlobalWindow*)
|
||||
inline nsWrapperCache*
|
||||
GetWrapperCache(void* p)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Helper template for smart pointers to resolve ambiguity between
|
||||
|
@ -263,7 +263,7 @@ DefineConstants(JSContext* cx, JS::Handle<JSObject*> obj,
|
||||
{
|
||||
for (; cs->name; ++cs) {
|
||||
bool ok =
|
||||
JS_DefineProperty(cx, obj, cs->name, cs->value, NULL, NULL,
|
||||
JS_DefineProperty(cx, obj, cs->name, cs->value, nullptr, nullptr,
|
||||
JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT);
|
||||
if (!ok) {
|
||||
return false;
|
||||
@ -329,8 +329,8 @@ InterfaceObjectToString(JSContext* cx, unsigned argc, JS::Value *vp)
|
||||
JS::Rooted<JSObject*> callee(cx, &args.callee());
|
||||
|
||||
if (!args.thisv().isObject()) {
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CANT_CONVERT_TO,
|
||||
"null", "object");
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
|
||||
JSMSG_CANT_CONVERT_TO, "null", "object");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -344,7 +344,8 @@ InterfaceObjectToString(JSContext* cx, unsigned argc, JS::Value *vp)
|
||||
const jschar* name = JS_GetInternedStringCharsAndLength(jsname, &length);
|
||||
|
||||
if (js::GetObjectJSClass(&args.thisv().toObject()) != clasp) {
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_INCOMPATIBLE_PROTO,
|
||||
JS_ReportErrorNumber(cx, js_GetErrorMessage, nullptr,
|
||||
JSMSG_INCOMPATIBLE_PROTO,
|
||||
NS_ConvertUTF16toUTF8(name).get(), "toString",
|
||||
"object");
|
||||
return false;
|
||||
@ -429,7 +430,7 @@ CreateInterfaceObject(JSContext* cx, JS::Handle<JSObject*> global,
|
||||
ctorNargs);
|
||||
}
|
||||
if (!constructor) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (constructorClass) {
|
||||
@ -441,12 +442,12 @@ CreateInterfaceObject(JSContext* cx, JS::Handle<JSObject*> global,
|
||||
InterfaceObjectToString,
|
||||
0, 0));
|
||||
if (!toString) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
JSString *str = ::JS_InternString(cx, name);
|
||||
if (!str) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
JSObject* toStringObj = JS_GetFunctionObject(toString);
|
||||
js::SetFunctionNativeReserved(toStringObj, TOSTRING_CLASS_RESERVED_SLOT,
|
||||
@ -457,7 +458,7 @@ CreateInterfaceObject(JSContext* cx, JS::Handle<JSObject*> global,
|
||||
|
||||
if (!JS_DefineProperty(cx, constructor, "length", JS::Int32Value(ctorNargs),
|
||||
nullptr, nullptr, JSPROP_READONLY | JSPROP_PERMANENT)) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -497,7 +498,7 @@ CreateInterfaceObject(JSContext* cx, JS::Handle<JSObject*> global,
|
||||
}
|
||||
|
||||
if (proto && !JS_LinkConstructorAndPrototype(cx, constructor, proto)) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (defineOnGlobal && !DefineConstructor(cx, global, name, constructor)) {
|
||||
@ -558,7 +559,7 @@ CreateInterfacePrototypeObject(JSContext* cx, JS::Handle<JSObject*> global,
|
||||
JS::Rooted<JSObject*> ourProto(cx,
|
||||
JS_NewObjectWithUniqueType(cx, protoClass, parentProto, global));
|
||||
if (!ourProto) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (properties) {
|
||||
@ -703,8 +704,8 @@ NativeInterface2JSObjectAndThrowIfFailed(JSContext* aCx,
|
||||
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!XPCConvert::NativeInterface2JSObject(aRetval, NULL, aHelper, aIID,
|
||||
NULL, aAllowNativeWrapper, &rv)) {
|
||||
if (!XPCConvert::NativeInterface2JSObject(aRetval, nullptr, aHelper, aIID,
|
||||
nullptr, aAllowNativeWrapper, &rv)) {
|
||||
// I can't tell if NativeInterface2JSObject throws JS exceptions
|
||||
// or not. This is a sloppy stab at the right semantics; the
|
||||
// method really ought to be fixed to behave consistently.
|
||||
|
@ -1032,7 +1032,7 @@ inline bool
|
||||
WrapObject(JSContext* cx, JS::Handle<JSObject*> scope, T* p,
|
||||
JS::MutableHandle<JS::Value> rval)
|
||||
{
|
||||
return WrapObject(cx, scope, p, NULL, rval);
|
||||
return WrapObject(cx, scope, p, nullptr, rval);
|
||||
}
|
||||
|
||||
// Helper to make it possible to wrap directly out of an nsCOMPtr
|
||||
@ -1050,7 +1050,7 @@ inline bool
|
||||
WrapObject(JSContext* cx, JS::Handle<JSObject*> scope, const nsCOMPtr<T>& p,
|
||||
JS::MutableHandle<JS::Value> rval)
|
||||
{
|
||||
return WrapObject(cx, scope, p, NULL, rval);
|
||||
return WrapObject(cx, scope, p, nullptr, rval);
|
||||
}
|
||||
|
||||
// Helper to make it possible to wrap directly out of an nsRefPtr
|
||||
@ -1068,7 +1068,7 @@ inline bool
|
||||
WrapObject(JSContext* cx, JS::Handle<JSObject*> scope, const nsRefPtr<T>& p,
|
||||
JS::MutableHandle<JS::Value> rval)
|
||||
{
|
||||
return WrapObject(cx, scope, p, NULL, rval);
|
||||
return WrapObject(cx, scope, p, nullptr, rval);
|
||||
}
|
||||
|
||||
// Specialization to make it easy to use WrapObject in codegen.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user