Merge mozilla-inbound to mozilla-central a=merge

This commit is contained in:
Razvan Maries 2018-11-27 19:32:31 +02:00
commit 99a5f987b3
113 changed files with 393 additions and 307 deletions

View File

@ -643,7 +643,7 @@ protected:
*/
union {
// ARIA attribute value
nsAtom* mARIAAttrOldValue;
const nsAtom* mARIAAttrOldValue;
// True if the accessible state bit was on
bool mStateBitWasOn;

View File

@ -436,7 +436,7 @@ description#identity-popup-content-verifier,
#identity-popup-trackersView-list {
padding: 5px 20px;
-moz-box-flex: 1;
overflow: scroll;
overflow: auto;
}
.identity-popup-trackersView-list-item {

View File

@ -254,6 +254,7 @@ a {
flex-shrink: 0;
color: var(--frame-link-source);
margin-inline-start: 5px;
margin-inline-end: 10px;
}
.stack-trace {

View File

@ -34,7 +34,7 @@ AttrArray::Impl::~Impl()
}
const nsAttrValue*
AttrArray::GetAttr(nsAtom* aLocalName, int32_t aNamespaceID) const
AttrArray::GetAttr(const nsAtom* aLocalName, int32_t aNamespaceID) const
{
if (aNamespaceID == kNameSpaceID_None) {
// This should be the common case so lets make an optimized loop
@ -273,7 +273,7 @@ AttrArray::GetExistingAttrNameFromQName(const nsAString& aName) const
}
int32_t
AttrArray::IndexOfAttr(nsAtom* aLocalName, int32_t aNamespaceID) const
AttrArray::IndexOfAttr(const nsAtom* aLocalName, int32_t aNamespaceID) const
{
if (!mImpl) {
return -1;

View File

@ -46,7 +46,7 @@ public:
return NonMappedAttrCount() + MappedAttrCount();
}
const nsAttrValue* GetAttr(nsAtom* aLocalName,
const nsAttrValue* GetAttr(const nsAtom* aLocalName,
int32_t aNamespaceID = kNameSpaceID_None) const;
// As above but using a string attr name and always using
// kNameSpaceID_None. This is always case-sensitive.
@ -79,7 +79,7 @@ public:
const nsAttrName* GetSafeAttrNameAt(uint32_t aPos) const;
const nsAttrName* GetExistingAttrNameFromQName(const nsAString& aName) const;
int32_t IndexOfAttr(nsAtom* aLocalName, int32_t aNamespaceID = kNameSpaceID_None) const;
int32_t IndexOfAttr(const nsAtom* aLocalName, int32_t aNamespaceID = kNameSpaceID_None) const;
// SetAndSwapMappedAttr swaps the current attribute value with aValue.
// If the attribute was unset, an empty value will be swapped into aValue

View File

@ -2420,8 +2420,8 @@ Element::InternalGetAttrNameFromQName(const nsAString& aStr,
bool
Element::MaybeCheckSameAttrVal(int32_t aNamespaceID,
nsAtom* aName,
nsAtom* aPrefix,
const nsAtom* aName,
const nsAtom* aPrefix,
const nsAttrValueOrString& aValue,
bool aNotify,
nsAttrValue& aOldValue,
@ -2905,7 +2905,7 @@ Element::GetEventListenerManagerForAttr(nsAtom* aAttrName,
}
bool
Element::GetAttr(int32_t aNameSpaceID, nsAtom* aName,
Element::GetAttr(int32_t aNameSpaceID, const nsAtom* aName,
nsAString& aResult) const
{
DOMString str;
@ -2916,7 +2916,7 @@ Element::GetAttr(int32_t aNameSpaceID, nsAtom* aName,
int32_t
Element::FindAttrValueIn(int32_t aNameSpaceID,
nsAtom* aName,
const nsAtom* aName,
AttrValuesArray* aValues,
nsCaseTreatment aCaseSensitive) const
{

View File

@ -707,8 +707,9 @@ public:
* @param aOldValueSet [out] Indicates whether an old attribute value has been
* stored in aOldValue. The bool will be set to true if a value was stored.
*/
bool MaybeCheckSameAttrVal(int32_t aNamespaceID, nsAtom* aName,
nsAtom* aPrefix,
bool MaybeCheckSameAttrVal(int32_t aNamespaceID,
const nsAtom* aName,
const nsAtom* aPrefix,
const nsAttrValueOrString& aValue,
bool aNotify, nsAttrValue& aOldValue,
uint8_t* aModType, bool* aHasListeners,
@ -765,9 +766,9 @@ public:
* GetAttr is not inlined on purpose, to keep down codesize from all the
* inlined nsAttrValue bits for C++ callers.
*/
bool GetAttr(int32_t aNameSpaceID, nsAtom* aName, nsAString& aResult) const;
bool GetAttr(int32_t aNameSpaceID, const nsAtom* aName, nsAString& aResult) const;
bool GetAttr(nsAtom* aName, nsAString& aResult) const
bool GetAttr(const nsAtom* aName, nsAString& aResult) const
{
return GetAttr(kNameSpaceID_None, aName, aResult);
}
@ -780,9 +781,9 @@ public:
* @param aAttr the attribute name
* @return whether an attribute exists
*/
inline bool HasAttr(int32_t aNameSpaceID, nsAtom* aName) const;
inline bool HasAttr(int32_t aNameSpaceID, const nsAtom* aName) const;
bool HasAttr(nsAtom* aAttr) const
bool HasAttr(const nsAtom* aAttr) const
{
return HasAttr(kNameSpaceID_None, aAttr);
}
@ -797,7 +798,7 @@ public:
* @param aValue The value to compare to.
* @param aCaseSensitive Whether to do a case-sensitive compare on the value.
*/
inline bool AttrValueIs(int32_t aNameSpaceID, nsAtom* aName,
inline bool AttrValueIs(int32_t aNameSpaceID, const nsAtom* aName,
const nsAString& aValue,
nsCaseTreatment aCaseSensitive) const;
@ -812,8 +813,8 @@ public:
* @param aCaseSensitive Whether to do a case-sensitive compare on the value.
*/
bool AttrValueIs(int32_t aNameSpaceID,
nsAtom* aName,
nsAtom* aValue,
const nsAtom* aName,
const nsAtom* aValue,
nsCaseTreatment aCaseSensitive) const;
enum {
@ -838,7 +839,7 @@ public:
*/
typedef nsStaticAtom* const AttrValuesArray;
int32_t FindAttrValueIn(int32_t aNameSpaceID,
nsAtom* aName,
const nsAtom* aName,
AttrValuesArray* aValues,
nsCaseTreatment aCaseSensitive) const;
@ -1014,7 +1015,7 @@ private:
uint32_t aMapCount);
protected:
inline bool GetAttr(int32_t aNameSpaceID, nsAtom* aName,
inline bool GetAttr(int32_t aNameSpaceID, const nsAtom* aName,
DOMString& aResult) const
{
NS_ASSERTION(nullptr != aName, "must have attribute name");
@ -1463,12 +1464,12 @@ public:
return HasServoData() && Servo_Element_IsDisplayContents(this);
}
const nsAttrValue* GetParsedAttr(nsAtom* aAttr) const
const nsAttrValue* GetParsedAttr(const nsAtom* aAttr) const
{
return mAttrs.GetAttr(aAttr);
}
const nsAttrValue* GetParsedAttr(nsAtom* aAttr, int32_t aNameSpaceID) const
const nsAttrValue* GetParsedAttr(const nsAtom* aAttr, int32_t aNameSpaceID) const
{
return mAttrs.GetAttr(aAttr, aNameSpaceID);
}
@ -1497,7 +1498,7 @@ public:
* is, this should only be called from methods that only care about attrs
* that effectively live in mAttrs.
*/
BorrowedAttrInfo GetAttrInfo(int32_t aNamespaceID, nsAtom* aName) const
BorrowedAttrInfo GetAttrInfo(int32_t aNamespaceID, const nsAtom* aName) const
{
NS_ASSERTION(aName, "must have attribute name");
NS_ASSERTION(aNamespaceID != kNameSpaceID_Unknown,
@ -2018,7 +2019,7 @@ private:
NS_DEFINE_STATIC_IID_ACCESSOR(Element, NS_ELEMENT_IID)
inline bool
Element::HasAttr(int32_t aNameSpaceID, nsAtom* aName) const
Element::HasAttr(int32_t aNameSpaceID, const nsAtom* aName) const
{
NS_ASSERTION(nullptr != aName, "must have attribute name");
NS_ASSERTION(aNameSpaceID != kNameSpaceID_Unknown,
@ -2029,7 +2030,7 @@ Element::HasAttr(int32_t aNameSpaceID, nsAtom* aName) const
inline bool
Element::AttrValueIs(int32_t aNameSpaceID,
nsAtom* aName,
const nsAtom* aName,
const nsAString& aValue,
nsCaseTreatment aCaseSensitive) const
{
@ -2042,8 +2043,8 @@ Element::AttrValueIs(int32_t aNameSpaceID,
inline bool
Element::AttrValueIs(int32_t aNameSpaceID,
nsAtom* aName,
nsAtom* aValue,
const nsAtom* aName,
const nsAtom* aValue,
nsCaseTreatment aCaseSensitive) const
{
NS_ASSERTION(aName, "Must have attr name");

View File

@ -883,17 +883,18 @@ FragmentOrElement::GetChildren(uint32_t aFilter)
return list.forget();
}
static nsIContent*
FindChromeAccessOnlySubtreeOwner(nsIContent* aContent)
static nsINode*
FindChromeAccessOnlySubtreeOwner(nsINode* aNode)
{
if (aContent->ChromeOnlyAccess()) {
bool chromeAccessOnly = false;
while (aContent && !chromeAccessOnly) {
chromeAccessOnly = aContent->IsRootOfChromeAccessOnlySubtree();
aContent = aContent->GetParent();
}
if (!aNode->ChromeOnlyAccess()) {
return aNode;
}
return aContent;
while (aNode && !aNode->IsRootOfChromeAccessOnlySubtree()) {
aNode = aNode->GetParentNode();
}
return aNode ? aNode->GetParentOrHostNode() : nullptr;
}
already_AddRefed<nsINode>
@ -904,11 +905,7 @@ FindChromeAccessOnlySubtreeOwner(EventTarget* aTarget)
return node.forget();
}
if (!node->IsContent()) {
return nullptr;
}
node = FindChromeAccessOnlySubtreeOwner(node->AsContent());
node = FindChromeAccessOnlySubtreeOwner(node);
return node.forget();
}
@ -951,9 +948,9 @@ nsIContent::GetEventTargetParent(EventChainPreVisitor& aVisitor)
(aVisitor.mEvent->mOriginalTarget == this &&
(aVisitor.mRelatedTargetIsInAnon =
relatedTarget->ChromeOnlyAccess()))) {
nsIContent* anonOwner = FindChromeAccessOnlySubtreeOwner(this);
nsINode* anonOwner = FindChromeAccessOnlySubtreeOwner(this);
if (anonOwner) {
nsIContent* anonOwnerRelated =
nsINode* anonOwnerRelated =
FindChromeAccessOnlySubtreeOwner(relatedTarget);
if (anonOwnerRelated) {
// Note, anonOwnerRelated may still be inside some other

View File

@ -154,23 +154,23 @@ public:
bool NameAndNamespaceEquals(NodeInfo* aNodeInfo) const;
bool Equals(nsAtom* aNameAtom) const
bool Equals(const nsAtom* aNameAtom) const
{
return mInner.mName == aNameAtom;
}
bool Equals(nsAtom* aNameAtom, nsAtom* aPrefixAtom) const
bool Equals(const nsAtom* aNameAtom, const nsAtom* aPrefixAtom) const
{
return (mInner.mName == aNameAtom) && (mInner.mPrefix == aPrefixAtom);
}
bool Equals(nsAtom* aNameAtom, int32_t aNamespaceID) const
bool Equals(const nsAtom* aNameAtom, int32_t aNamespaceID) const
{
return ((mInner.mName == aNameAtom) &&
(mInner.mNamespaceID == aNamespaceID));
}
bool Equals(nsAtom* aNameAtom, nsAtom* aPrefixAtom, int32_t aNamespaceID) const
bool Equals(const nsAtom* aNameAtom, const nsAtom* aPrefixAtom, int32_t aNamespaceID) const
{
return ((mInner.mName == aNameAtom) &&
(mInner.mPrefix == aPrefixAtom) &&
@ -192,7 +192,7 @@ public:
bool NamespaceEquals(const nsAString& aNamespaceURI) const;
inline bool QualifiedNameEquals(nsAtom* aNameAtom) const;
inline bool QualifiedNameEquals(const nsAtom* aNameAtom) const;
bool QualifiedNameEquals(const nsAString& aQualifiedName) const
{

View File

@ -58,7 +58,7 @@ NodeInfo::Equals(const nsAString& aName, const nsAString& aPrefix,
}
inline bool
NodeInfo::QualifiedNameEquals(nsAtom* aNameAtom) const
NodeInfo::QualifiedNameEquals(const nsAtom* aNameAtom) const
{
MOZ_ASSERT(aNameAtom, "Must have name atom");
if (!GetPrefixAtom()) {
@ -72,8 +72,8 @@ NodeInfo::QualifiedNameEquals(nsAtom* aNameAtom) const
} // namespace mozilla
inline void
CheckValidNodeInfo(uint16_t aNodeType, nsAtom *aName, int32_t aNamespaceID,
nsAtom* aExtraName)
CheckValidNodeInfo(uint16_t aNodeType, const nsAtom *aName,
int32_t aNamespaceID, const nsAtom* aExtraName)
{
MOZ_ASSERT(aNodeType == nsINode::ELEMENT_NODE ||
aNodeType == nsINode::ATTRIBUTE_NODE ||

View File

@ -211,6 +211,8 @@ public:
void SetIsUAWidget()
{
MOZ_ASSERT(!HasChildren());
SetFlags(NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS | NODE_CHROME_ONLY_ACCESS);
mIsUAWidget = true;
}

View File

@ -105,7 +105,7 @@ public:
// call this function on nsAttrName structs with 0 mBits, so no attempt
// must be made to do anything with mBits besides comparing it with the
// incoming aAtom argument.
bool Equals(nsAtom* aAtom) const
bool Equals(const nsAtom* aAtom) const
{
return reinterpret_cast<uintptr_t>(aAtom) == mBits;
}
@ -116,7 +116,7 @@ public:
return IsAtom() && Atom()->Equals(aLocalName);
}
bool Equals(nsAtom* aLocalName, int32_t aNamespaceID) const
bool Equals(const nsAtom* aLocalName, int32_t aNamespaceID) const
{
if (aNamespaceID == kNameSpaceID_None) {
return Equals(aLocalName);
@ -187,7 +187,7 @@ public:
return mBits - 0;
}
bool IsSmaller(nsAtom* aOther) const
bool IsSmaller(const nsAtom* aOther) const
{
return mBits < reinterpret_cast<uintptr_t>(aOther);
}

View File

@ -1099,7 +1099,7 @@ nsAttrValue::Equals(const nsAString& aValue,
}
bool
nsAttrValue::Equals(nsAtom* aValue, nsCaseTreatment aCaseSensitive) const
nsAttrValue::Equals(const nsAtom* aValue, nsCaseTreatment aCaseSensitive) const
{
if (aCaseSensitive != eCaseMatters) {
// Need a better way to handle this!

View File

@ -219,7 +219,7 @@ public:
bool Equals(const nsAttrValue& aOther) const;
// aCaseSensitive == eIgnoreCase means ASCII case-insenstive matching
bool Equals(const nsAString& aValue, nsCaseTreatment aCaseSensitive) const;
bool Equals(nsAtom* aValue, nsCaseTreatment aCaseSensitive) const;
bool Equals(const nsAtom* aValue, nsCaseTreatment aCaseSensitive) const;
/**
* Compares this object with aOther according to their string representation.

View File

@ -2093,9 +2093,18 @@ nsContentUtils::CanCallerAccess(nsIPrincipal* aSubjectPrincipal,
// static
bool
nsContentUtils::CanCallerAccess(nsINode* aNode)
nsContentUtils::CanCallerAccess(const nsINode* aNode)
{
return CanCallerAccess(SubjectPrincipal(), aNode->NodePrincipal());
nsIPrincipal* subject = SubjectPrincipal();
if (IsSystemPrincipal(subject)) {
return true;
}
if (aNode->ChromeOnlyAccess()) {
return false;
}
return CanCallerAccess(subject, aNode->NodePrincipal());
}
// static

View File

@ -634,7 +634,7 @@ public:
const nsINode* unTrustedNode);
// Check if the (JS) caller can access aNode.
static bool CanCallerAccess(nsINode* aNode);
static bool CanCallerAccess(const nsINode* aNode);
// Check if the (JS) caller can access aWindow.
// aWindow can be either outer or inner window.

View File

@ -178,26 +178,6 @@ public:
*/
virtual already_AddRefed<nsINodeList> GetChildren(uint32_t aFilter) = 0;
/**
* Get whether this content is C++-generated anonymous content
* @see nsIAnonymousContentCreator
* @return whether this content is anonymous
*/
bool IsRootOfNativeAnonymousSubtree() const
{
NS_ASSERTION(!HasFlag(NODE_IS_NATIVE_ANONYMOUS_ROOT) ||
(HasFlag(NODE_IS_ANONYMOUS_ROOT) &&
HasFlag(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE)),
"Some flags seem to be missing!");
return HasFlag(NODE_IS_NATIVE_ANONYMOUS_ROOT);
}
bool IsRootOfChromeAccessOnlySubtree() const
{
return HasFlag(NODE_IS_NATIVE_ANONYMOUS_ROOT |
NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS);
}
/**
* Makes this content anonymous
* @see nsIAnonymousContentCreator
@ -273,7 +253,7 @@ public:
return IsInNamespace(kNameSpaceID_XHTML);
}
inline bool IsHTMLElement(nsAtom* aTag) const
inline bool IsHTMLElement(const nsAtom* aTag) const
{
return mNodeInfo->Equals(aTag, kNameSpaceID_XHTML);
}
@ -289,7 +269,7 @@ public:
return IsInNamespace(kNameSpaceID_SVG);
}
inline bool IsSVGElement(nsAtom* aTag) const
inline bool IsSVGElement(const nsAtom* aTag) const
{
return mNodeInfo->Equals(aTag, kNameSpaceID_SVG);
}
@ -305,7 +285,7 @@ public:
return IsInNamespace(kNameSpaceID_XUL);
}
inline bool IsXULElement(nsAtom* aTag) const
inline bool IsXULElement(const nsAtom* aTag) const
{
return mNodeInfo->Equals(aTag, kNameSpaceID_XUL);
}
@ -321,7 +301,7 @@ public:
return IsInNamespace(kNameSpaceID_MathML);
}
inline bool IsMathMLElement(nsAtom* aTag) const
inline bool IsMathMLElement(const nsAtom* aTag) const
{
return mNodeInfo->Equals(aTag, kNameSpaceID_MathML);
}

View File

@ -173,7 +173,7 @@ nsINode::~nsINode()
}
void*
nsINode::GetProperty(nsAtom* aPropertyName, nsresult* aStatus) const
nsINode::GetProperty(const nsAtom* aPropertyName, nsresult* aStatus) const
{
if (!HasProperties()) { // a fast HasFlag() test
if (aStatus) {
@ -204,13 +204,13 @@ nsINode::SetProperty(nsAtom* aPropertyName,
}
void
nsINode::DeleteProperty(nsAtom* aPropertyName)
nsINode::DeleteProperty(const nsAtom* aPropertyName)
{
OwnerDoc()->PropertyTable().DeleteProperty(this, aPropertyName);
}
void*
nsINode::UnsetProperty(nsAtom* aPropertyName, nsresult* aStatus)
nsINode::UnsetProperty(const nsAtom* aPropertyName, nsresult* aStatus)
{
return OwnerDoc()->PropertyTable().UnsetProperty(this, aPropertyName, aStatus);
}

View File

@ -731,7 +731,7 @@ public:
return IsElement() && IsInNamespace(kNameSpaceID_XHTML);
}
inline bool IsHTMLElement(nsAtom* aTag) const
inline bool IsHTMLElement(const nsAtom* aTag) const
{
return IsElement() && mNodeInfo->Equals(aTag, kNameSpaceID_XHTML);
}
@ -747,7 +747,7 @@ public:
return IsElement() && IsInNamespace(kNameSpaceID_SVG);
}
inline bool IsSVGElement(nsAtom* aTag) const
inline bool IsSVGElement(const nsAtom* aTag) const
{
return IsElement() && mNodeInfo->Equals(aTag, kNameSpaceID_SVG);
}
@ -763,7 +763,7 @@ public:
return IsElement() && IsInNamespace(kNameSpaceID_XUL);
}
inline bool IsXULElement(nsAtom* aTag) const
inline bool IsXULElement(const nsAtom* aTag) const
{
return IsElement() && mNodeInfo->Equals(aTag, kNameSpaceID_XUL);
}
@ -779,7 +779,7 @@ public:
return IsElement() && IsInNamespace(kNameSpaceID_MathML);
}
inline bool IsMathMLElement(nsAtom* aTag) const
inline bool IsMathMLElement(const nsAtom* aTag) const
{
return IsElement() && mNodeInfo->Equals(aTag, kNameSpaceID_MathML);
}
@ -865,7 +865,7 @@ public:
* (though a null return value does not imply the
* property was not set, i.e. it can be set to null).
*/
void* GetProperty(nsAtom* aPropertyName, nsresult* aStatus = nullptr) const;
void* GetProperty(const nsAtom* aPropertyName, nsresult* aStatus = nullptr) const;
/**
* Set a property to be associated with this node. This will overwrite an
@ -904,7 +904,7 @@ public:
*
* @param aPropertyName name of property to destroy.
*/
void DeleteProperty(nsAtom* aPropertyName);
void DeleteProperty(const nsAtom* aPropertyName);
/**
* Unset a property associated with this node. The value will not be
@ -919,7 +919,7 @@ public:
* (though a null return value does not imply the
* property was not set, i.e. it can be set to null).
*/
void* UnsetProperty(nsAtom* aPropertyName, nsresult* aStatus = nullptr);
void* UnsetProperty(const nsAtom* aPropertyName, nsresult* aStatus = nullptr);
bool HasProperties() const
{
@ -1232,6 +1232,26 @@ public:
return HasFlag(NODE_IS_IN_SHADOW_TREE);
}
/**
* Get whether this node is C++-generated anonymous content
* @see nsIAnonymousContentCreator
* @return whether this content is anonymous
*/
bool IsRootOfNativeAnonymousSubtree() const
{
NS_ASSERTION(!HasFlag(NODE_IS_NATIVE_ANONYMOUS_ROOT) ||
(HasFlag(NODE_IS_ANONYMOUS_ROOT) &&
HasFlag(NODE_IS_IN_NATIVE_ANONYMOUS_SUBTREE)),
"Some flags seem to be missing!");
return HasFlag(NODE_IS_NATIVE_ANONYMOUS_ROOT);
}
bool IsRootOfChromeAccessOnlySubtree() const
{
return HasFlag(NODE_IS_NATIVE_ANONYMOUS_ROOT |
NODE_IS_ROOT_OF_CHROME_ONLY_ACCESS);
}
/**
* Returns true if |this| node is the common ancestor of the start/end
* nodes of a Range in a Selection or a descendant of such a common ancestor.

View File

@ -175,7 +175,7 @@ nsMappedAttributes::SetAndSwapAttr(nsAtom* aAttrName, nsAttrValue& aValue,
}
const nsAttrValue*
nsMappedAttributes::GetAttr(nsAtom* aAttrName) const
nsMappedAttributes::GetAttr(const nsAtom* aAttrName) const
{
MOZ_ASSERT(aAttrName, "null name");
@ -278,7 +278,7 @@ nsMappedAttributes::GetExistingAttrNameFromQName(const nsAString& aName) const
}
int32_t
nsMappedAttributes::IndexOfAttr(nsAtom* aLocalName) const
nsMappedAttributes::IndexOfAttr(const nsAtom* aLocalName) const
{
uint32_t i;
for (i = 0; i < mAttrCount; ++i) {

View File

@ -35,7 +35,7 @@ public:
void SetAndSwapAttr(nsAtom* aAttrName, nsAttrValue& aValue,
bool* aValueWasSet);
const nsAttrValue* GetAttr(nsAtom* aAttrName) const;
const nsAttrValue* GetAttr(const nsAtom* aAttrName) const;
const nsAttrValue* GetAttr(const nsAString& aAttrName) const;
uint32_t Count() const
@ -75,7 +75,7 @@ public:
// aValue; any value that was already in aValue is destroyed.
void RemoveAttrAt(uint32_t aPos, nsAttrValue& aValue);
const nsAttrName* GetExistingAttrNameFromQName(const nsAString& aName) const;
int32_t IndexOfAttr(nsAtom* aLocalName) const;
int32_t IndexOfAttr(const nsAtom* aLocalName) const;
// Apply the contained mapper to the contained set of servo rules,
// unless the servo rules have already been initialized.

View File

@ -41,7 +41,7 @@ public:
// Destroy all remaining properties (without removing them)
void Destroy();
bool Equals(nsAtom *aPropertyName)
bool Equals(const nsAtom *aPropertyName)
{
return mName == aPropertyName;
}
@ -136,7 +136,7 @@ nsPropertyTable::EnumerateAll(NSPropertyFunc aCallBack, void* aData)
void*
nsPropertyTable::GetPropertyInternal(nsPropertyOwner aObject,
nsAtom* aPropertyName,
const nsAtom* aPropertyName,
bool aRemove,
nsresult* aResult)
{
@ -216,7 +216,7 @@ nsPropertyTable::SetPropertyInternal(nsPropertyOwner aObject,
nsresult
nsPropertyTable::DeleteProperty(nsPropertyOwner aObject,
nsAtom* aPropertyName)
const nsAtom* aPropertyName)
{
MOZ_ASSERT(aPropertyName && aObject, "unexpected null param");
@ -230,7 +230,7 @@ nsPropertyTable::DeleteProperty(nsPropertyOwner aObject,
}
nsPropertyTable::PropertyList*
nsPropertyTable::GetPropertyListFor(nsAtom* aPropertyName) const
nsPropertyTable::GetPropertyListFor(const nsAtom* aPropertyName) const
{
PropertyList* result;

View File

@ -61,7 +61,7 @@ class nsPropertyTable
* |aResult|, if supplied, is filled in with a return status code.
**/
void* GetProperty(const nsPropertyOwner& aObject,
nsAtom *aPropertyName,
const nsAtom *aPropertyName,
nsresult *aResult = nullptr)
{
return GetPropertyInternal(aObject, aPropertyName, false, aResult);
@ -97,7 +97,7 @@ class nsPropertyTable
* Delete the property |aPropertyName| in the global category for object
* |aObject|. The property's destructor function will be called.
*/
nsresult DeleteProperty(nsPropertyOwner aObject, nsAtom* aPropertyName);
nsresult DeleteProperty(nsPropertyOwner aObject, const nsAtom* aPropertyName);
/**
* Unset the property |aPropertyName| in the global category for object
@ -105,7 +105,7 @@ class nsPropertyTable
* property value is returned.
*/
void* UnsetProperty(const nsPropertyOwner& aObject,
nsAtom* aPropertyName,
const nsAtom* aPropertyName,
nsresult* aStatus = nullptr)
{
return GetPropertyInternal(aObject, aPropertyName, true, aStatus);
@ -167,9 +167,9 @@ class nsPropertyTable
private:
void DestroyPropertyList();
PropertyList* GetPropertyListFor(nsAtom* aPropertyName) const;
PropertyList* GetPropertyListFor(const nsAtom* aPropertyName) const;
void* GetPropertyInternal(nsPropertyOwner aObject,
nsAtom* aPropertyName,
const nsAtom* aPropertyName,
bool aRemove,
nsresult* aStatus);
nsresult SetPropertyInternal(nsPropertyOwner aObject,

View File

@ -4957,6 +4957,7 @@ WorkerPrivate::ConnectMessagePort(JSContext* aCx,
}
RootedDictionary<MessageEventInit> init(aCx);
init.mData = JS_GetEmptyStringValue(aCx);
init.mBubbles = false;
init.mCancelable = false;
init.mSource.SetValue().SetAsMessagePort() = port;

View File

@ -14,6 +14,7 @@
#include "mozilla/gfx/Types.h" // for SamplingFilter, SurfaceFormat
#include "mozilla/layers/CompositorTypes.h" // for TextureFlags
#include "mozilla/layers/WebRenderLayersLogging.h"
#include "mozilla/layers/ZoomConstraints.h"
#include "nsAString.h"
#include "nsPrintfCString.h" // for nsPrintfCString
#include "nsRegion.h" // for nsRegion, nsIntRegion

View File

@ -9,6 +9,7 @@
#include "mozilla/layers/WebRenderMessages.h"
#include "mozilla/layers/RefCountedShmem.h"
#include "mozilla/layers/TextureClient.h"
#include "mozilla/webrender/WebRenderTypes.h"
namespace mozilla {

View File

@ -13,6 +13,7 @@
#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/gfx/CompositorHitTestInfo.h"
#include "mozilla/layers/IpcResourceUpdateQueue.h"
#include "mozilla/layers/ScrollableLayerGuid.h"
#include "mozilla/layers/SyncObject.h"
#include "mozilla/Range.h"

View File

@ -2744,6 +2744,18 @@ BuildFlatRopeReplacement(JSContext* cx, HandleString textstr, HandleLinearString
}
RopeBuilder builder(cx);
/*
* Special case when the pattern string is '', which matches to the
* head of the string and doesn't overlap with any component of the rope.
*/
if (patternLength == 0) {
MOZ_ASSERT(match == 0);
if (!builder.append(repstr)) {
return nullptr;
}
}
size_t pos = 0;
while (!r.empty()) {
RootedString str(cx, r.front());

View File

@ -1722,6 +1722,21 @@ NewRope(JSContext* cx, unsigned argc, Value* vp)
return true;
}
static bool
IsRope(JSContext* cx, unsigned argc, Value* vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
if (!args.get(0).isString()) {
JS_ReportErrorASCII(cx, "isRope requires a string argument.");
return false;
}
JSString* str = args[0].toString();
args.rval().setBoolean(str->isRope());
return true;
}
static bool
EnsureFlatString(JSContext* cx, unsigned argc, Value* vp)
{
@ -5950,6 +5965,10 @@ static const JSFunctionSpecWithHelp TestingFunctions[] = {
" Available options:\n"
" nursery: bool - force the string to be created in/out of the nursery, if possible.\n"),
JS_FN_HELP("isRope", IsRope, 1, 0,
"isRope(str)",
" Returns true if the parameter is a rope"),
JS_FN_HELP("settlePromiseNow", SettlePromiseNow, 1, 0,
"settlePromiseNow(promise)",
" 'Settle' a 'promise' immediately. This just marks the promise as resolved\n"

View File

@ -1613,7 +1613,8 @@ class MacroAssembler : public MacroAssemblerSpecific
void wasmCallImport(const wasm::CallSiteDesc& desc, const wasm::CalleeDesc& callee);
// WasmTableCallIndexReg must contain the index of the indirect call.
void wasmCallIndirect(const wasm::CallSiteDesc& desc, const wasm::CalleeDesc& callee, bool needsBoundsCheck);
void wasmCallIndirect(const wasm::CallSiteDesc& desc, const wasm::CalleeDesc& callee,
bool needsBoundsCheck);
// This function takes care of loading the pointer to the current instance
// as the implicit first argument. It preserves TLS and pinned registers.

View File

@ -0,0 +1,28 @@
var BUGNUMBER = 1509768;
var summary = "String#replace with an empty string pattern on a rope should prepend the replacement string.";
print(BUGNUMBER + ": " + summary);
// Rope is created when the string length >= 24.
//
// This testcase depends on that condition to reliably test the code for
// String#replace on a rope.
//
// Please rewrite this testcase when the following assertion fails.
assertEq(isRope("a".repeat(23)), false);
assertEq(isRope("a".repeat(24)), true);
// Not a rope.
assertEq("a".repeat(23).replace("", "foo"),
"foo" + "a".repeat(23));
assertEq("a".repeat(23).replace("", ""),
"a".repeat(23));
// A rope.
assertEq("a".repeat(24).replace("", "foo"),
"foo" + "a".repeat(24));
assertEq("a".repeat(24).replace("", ""),
"a".repeat(24));
if (typeof reportCompare === "function")
reportCompare(true, true);

View File

@ -542,18 +542,6 @@ wasm::CompileBuffer(const CompileArgs& args, const ShareableBytes& bytecode, Uni
return nullptr;
}
#ifdef ENABLE_WASM_CRANELIFT
if (compilerEnv.tier() == Tier::Optimized &&
compilerEnv.optimizedBackend() == OptimizedBackend::Cranelift)
{
// At the moment, Cranelift performs no validation, so validate
// explicitly.
if (!ValidateForCranelift(bytecode, error)) {
return nullptr;
}
}
#endif
ModuleGenerator mg(args, &env, nullptr, error);
if (!mg.init()) {
return nullptr;

View File

@ -279,10 +279,12 @@ wasm::CraneliftCompileFunctions(const ModuleEnvironment& env,
LifoAlloc& lifo,
const FuncCompileInputVector& inputs,
CompiledCode* code,
ExclusiveDeferredValidationState& dvs,
UniqueChars* error)
{
MOZ_ASSERT(env.tier() == Tier::Optimized);
MOZ_ASSERT(env.optimizedBackend() == OptimizedBackend::Cranelift);
MOZ_ASSERT(!env.isAsmJS());
AutoCranelift compiler(env);
if (!compiler.init()) {
@ -301,6 +303,11 @@ wasm::CraneliftCompileFunctions(const ModuleEnvironment& env,
}
for (const FuncCompileInput& func : inputs) {
Decoder d(func.begin, func.end, func.lineOrBytecode, error);
if (!ValidateFunctionBody(env, func.index, func.end - func.begin, d, dvs)) {
return false;
}
CraneliftFuncCompileInput clifInput(func);
CraneliftCompiledFunc clifFunc;

View File

@ -32,6 +32,7 @@ CraneliftCompileFunctions(const ModuleEnvironment& env,
LifoAlloc& lifo,
const FuncCompileInputVector& inputs,
CompiledCode* code,
ExclusiveDeferredValidationState& dvs,
UniqueChars* error);
} // namespace wasm

View File

@ -672,7 +672,7 @@ ExecuteCompileTask(CompileTask* task, UniqueChars* error)
#ifdef ENABLE_WASM_CRANELIFT
if (task->env.optimizedBackend() == OptimizedBackend::Cranelift) {
if (!CraneliftCompileFunctions(task->env, task->lifo, task->inputs, &task->output,
error))
task->dvs, error))
{
return false;
}

View File

@ -2533,8 +2533,7 @@ DecodeFunctionBody(Decoder& d, const ModuleEnvironment& env,
}
static bool
DecodeCodeSection(Decoder& d, ModuleEnvironment* env,
ExclusiveDeferredValidationState& dvs)
DecodeCodeSection(Decoder& d, ModuleEnvironment* env, ExclusiveDeferredValidationState& dvs)
{
if (!env->codeSection) {
if (env->numFuncDefs() != 0) {
@ -2863,35 +2862,3 @@ wasm::Validate(JSContext* cx, const ShareableBytes& bytecode, UniqueChars* error
MOZ_ASSERT(!*error, "unreported error in decoding");
return true;
}
bool
wasm::ValidateForCranelift(const ShareableBytes& bytecode, UniqueChars* error)
{
Decoder d(bytecode.bytes, 0, error);
// Cranelift doesn't support GC yet.
HasGcTypes hasGcTypes = HasGcTypes::False;
// Cranelift doesn't support threads yet.
Shareable threadSupport = Shareable::False;
CompilerEnvironment compilerEnv(CompileMode::Once, Tier::Optimized,
OptimizedBackend::Cranelift, DebugEnabled::False, hasGcTypes);
ModuleEnvironment env(hasGcTypes, &compilerEnv, threadSupport);
if (!DecodeModuleEnvironment(d, &env)) {
return false;
}
ExclusiveDeferredValidationState dvs(mutexid::WasmDeferredValidation);
if (!DecodeCodeSection(d, &env, dvs)) {
return false;
}
if (!DecodeModuleTail(d, &env, dvs)) {
return false;
}
MOZ_ASSERT(!*error, "unreported error in decoding");
return true;
}

View File

@ -932,11 +932,6 @@ ConvertMemoryPagesToBytes(Limits* memory);
MOZ_MUST_USE bool
Validate(JSContext* cx, const ShareableBytes& bytecode, UniqueChars* error);
// Same, but don't require a JSContext.
MOZ_MUST_USE bool
ValidateForCranelift(const ShareableBytes& bytecode, UniqueChars* error);
} // namespace wasm
} // namespace js

View File

@ -50,24 +50,30 @@ fn main() {
"-DRUST_BINDGEN",
]).clang_arg("-I../..");
let path = PathBuf::from(env::var_os("MOZ_TOPOBJDIR").unwrap())
.join("js/src/rust/extra-bindgen-flags");
match env::var_os("MOZ_TOPOBJDIR") {
Some(path) => {
let path = PathBuf::from(path).join("js/src/rust/extra-bindgen-flags");
let mut extra_flags = String::new();
File::open(&path)
.expect("Failed to open extra-bindgen-flags file")
.read_to_string(&mut extra_flags)
.expect("Failed to read extra-bindgen-flags file");
let mut extra_flags = String::new();
File::open(&path)
.expect("Failed to open extra-bindgen-flags file")
.read_to_string(&mut extra_flags)
.expect("Failed to read extra-bindgen-flags file");
let display_path = path.to_str().expect("path is utf8 encoded");
println!("cargo:rerun-if-changed={}", display_path);
let display_path = path.to_str().expect("path is utf8 encoded");
println!("cargo:rerun-if-changed={}", display_path);
let extra_flags: Vec<String> = extra_flags
.split_whitespace()
.map(|s| s.to_owned())
.collect();
for flag in extra_flags {
bindings = bindings.clang_arg(flag);
let extra_flags: Vec<String> = extra_flags
.split_whitespace()
.map(|s| s.to_owned())
.collect();
for flag in extra_flags {
bindings = bindings.clang_arg(flag);
}
}
None => {
println!("cargo:warning={}", "MOZ_TOPOBJDIR should be set by default, otherwise the build is not guaranted to finish.");
}
}
let bindings = bindings

View File

@ -23,7 +23,7 @@
use cranelift_codegen::binemit::CodeOffset;
use cranelift_codegen::entity::EntityRef;
use cranelift_codegen::ir;
use cranelift_codegen::ir::SourceLoc;
use cranelift_wasm::FuncIndex;
use compile::CompiledFunc;
@ -51,7 +51,7 @@ impl CraneliftCompiledFunc {
}
impl CraneliftMetadataEntry {
pub fn direct_call(offset: CodeOffset, func_index: FuncIndex, srcloc: ir::SourceLoc) -> Self {
pub fn direct_call(offset: CodeOffset, func_index: FuncIndex, srcloc: SourceLoc) -> Self {
Self {
which: CraneliftMetadataEntry_Which_DirectCall,
offset,
@ -60,7 +60,7 @@ impl CraneliftMetadataEntry {
}
}
pub fn indirect_call(offset: CodeOffset, srcloc: ir::SourceLoc) -> Self {
pub fn indirect_call(offset: CodeOffset, srcloc: SourceLoc) -> Self {
Self {
which: CraneliftMetadataEntry_Which_IndirectCall,
offset,
@ -69,7 +69,7 @@ impl CraneliftMetadataEntry {
}
}
pub fn trap(offset: CodeOffset, srcloc: ir::SourceLoc, which: Trap) -> Self {
pub fn trap(offset: CodeOffset, srcloc: SourceLoc, which: Trap) -> Self {
Self {
which: CraneliftMetadataEntry_Which_Trap,
offset,
@ -78,7 +78,7 @@ impl CraneliftMetadataEntry {
}
}
pub fn memory_access(offset: CodeOffset, srcloc: ir::SourceLoc) -> Self {
pub fn memory_access(offset: CodeOffset, srcloc: SourceLoc) -> Self {
Self {
which: CraneliftMetadataEntry_Which_MemoryAccess,
offset,

View File

@ -17,13 +17,10 @@
// baldrapi but none of the functions.
use baldrapi::CraneliftModuleEnvironment;
use cranelift_codegen::binemit::CodeOffset;
use cranelift_codegen::cursor::{Cursor, FuncCursor};
use cranelift_codegen::cursor::FuncCursor;
use cranelift_codegen::entity::EntityRef;
use cranelift_codegen::ir::immediates::{Ieee32, Ieee64};
use cranelift_codegen::ir::stackslot::StackSize;
use cranelift_codegen::ir::{self, InstBuilder};
use cranelift_codegen::{CodegenError, CodegenResult};
use cranelift_wasm::{FuncIndex, GlobalIndex, SignatureIndex, TableIndex};
use std::mem;
use std::slice;
@ -40,13 +37,6 @@ pub use baldrapi::FuncTypeIdDescKind;
pub use baldrapi::Trap;
pub use baldrapi::TypeCode;
pub enum ConstantValue {
I32(i32),
I64(i64),
F32(f32),
F64(f64),
}
/// Convert a `TypeCode` into the equivalent Cranelift type.
///
/// We expect Cranelift's `VOID` type to go away in the future, so use `None` to represent a
@ -111,7 +101,7 @@ impl GlobalDesc {
let v = baldrapi::global_constantValue(self.0);
// Note that the floating point constants below
match v.t {
TypeCode::I32 => pos.ins().iconst(ir::types::I32, v.u.i32 as i64),
TypeCode::I32 => pos.ins().iconst(ir::types::I32, i64::from(v.u.i32)),
TypeCode::I64 => pos.ins().iconst(ir::types::I64, v.u.i64),
TypeCode::F32 => pos.ins().f32const(Ieee32::with_bits(v.u.i32 as u32)),
TypeCode::F64 => pos.ins().f64const(Ieee64::with_bits(v.u.i64 as u64)),
@ -201,6 +191,6 @@ impl<'a> ModuleEnvironment<'a> {
GlobalDesc(unsafe { baldrapi::env_global(self.env, global_index.index()) })
}
pub fn min_memory_length(&self) -> i64 {
self.env.min_memory_length as i64
i64::from(self.env.min_memory_length)
}
}

View File

@ -20,18 +20,14 @@
use baldrdash as bd;
use cpu::make_isa;
use cranelift_codegen::binemit::{Addend, CodeOffset, NullTrapSink, Reloc, RelocSink, TrapSink};
use cranelift_codegen::cursor::{Cursor, FuncCursor};
use cranelift_codegen::binemit::{Addend, CodeOffset, NullTrapSink, Reloc, RelocSink};
use cranelift_codegen::entity::EntityRef;
use cranelift_codegen::ir;
use cranelift_codegen::ir::stackslot::StackSize;
use cranelift_codegen::ir::{InstBuilder, SourceLoc, TrapCode};
use cranelift_codegen::isa::TargetIsa;
use cranelift_codegen::settings::Flags;
use cranelift_codegen::{self, ir};
use cranelift_codegen::{CodegenError, CodegenResult};
use cranelift_wasm::{
self, FuncIndex, GlobalIndex, MemoryIndex, SignatureIndex, TableIndex, WasmResult,
};
use cranelift_codegen::CodegenResult;
use cranelift_codegen::Context;
use cranelift_wasm::{FuncIndex, FuncTranslator, WasmResult};
use std::fmt;
use std::mem;
use utils::DashResult;
@ -70,8 +66,8 @@ pub struct BatchCompiler<'a, 'b> {
static_environ: &'a bd::StaticEnvironment,
environ: bd::ModuleEnvironment<'b>,
isa: Box<TargetIsa>,
context: cranelift_codegen::Context,
trans: cranelift_wasm::FuncTranslator,
context: Context,
trans: FuncTranslator,
pub current_func: CompiledFunc,
}
@ -85,8 +81,8 @@ impl<'a, 'b> BatchCompiler<'a, 'b> {
static_environ,
environ,
isa: make_isa(static_environ)?,
context: cranelift_codegen::Context::new(),
trans: cranelift_wasm::FuncTranslator::new(),
context: Context::new(),
trans: FuncTranslator::new(),
current_func: CompiledFunc::new(),
})
}
@ -146,11 +142,7 @@ impl<'a, 'b> BatchCompiler<'a, 'b> {
}
{
let eenv = &mut EmitEnv::new(
&self.context.func,
&self.environ,
&mut self.current_func.metadata,
);
let eenv = &mut EmitEnv::new(&mut self.current_func.metadata);
let mut trap_sink = NullTrapSink {};
unsafe {
let code_buffer = &mut self.current_func.code_buffer;
@ -173,7 +165,7 @@ impl<'a, 'b> BatchCompiler<'a, 'b> {
// Cranelift computes the total stack frame size including the pushed return address,
// standard SM prologue pushes, and its own stack slots.
let total = self.context.func.stack_slots.frame_size.expect("No frame");
let sm_pushed = self.isa.flags().baldrdash_prologue_words() as StackSize
let sm_pushed = StackSize::from(self.isa.flags().baldrdash_prologue_words())
* mem::size_of::<usize>() as StackSize;
total
.checked_sub(sm_pushed)
@ -277,8 +269,8 @@ impl<'a, 'b> BatchCompiler<'a, 'b> {
_ => panic!("Bad format for call"),
};
let func_index = match callee {
&ir::ExternalName::User {
let func_index = match *callee {
ir::ExternalName::User {
namespace: 0,
index,
} => FuncIndex::new(index as usize),
@ -427,27 +419,17 @@ pub fn symbolic_function_name(sym: bd::SymbolicAddress) -> ir::ExternalName {
}
/// References joined so we can implement `RelocSink`.
struct EmitEnv<'a, 'b, 'c> {
func: &'a ir::Function,
env: &'b bd::ModuleEnvironment<'b>,
metadata: &'c mut Vec<bd::MetadataEntry>,
struct EmitEnv<'a> {
metadata: &'a mut Vec<bd::MetadataEntry>,
}
impl<'a, 'b, 'c> EmitEnv<'a, 'b, 'c> {
pub fn new(
func: &'a ir::Function,
env: &'b bd::ModuleEnvironment,
metadata: &'c mut Vec<bd::MetadataEntry>,
) -> EmitEnv<'a, 'b, 'c> {
EmitEnv {
func,
env,
metadata,
}
impl<'a> EmitEnv<'a> {
pub fn new(metadata: &'a mut Vec<bd::MetadataEntry>) -> EmitEnv<'a> {
EmitEnv { metadata }
}
}
impl<'a, 'b, 'c> RelocSink for EmitEnv<'a, 'b, 'c> {
impl<'a> RelocSink for EmitEnv<'a> {
fn reloc_ebb(&mut self, _offset: CodeOffset, _reloc: Reloc, _ebb_offset: CodeOffset) {
unimplemented!();
}
@ -460,14 +442,11 @@ impl<'a, 'b, 'c> RelocSink for EmitEnv<'a, 'b, 'c> {
_addend: Addend,
) {
// Decode the function name.
match name {
&ir::ExternalName::User {
namespace: 0,
index,
} => {
match *name {
ir::ExternalName::User { namespace: 0, .. } => {
// This is a direct function call handled by `emit_metadata` above.
}
&ir::ExternalName::User {
ir::ExternalName::User {
namespace: 1,
index,
} => {
@ -478,7 +457,7 @@ impl<'a, 'b, 'c> RelocSink for EmitEnv<'a, 'b, 'c> {
self.metadata
.push(bd::MetadataEntry::symbolic_access(offset, sym));
}
&ir::ExternalName::LibCall(call) => {
ir::ExternalName::LibCall(call) => {
let sym = match call {
ir::LibCall::CeilF32 => bd::SymbolicAddress::CeilF32,
ir::LibCall::CeilF64 => bd::SymbolicAddress::CeilF64,

View File

@ -23,10 +23,7 @@
use cranelift_codegen::isa;
use cranelift_codegen::settings::{self, Configurable};
use std::error;
use std::mem;
use std::str::FromStr;
use target_lexicon;
use utils::{BasicError, DashResult};
use baldrdash::StaticEnvironment;

View File

@ -13,9 +13,6 @@
* limitations under the License.
*/
#![allow(unused)]
#![warn(unused_must_use)]
extern crate cranelift_codegen;
extern crate cranelift_wasm;
#[macro_use]
@ -53,12 +50,12 @@ pub extern "C" fn cranelift_initialize() {
///
/// This is declared in `clifapi.h`.
#[no_mangle]
pub extern "C" fn cranelift_compiler_create<'a, 'b>(
pub unsafe extern "C" fn cranelift_compiler_create<'a, 'b>(
static_env: *const StaticEnvironment,
env: *const baldrapi::CraneliftModuleEnvironment,
) -> *mut BatchCompiler<'a, 'b> {
let env = unsafe { env.as_ref().unwrap() };
let static_env = unsafe { static_env.as_ref().unwrap() };
let env = env.as_ref().unwrap();
let static_env = static_env.as_ref().unwrap();
match BatchCompiler::new(static_env, ModuleEnvironment::new(env)) {
Ok(compiler) => Box::into_raw(Box::new(compiler)),
Err(err) => {
@ -72,26 +69,26 @@ pub extern "C" fn cranelift_compiler_create<'a, 'b>(
///
/// This is declared in `clifapi.h`.
#[no_mangle]
pub extern "C" fn cranelift_compiler_destroy(compiler: *mut BatchCompiler) {
pub unsafe extern "C" fn cranelift_compiler_destroy(compiler: *mut BatchCompiler) {
assert!(
!compiler.is_null(),
"NULL pointer passed to cranelift_compiler_destroy"
);
// Convert the pointer back into the box it came from. Then drop it.
let _box = unsafe { Box::from_raw(compiler) };
let _box = Box::from_raw(compiler);
}
/// Compile a single function.
///
/// This is declared in `clifapi.h`.
#[no_mangle]
pub extern "C" fn cranelift_compile_function(
pub unsafe extern "C" fn cranelift_compile_function(
compiler: *mut BatchCompiler,
data: *const FuncCompileInput,
result: *mut CompiledFunc,
) -> bool {
let compiler = unsafe { compiler.as_mut().unwrap() };
let data = unsafe { data.as_ref().unwrap() };
let compiler = compiler.as_mut().unwrap();
let data = data.as_ref().unwrap();
if let Err(e) = compiler.translate_wasm(data) {
error!("Wasm translation error: {}\n{}", e, compiler);
@ -105,7 +102,7 @@ pub extern "C" fn cranelift_compile_function(
// TODO(bbouvier) if destroy is called while one of these objects is alive, you're going to
// have a bad time. Would be nice to be able to enforce lifetimes accross languages, somehow.
let result = unsafe { result.as_mut().unwrap() };
let result = result.as_mut().unwrap();
result.reset(&compiler.current_func);
true

View File

@ -14,7 +14,6 @@
*/
/// Helpers common to other source files here.
use std;
use std::error;
use std::fmt;

View File

@ -27,12 +27,11 @@ use cranelift_codegen::ir::condcodes::IntCC;
use cranelift_codegen::ir::InstBuilder;
use cranelift_codegen::isa::{CallConv, TargetFrontendConfig, TargetIsa};
use cranelift_codegen::packed_option::PackedOption;
use cranelift_codegen::settings::Flags;
use cranelift_wasm::{
self, FuncIndex, GlobalIndex, MemoryIndex, ReturnMode, SignatureIndex, TableIndex, WasmResult,
FuncEnvironment, FuncIndex, GlobalIndex, GlobalVariable, MemoryIndex, ReturnMode,
SignatureIndex, TableIndex, WasmResult,
};
use std::collections::HashMap;
use target_lexicon::Triple;
/// Get the integer type used for representing pointers on this platform.
fn native_pointer_type() -> ir::Type {
@ -373,7 +372,7 @@ impl<'a, 'b, 'c> TransEnv<'a, 'b, 'c> {
}
}
impl<'a, 'b, 'c> cranelift_wasm::FuncEnvironment for TransEnv<'a, 'b, 'c> {
impl<'a, 'b, 'c> FuncEnvironment for TransEnv<'a, 'b, 'c> {
fn target_config(&self) -> TargetFrontendConfig {
self.isa.frontend_config()
}
@ -382,11 +381,7 @@ impl<'a, 'b, 'c> cranelift_wasm::FuncEnvironment for TransEnv<'a, 'b, 'c> {
native_pointer_type()
}
fn make_global(
&mut self,
func: &mut ir::Function,
index: GlobalIndex,
) -> cranelift_wasm::GlobalVariable {
fn make_global(&mut self, func: &mut ir::Function, index: GlobalIndex) -> GlobalVariable {
let global = self.env.global(index);
if global.is_constant() {
// Constant globals have a known value at compile time. We insert an instruction to
@ -394,7 +389,7 @@ impl<'a, 'b, 'c> cranelift_wasm::FuncEnvironment for TransEnv<'a, 'b, 'c> {
let mut pos = FuncCursor::new(func);
pos.next_ebb().expect("empty function");
pos.next_inst();
cranelift_wasm::GlobalVariable::Const(global.emit_constant(&mut pos))
GlobalVariable::Const(global.emit_constant(&mut pos))
} else {
// This is a global variable. Here we don't care if it is mutable or not.
let offset = global.tls_offset();
@ -419,7 +414,7 @@ impl<'a, 'b, 'c> cranelift_wasm::FuncEnvironment for TransEnv<'a, 'b, 'c> {
// Create a Cranelift global variable. We don't need to remember the reference, the
// function translator does that for us.
cranelift_wasm::GlobalVariable::Memory {
GlobalVariable::Memory {
gv,
ty: global.value_type().into(),
}
@ -535,7 +530,6 @@ impl<'a, 'b, 'c> cranelift_wasm::FuncEnvironment for TransEnv<'a, 'b, 'c> {
) -> WasmResult<ir::Inst> {
let wsig = self.env.signature(sig_index);
// TODO: When compiling asm.js, the table index in inferred from the signature index.
// Currently, WebAssembly doesn't support multiple tables. That may change.
assert_eq!(table_index.index(), 0);
let wtable = self.get_table(pos.func, table_index);
@ -689,23 +683,22 @@ impl<'a, 'b, 'c> cranelift_wasm::FuncEnvironment for TransEnv<'a, 'b, 'c> {
fn translate_memory_grow(
&mut self,
mut pos: FuncCursor,
index: MemoryIndex,
heap: ir::Heap,
_index: MemoryIndex,
_heap: ir::Heap,
val: ir::Value,
) -> WasmResult<ir::Value> {
use cranelift_codegen::ir::types::I32;
// We emit a call to `uint32_t growMemory_i32(Instance* instance, uint32_t delta)` via a
// stub.
let (fnref, sigref) =
self.symbolic_funcref(pos.func, bd::SymbolicAddress::GrowMemory, || {
let mut sig = ir::Signature::new(CallConv::Baldrdash);
sig.params.push(ir::AbiParam::new(native_pointer_type()));
sig.params.push(ir::AbiParam::new(I32).uext());
sig.params.push(ir::AbiParam::new(ir::types::I32).uext());
sig.params.push(ir::AbiParam::special(
native_pointer_type(),
ir::ArgumentPurpose::VMContext,
));
sig.returns.push(ir::AbiParam::new(I32).uext());
sig.returns.push(ir::AbiParam::new(ir::types::I32).uext());
sig
});
@ -728,10 +721,9 @@ impl<'a, 'b, 'c> cranelift_wasm::FuncEnvironment for TransEnv<'a, 'b, 'c> {
fn translate_memory_size(
&mut self,
mut pos: FuncCursor,
index: MemoryIndex,
heap: ir::Heap,
_index: MemoryIndex,
_heap: ir::Heap,
) -> WasmResult<ir::Value> {
use cranelift_codegen::ir::types::I32;
// We emit a call to `uint32_t currentMemory_i32(Instance* instance)` via a stub.
let (fnref, sigref) =
self.symbolic_funcref(pos.func, bd::SymbolicAddress::CurrentMemory, || {
@ -741,7 +733,7 @@ impl<'a, 'b, 'c> cranelift_wasm::FuncEnvironment for TransEnv<'a, 'b, 'c> {
native_pointer_type(),
ir::ArgumentPurpose::VMContext,
));
sig.returns.push(ir::AbiParam::new(I32).uext());
sig.returns.push(ir::AbiParam::new(ir::types::I32).uext());
sig
});
@ -795,25 +787,10 @@ impl TableInfo {
TableInfo { global }
}
/// Load the table length.
pub fn load_length(&self, pos: &mut FuncCursor, addr: ir::Value) -> ir::Value {
pos.ins().load(ir::types::I32, ir::MemFlags::new(), addr, 0)
}
/// Load the table base.
pub fn load_base(&self, pos: &mut FuncCursor, addr: ir::Value) -> ir::Value {
pos.ins().load(
native_pointer_type(),
ir::MemFlags::new(),
addr,
native_pointer_size(),
)
}
/// Get the size in bytes of each table entry.
pub fn entry_size(&self) -> i64 {
// Each entry is an `wasm::FunctionTableElem` which consists of the code pointer and a new
// VM context pointer.
native_pointer_size() as i64 * 2
i64::from(native_pointer_size()) * 2
}
}

View File

@ -13,6 +13,7 @@
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/GeckoBindings.h"
#include "mozilla/LayerAnimationInfo.h"
#include "mozilla/layers/AnimationInfo.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoStyleSetInlines.h"
#include "mozilla/Unused.h"
@ -53,6 +54,8 @@
#include "nsAccessibilityService.h"
#endif
using mozilla::layers::AnimationInfo;
using namespace mozilla::dom;
using namespace mozilla::layers;

View File

@ -10,6 +10,8 @@
#include "nscore.h"
#include "DateTimeFormat.h"
#include "MediaManager.h"
#include "mozilla/dom/ServiceWorkerRegistrar.h"
#include "nsAttrValue.h"
#include "nsColorNames.h"
#include "nsComputedDOMStyle.h"

View File

@ -15,6 +15,7 @@
#include "mozilla/dom/HTMLInputElement.h"
#include "nsIDocument.h"
using namespace mozilla;
using mozilla::dom::Element;
using mozilla::dom::HTMLInputElement;
using mozilla::dom::CallerType;

View File

@ -8,6 +8,7 @@
#include "nsContainerFrame.h"
#include "nsIFormControlFrame.h"
#include "nsIFrameInlines.h"
#include "nsPresContext.h"
#include "nsGkAtoms.h"
#include "nsButtonFrameRenderer.h"

View File

@ -5,6 +5,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsLegendFrame.h"
#include "ComputedStyle.h"
#include "nsIContent.h"
#include "nsGenericHTMLElement.h"
#include "nsAttrValueInlines.h"
@ -12,6 +14,9 @@
#include "nsGkAtoms.h"
#include "nsStyleConsts.h"
#include "nsCheckboxRadioFrame.h"
#include "WritingModes.h"
using namespace mozilla;
nsIFrame*
NS_NewLegendFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)

View File

@ -9,6 +9,7 @@
#include "mozilla/TimeStamp.h"
#include "nsPoint.h"
#include "Units.h"
namespace mozilla {

View File

@ -9,6 +9,7 @@
#include "inLayoutUtils.h"
#include "gfxTextRun.h"
#include "nsArray.h"
#include "nsAutoPtr.h"
#include "nsIServiceManager.h"

View File

@ -10,11 +10,15 @@
#include "mozilla/dom/CSSImportRule.h"
#include "mozilla/dom/CSSRuleBinding.h"
#include "mozilla/dom/CSSStyleRule.h"
#include "mozilla/dom/ShadowRoot.h"
#include "mozilla/IntegerRange.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/StyleSheetInlines.h"
#include "nsDocument.h"
#include "nsStyleSheetService.h"
#include "nsXBLPrototypeResources.h"
using namespace mozilla::dom;
namespace mozilla {

View File

@ -7,6 +7,8 @@
#include "inDeepTreeWalker.h"
#include "inLayoutUtils.h"
#include "BindingStyleRule.h"
#include "InspectorUtils.h"
#include "nsString.h"
#include "nsIDocument.h"
#include "nsServiceManagerUtils.h"
@ -16,6 +18,8 @@
#include "mozilla/dom/InspectorUtils.h"
#include "mozilla/dom/NodeFilterBinding.h"
using mozilla::dom::InspectorUtils;
/*****************************************************************************
* This implementation does not currently operaate according to the W3C spec.
* In particular it does NOT handle DOM mutations during the walk. It also

View File

@ -8,6 +8,7 @@
#include "nsCOMPtr.h"
#include "nsDataHashtable.h"
#include "nsHashKeys.h"
#include "nsNetUtil.h"
#include "nsTArray.h"
#include "nsIPersistentProperties2.h"

View File

@ -16,6 +16,7 @@
#include "mozilla/gfx/2D.h"
#include "mozilla/dom/Event.h"
using namespace mozilla;
using mozilla::dom::Event;
//

View File

@ -11,6 +11,8 @@
using namespace mozilla;
using mozilla::gfx::DrawTarget;
//
// <mfenced> -- surround content with a pair of fences
//

View File

@ -11,7 +11,7 @@
#include "gfxContext.h"
#include "gfxMathTable.h"
using mozilla::WritingMode;
using namespace mozilla;
//
// <mmultiscripts> -- attach prescripts and tensor indices to a base - implementation

View File

@ -12,6 +12,8 @@
#include "nsMathMLElement.h"
#include <algorithm>
using namespace mozilla;
//
// <mo> -- operator, fence, or separator - implementation
//

View File

@ -11,6 +11,8 @@
#include "mozilla/TextUtils.h"
#include <algorithm>
using namespace mozilla;
//
// <mpadded> -- adjust space around content - implementation
//

View File

@ -7,6 +7,8 @@
#include "nsMathMLmrowFrame.h"
#include "mozilla/gfx/2D.h"
using namespace mozilla;
//
// <mrow> -- horizontally group any number of subexpressions - implementation
//

View File

@ -9,6 +9,7 @@
#include "mozilla/gfx/2D.h"
#include <algorithm>
using namespace mozilla;
//
// <mspace> -- space - implementation

View File

@ -12,6 +12,8 @@
#include "gfxContext.h"
#include "gfxMathTable.h"
using namespace mozilla;
//
// <munderover> -- attach an underscript-overscript pair to a base - implementation
// <mover> -- attach an overscript to a base - implementation

View File

@ -9,6 +9,8 @@
#include "nsMimeTypes.h"
#include "mozilla/gfx/2D.h"
using namespace mozilla;
//
// <semantics> -- associate annotations with a MathML expression
//

View File

@ -22,6 +22,8 @@
#include "mozilla/dom/HTMLCanvasElement.h"
#include "mozilla/dom/KeyframeEffect.h"
#include "mozilla/dom/Selection.h"
#include "mozilla/dom/ServiceWorkerRegistrar.h"
#include "mozilla/dom/ServiceWorkerRegistration.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/layers/PLayerTransaction.h"
#include "mozilla/ShapeUtils.h"
@ -32,6 +34,7 @@
#include "nsRegion.h"
#include "nsStyleStructInlines.h"
#include "nsStyleTransformMatrix.h"
#include "nsTransitionManager.h"
#include "gfxMatrix.h"
#include "gfxPrefs.h"
#include "nsSVGIntegrationUtils.h"

View File

@ -9,6 +9,7 @@
#include <istream>
#include "DrawEventRecorder.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/Filters.h"
#include "mozilla/gfx/RecordedEvent.h"

View File

@ -19,11 +19,12 @@
class nsDeviceContext;
class nsIPrintSettings;
class nsIWebProgressListener;
class PrintTranslator;
namespace mozilla {
namespace layout {
class PrintTranslator;
class RemotePrintJobParent final : public PRemotePrintJobParent
{
public:

View File

@ -8,6 +8,7 @@
#include "nsIStringBundle.h"
#include "nsIServiceManager.h"
#include "nsIWidget.h"
#include "nsPrintObject.h"
#include "nsPrintPreviewListener.h"
#include "nsIWebProgressListener.h"

View File

@ -137,7 +137,7 @@ using namespace mozilla::dom;
#define DUMP_LAYOUT_LEVEL (static_cast<mozilla::LogLevel>(9))
#ifndef PR_PL
static mozilla::LazyLogModule gPrintingLog("printing")
static mozilla::LazyLogModule gPrintingLog("printing");
#define PR_PL(_p1) MOZ_LOG(gPrintingLog, mozilla::LogLevel::Debug, _p1);
#endif

View File

@ -5,10 +5,12 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsPrintObject.h"
#include "nsIContentViewer.h"
#include "nsContentUtils.h" // for nsAutoScriptBlocker
#include "nsIInterfaceRequestorUtils.h"
#include "nsPIDOMWindow.h"
#include "nsPresContext.h"
#include "nsGkAtoms.h"
#include "nsComponentManagerUtils.h"
#include "nsIDocShellTreeItem.h"
@ -17,6 +19,10 @@
#include "nsDocShell.h"
#include "mozilla/dom/BrowsingContext.h"
#include "mozilla/dom/Element.h"
using mozilla::dom::BrowsingContext;
using mozilla::dom::Element;
//---------------------------------------------------
//-- nsPrintObject Class Impl

View File

@ -9,6 +9,7 @@
#include "mozilla/dom/CSSKeyframesRuleBinding.h"
#include "mozilla/dom/CSSRuleList.h"
#include "mozilla/ServoBindings.h"
#include "nsCOMArray.h"
#include <limits>

View File

@ -12,6 +12,7 @@
#include "mozilla/MathAlgorithms.h"
#include "mozilla/Types.h"
#include "mozilla/WritingModes.h"
#include "nsPresContext.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"

View File

@ -20,6 +20,7 @@
#include "mozilla/ResultExtensions.h"
#include "mozilla/URLPreloader.h"
#include "nsIRunnable.h"
#include "nsITimedChannel.h"
#include "nsSyncLoadService.h"
#include "nsCOMPtr.h"
#include "nsString.h"

View File

@ -4,7 +4,11 @@
* 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 "mozilla/MappedDeclarations.h"
#include "MappedDeclarations.h"
#include "nsAttrValue.h"
#include "nsIDocument.h"
#include "nsPresContext.h"
namespace mozilla {

View File

@ -13,6 +13,7 @@
#include "mozilla/ServoBindings.h"
#include "mozilla/ServoStyleSet.h"
#include "mozilla/StyleSheetInlines.h"
#include "nsPresContext.h"
namespace mozilla {
namespace dom {

View File

@ -11,6 +11,7 @@
#include "mozilla/gfx/Types.h"
#include "mozilla/RefPtr.h"
#include "mozilla/ServoStyleConsts.h"
#include "mozilla/ServoTypes.h"
#include "nsColor.h"
#include "nsCSSPropertyID.h"

View File

@ -22,6 +22,7 @@
#include "mozilla/IntegerRange.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StyleSheet.h"
#include "nsIDocument.h"
using namespace mozilla::dom;

View File

@ -10,6 +10,7 @@
#include "gfxPlatformFontList.h"
#include "mozilla/AutoRestyleTimelineMarker.h"
#include "mozilla/DocumentStyleRootIterator.h"
#include "mozilla/EffectCompositor.h"
#include "mozilla/IntegerRange.h"
#include "mozilla/LookAndFeel.h"
#include "mozilla/ServoBindings.h"

View File

@ -8,6 +8,7 @@
#include "nsDOMCSSValueList.h"
#include "nsString.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/Move.h"
using namespace mozilla;

View File

@ -5,12 +5,15 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// Keep in (case-insensitive) order:
#include "ComputedStyle.h"
#include "nsContainerFrame.h"
#include "nsFrame.h"
#include "nsGkAtoms.h"
#include "SVGObserverUtils.h"
#include "nsSVGFilters.h"
using namespace mozilla;
/*
* This frame is used by filter primitive elements that don't
* have special child elements that provide parameters.

View File

@ -11,6 +11,8 @@
#include "SVGObserverUtils.h"
#include "nsSVGFilters.h"
using namespace mozilla;
class SVGFEUnstyledLeafFrame final : public nsFrame
{
friend nsIFrame*

View File

@ -13,6 +13,7 @@
#include "nsCSSFrameConstructor.h"
#include "nsISupportsImpl.h"
#include "nsSVGClipPathFrame.h"
#include "nsSVGMarkerFrame.h"
#include "nsSVGPaintServerFrame.h"
#include "nsSVGFilterFrame.h"
#include "nsSVGMaskFrame.h"
@ -24,6 +25,7 @@
#include "ImageLoader.h"
#include "mozilla/net/ReferrerPolicy.h"
using namespace mozilla;
using namespace mozilla::dom;
static already_AddRefed<URLAndReferrerInfo>

View File

@ -11,6 +11,7 @@
#include "mozilla/dom/SVGSVGElement.h"
#include "mozilla/dom/SVGViewElement.h"
using namespace mozilla;
using namespace mozilla::dom;
/**

View File

@ -7,6 +7,7 @@
#ifndef __NS_CSSCLIPPATHINSTANCE_H__
#define __NS_CSSCLIPPATHINSTANCE_H__
#include "gfxPoint.h"
#include "nsStyleStruct.h"
#include "nsRect.h"
#include "mozilla/gfx/2D.h"

View File

@ -15,6 +15,7 @@
#include "nsSVGIntegrationUtils.h"
#include "nsSVGUtils.h"
using namespace mozilla;
using namespace mozilla::dom;
//----------------------------------------------------------------------

View File

@ -8,6 +8,8 @@
#include "nsSVGGenericContainerFrame.h"
#include "nsSVGIntegrationUtils.h"
using namespace mozilla;
//----------------------------------------------------------------------
// nsSVGGenericContainerFrame Implementation

View File

@ -7,6 +7,8 @@
// Main header first:
#include "nsSVGInnerSVGFrame.h"
using namespace mozilla;
nsIFrame*
NS_NewSVGInnerSVGFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
{

View File

@ -14,6 +14,7 @@
#include "SVGGeometryElement.h"
#include "SVGGeometryFrame.h"
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::gfx;
using namespace mozilla::image;

View File

@ -22,6 +22,7 @@
using namespace mozilla;
using namespace mozilla::dom;
using namespace mozilla::gfx;
using namespace mozilla::image;
//----------------------------------------------------------------------

View File

@ -11,6 +11,8 @@
#include "mozilla/ComputedStyle.h"
#include "SVGObserverUtils.h"
using namespace mozilla;
// This is a very simple frame whose only purpose is to capture style change
// events and propagate them to the parent. Most of the heavy lifting is done
// within the nsSVGGradientFrame, which is the parent for this frame

View File

@ -11,6 +11,7 @@
#include "mozilla/dom/SVGSwitchElement.h"
#include "nsSVGUtils.h"
using namespace mozilla;
using namespace mozilla::gfx;
using namespace mozilla::image;

View File

@ -7,6 +7,8 @@
// Main header first:
#include "nsSVGSymbolFrame.h"
using namespace mozilla;
nsIFrame*
NS_NewSVGSymbolFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
{

View File

@ -10,11 +10,15 @@
*/
#include "FixedTableLayoutStrategy.h"
#include "nsStyleConsts.h"
#include "nsTableFrame.h"
#include "nsTableColFrame.h"
#include "nsTableCellFrame.h"
#include "WritingModes.h"
#include <algorithm>
using namespace mozilla;
FixedTableLayoutStrategy::FixedTableLayoutStrategy(nsTableFrame *aTableFrame)
: nsITableLayoutStrategy(nsITableLayoutStrategy::Fixed)
, mTableFrame(aTableFrame)

View File

@ -13,6 +13,8 @@
#include "nsIPresShell.h"
#include "mozilla/HashFunctions.h"
using namespace mozilla;
//#define DEBUG_SPANNING_CELL_SORTER
SpanningCellSorter::SpanningCellSorter()

View File

@ -4,6 +4,10 @@
* 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 "nsTableFrame.h"
#include "mozilla/gfx/2D.h"
#include "mozilla/gfx/Helpers.h"
#include "mozilla/Likely.h"
#include "mozilla/MathAlgorithms.h"
#include "mozilla/IntegerRange.h"
@ -11,7 +15,6 @@
#include "gfxContext.h"
#include "nsCOMPtr.h"
#include "nsTableFrame.h"
#include "mozilla/ComputedStyle.h"
#include "nsStyleConsts.h"
#include "nsIContent.h"
@ -54,6 +57,11 @@ using namespace mozilla;
using namespace mozilla::image;
using namespace mozilla::layout;
using mozilla::gfx::AutoRestoreTransform;
using mozilla::gfx::DrawTarget;
using mozilla::gfx::Float;
using mozilla::gfx::ToDeviceColor;
/********************************************************************************
** TableReflowInput **
********************************************************************************/

View File

@ -17,6 +17,8 @@
#include "nsBoxLayoutState.h"
#include "nsGridLayout2.h"
using namespace mozilla;
already_AddRefed<nsBoxLayout> NS_NewGridRowGroupLayout();
nsIFrame*

View File

@ -17,6 +17,8 @@
#include "nsBoxLayoutState.h"
#include "nsGridLayout2.h"
using namespace mozilla;
already_AddRefed<nsBoxLayout> NS_NewGridRowLeafLayout();
nsIFrame*

View File

@ -22,7 +22,7 @@
#include "mozilla/TextEvents.h"
using namespace mozilla;
using namespace mozilla::dom;
NS_IMPL_ISUPPORTS(nsButtonBoxFrame::nsButtonBoxListener, nsIDOMEventListener)

View File

@ -33,6 +33,8 @@
#include "nsAccessibilityService.h"
#endif
using namespace mozilla;
nsIFrame*
NS_NewDeckFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
{

View File

@ -23,6 +23,7 @@
//#define DEBUG_REFLOW
using namespace mozilla;
using namespace mozilla::dom;
class nsDocElementBoxFrame final : public nsBoxFrame

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