2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-06-27 17:01:55 +04:00
|
|
|
/* 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/. */
|
|
|
|
|
|
|
|
/*
|
2012-07-24 12:10:25 +04:00
|
|
|
* Base class for all element classes as well as nsDocumentFragment. This
|
|
|
|
* provides an implementation of nsIDOMNode, implements nsIContent, provides
|
2012-06-27 17:01:55 +04:00
|
|
|
* utility methods for subclasses, and so forth.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FragmentOrElement_h___
|
|
|
|
#define FragmentOrElement_h___
|
|
|
|
|
2013-05-30 00:43:41 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2013-06-23 16:03:39 +04:00
|
|
|
#include "mozilla/MemoryReporting.h"
|
2012-08-05 13:11:24 +04:00
|
|
|
#include "nsAttrAndChildArray.h" // member
|
|
|
|
#include "nsCycleCollectionParticipant.h" // NS_DECL_CYCLE_*
|
|
|
|
#include "nsIContent.h" // base class
|
|
|
|
#include "nsIWeakReference.h" // base class
|
|
|
|
#include "nsNodeUtils.h" // class member nsNodeUtils::CloneNodeImpl
|
2013-07-22 16:15:43 +04:00
|
|
|
#include "nsIHTMLCollection.h"
|
2016-12-09 05:54:07 +03:00
|
|
|
#include "nsDataHashtable.h"
|
2012-06-27 17:01:55 +04:00
|
|
|
|
2012-08-05 13:11:24 +04:00
|
|
|
class ContentUnbinder;
|
2012-06-27 17:01:55 +04:00
|
|
|
class nsContentList;
|
2012-08-05 13:11:24 +04:00
|
|
|
class nsDOMAttributeMap;
|
2012-06-27 17:01:55 +04:00
|
|
|
class nsDOMTokenList;
|
2012-08-05 13:11:24 +04:00
|
|
|
class nsIControllers;
|
|
|
|
class nsICSSDeclaration;
|
|
|
|
class nsIDocument;
|
2012-10-17 05:14:32 +04:00
|
|
|
class nsDOMStringMap;
|
2012-08-05 13:11:24 +04:00
|
|
|
class nsIURI;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
2014-06-06 09:23:40 +04:00
|
|
|
namespace mozilla {
|
2016-11-03 06:41:02 +03:00
|
|
|
class DeclarationBlock;
|
2014-06-06 09:23:40 +04:00
|
|
|
namespace dom {
|
2017-03-16 07:21:12 +03:00
|
|
|
struct CustomElementData;
|
2016-10-28 17:24:00 +03:00
|
|
|
class DOMIntersectionObserver;
|
2014-06-06 09:23:40 +04:00
|
|
|
class Element;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2014-06-06 09:23:40 +04:00
|
|
|
|
2012-06-27 17:01:55 +04:00
|
|
|
/**
|
|
|
|
* A class that implements nsIWeakReference
|
|
|
|
*/
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsNodeWeakReference final : public nsIWeakReference
|
2012-06-27 17:01:55 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-08-05 17:19:51 +04:00
|
|
|
explicit nsNodeWeakReference(nsINode* aNode)
|
2012-06-27 17:01:55 +04:00
|
|
|
: mNode(aNode)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// nsISupports
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// nsIWeakReference
|
|
|
|
NS_DECL_NSIWEAKREFERENCE
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
void NoticeNodeDestruction()
|
|
|
|
{
|
|
|
|
mNode = nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2014-06-25 06:09:15 +04:00
|
|
|
~nsNodeWeakReference();
|
|
|
|
|
2015-05-21 15:24:00 +03:00
|
|
|
nsINode* MOZ_NON_OWNING_REF mNode;
|
2012-06-27 17:01:55 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tearoff to use for nodes to implement nsISupportsWeakReference
|
|
|
|
*/
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsNodeSupportsWeakRefTearoff final : public nsISupportsWeakReference
|
2012-06-27 17:01:55 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-08-05 17:19:51 +04:00
|
|
|
explicit nsNodeSupportsWeakRefTearoff(nsINode* aNode)
|
2012-06-27 17:01:55 +04:00
|
|
|
: mNode(aNode)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// nsISupports
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
|
|
|
|
// nsISupportsWeakReference
|
|
|
|
NS_DECL_NSISUPPORTSWEAKREFERENCE
|
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTION_CLASS(nsNodeSupportsWeakRefTearoff)
|
|
|
|
|
|
|
|
private:
|
2014-06-25 06:09:15 +04:00
|
|
|
~nsNodeSupportsWeakRefTearoff() {}
|
|
|
|
|
2012-06-27 17:01:55 +04:00
|
|
|
nsCOMPtr<nsINode> mNode;
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A generic base class for DOM elements, implementing many nsIContent,
|
|
|
|
* nsIDOMNode and nsIDOMElement methods.
|
|
|
|
*/
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2013-12-02 14:26:11 +04:00
|
|
|
class ShadowRoot;
|
2013-01-04 10:54:26 +04:00
|
|
|
|
2012-06-27 17:01:55 +04:00
|
|
|
class FragmentOrElement : public nsIContent
|
2012-06-27 17:01:55 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-08-05 17:19:51 +04:00
|
|
|
explicit FragmentOrElement(already_AddRefed<mozilla::dom::NodeInfo>& aNodeInfo);
|
|
|
|
explicit FragmentOrElement(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
|
|
|
|
|
|
|
NS_DECL_SIZEOF_EXCLUDING_THIS
|
|
|
|
|
|
|
|
// nsINode interface methods
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual uint32_t GetChildCount() const override;
|
|
|
|
virtual nsIContent *GetChildAt(uint32_t aIndex) const override;
|
|
|
|
virtual nsIContent * const * GetChildArray(uint32_t* aChildCount) const override;
|
|
|
|
virtual int32_t IndexOf(const nsINode* aPossibleChild) const override;
|
2012-08-22 19:56:38 +04:00
|
|
|
virtual nsresult InsertChildAt(nsIContent* aKid, uint32_t aIndex,
|
2015-03-21 19:28:04 +03:00
|
|
|
bool aNotify) override;
|
|
|
|
virtual void RemoveChildAt(uint32_t aIndex, bool aNotify) override;
|
2014-08-05 14:10:00 +04:00
|
|
|
virtual void GetTextContentInternal(nsAString& aTextContent,
|
2017-01-18 07:52:29 +03:00
|
|
|
mozilla::OOMReporter& aError) override;
|
2012-10-09 16:31:24 +04:00
|
|
|
virtual void SetTextContentInternal(const nsAString& aTextContent,
|
2015-03-21 19:28:04 +03:00
|
|
|
mozilla::ErrorResult& aError) override;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
// nsIContent interface methods
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual already_AddRefed<nsINodeList> GetChildren(uint32_t aFilter) override;
|
|
|
|
virtual const nsTextFragment *GetText() override;
|
|
|
|
virtual uint32_t TextLength() const override;
|
2014-01-04 19:02:17 +04:00
|
|
|
virtual nsresult SetText(const char16_t* aBuffer, uint32_t aLength,
|
2015-03-21 19:28:04 +03:00
|
|
|
bool aNotify) override;
|
2012-06-27 17:01:55 +04:00
|
|
|
// Need to implement this here too to avoid hiding.
|
|
|
|
nsresult SetText(const nsAString& aStr, bool aNotify)
|
|
|
|
{
|
|
|
|
return SetText(aStr.BeginReading(), aStr.Length(), aNotify);
|
|
|
|
}
|
2014-01-04 19:02:17 +04:00
|
|
|
virtual nsresult AppendText(const char16_t* aBuffer, uint32_t aLength,
|
2015-03-21 19:28:04 +03:00
|
|
|
bool aNotify) override;
|
|
|
|
virtual bool TextIsOnlyWhitespace() override;
|
2017-03-17 00:10:22 +03:00
|
|
|
virtual bool ThreadSafeTextIsOnlyWhitespace() const override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool HasTextForTranslation() override;
|
|
|
|
virtual void AppendTextTo(nsAString& aResult) override;
|
2016-04-27 07:16:50 +03:00
|
|
|
MOZ_MUST_USE
|
2015-03-19 10:46:40 +03:00
|
|
|
virtual bool AppendTextTo(nsAString& aResult, const mozilla::fallible_t&) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsIContent *GetBindingParent() const override;
|
|
|
|
virtual nsXBLBinding *GetXBLBinding() const override;
|
2013-07-17 20:05:03 +04:00
|
|
|
virtual void SetXBLBinding(nsXBLBinding* aBinding,
|
2015-03-21 19:28:04 +03:00
|
|
|
nsBindingManager* aOldBindingManager = nullptr) override;
|
|
|
|
virtual ShadowRoot *GetContainingShadow() const override;
|
|
|
|
virtual nsTArray<nsIContent*> &DestInsertionPoints() override;
|
|
|
|
virtual nsTArray<nsIContent*> *GetExistingDestInsertionPoints() const override;
|
|
|
|
virtual void SetShadowRoot(ShadowRoot* aBinding) override;
|
|
|
|
virtual nsIContent *GetXBLInsertionParent() const override;
|
|
|
|
virtual void SetXBLInsertionParent(nsIContent* aContent) override;
|
|
|
|
virtual bool IsLink(nsIURI** aURI) const override;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void DestroyContent() override;
|
|
|
|
virtual void SaveSubtreeState() override;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) override;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
2012-10-16 15:51:00 +04:00
|
|
|
nsIHTMLCollection* Children();
|
2013-07-22 16:15:43 +04:00
|
|
|
uint32_t ChildElementCount()
|
|
|
|
{
|
|
|
|
return Children()->Length();
|
|
|
|
}
|
2012-10-16 15:51:00 +04:00
|
|
|
|
2014-06-06 09:23:40 +04:00
|
|
|
/**
|
|
|
|
* Sets the IsElementInStyleScope flag on each element in the subtree rooted
|
|
|
|
* at this node, including any elements reachable through shadow trees.
|
|
|
|
*
|
|
|
|
* @param aInStyleScope The flag value to set.
|
|
|
|
*/
|
|
|
|
void SetIsElementInStyleScopeFlagOnSubtree(bool aInStyleScope);
|
|
|
|
|
2012-06-27 17:01:55 +04:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* If there are listeners for DOMNodeInserted event, fires the event on all
|
|
|
|
* aNodes
|
|
|
|
*/
|
|
|
|
static void FireNodeInserted(nsIDocument* aDoc,
|
|
|
|
nsINode* aParent,
|
|
|
|
nsTArray<nsCOMPtr<nsIContent> >& aNodes);
|
|
|
|
|
|
|
|
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(FragmentOrElement)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Fire a DOMNodeRemoved mutation event for all children of this node
|
|
|
|
*/
|
|
|
|
void FireNodeRemovedForChildren();
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool OwnedOnlyByTheDOMTree() override
|
2012-06-27 17:01:55 +04:00
|
|
|
{
|
2012-08-22 19:56:38 +04:00
|
|
|
uint32_t rc = mRefCnt.get();
|
2012-06-27 17:01:55 +04:00
|
|
|
if (GetParent()) {
|
|
|
|
--rc;
|
|
|
|
}
|
|
|
|
rc -= mAttrsAndChildren.ChildCount();
|
|
|
|
return rc == 0;
|
|
|
|
}
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual bool IsPurple() override
|
2012-06-27 17:01:55 +04:00
|
|
|
{
|
|
|
|
return mRefCnt.IsPurple();
|
|
|
|
}
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void RemovePurple() override
|
2012-06-27 17:01:55 +04:00
|
|
|
{
|
|
|
|
mRefCnt.RemovePurple();
|
|
|
|
}
|
|
|
|
|
2015-07-02 13:34:00 +03:00
|
|
|
static void ClearContentUnbinder();
|
2012-06-27 17:01:55 +04:00
|
|
|
static bool CanSkip(nsINode* aNode, bool aRemovingAllowed);
|
|
|
|
static bool CanSkipInCC(nsINode* aNode);
|
|
|
|
static bool CanSkipThis(nsINode* aNode);
|
2013-12-06 22:17:19 +04:00
|
|
|
static void RemoveBlackMarkedNode(nsINode* aNode);
|
2012-06-27 17:01:55 +04:00
|
|
|
static void MarkNodeChildren(nsINode* aNode);
|
|
|
|
static void InitCCCallbacks();
|
|
|
|
static void MarkUserData(void* aObject, nsIAtom* aKey, void* aChild,
|
|
|
|
void *aData);
|
|
|
|
|
2015-01-19 14:17:22 +03:00
|
|
|
/**
|
|
|
|
* Is the HTML local name a void element?
|
|
|
|
*/
|
|
|
|
static bool IsHTMLVoid(nsIAtom* aLocalName);
|
2012-06-27 17:01:55 +04:00
|
|
|
protected:
|
2014-06-25 06:09:15 +04:00
|
|
|
virtual ~FragmentOrElement();
|
|
|
|
|
2012-06-27 17:01:55 +04:00
|
|
|
/**
|
|
|
|
* Copy attributes and state to another element
|
|
|
|
* @param aDest the object to copy to
|
|
|
|
*/
|
2017-04-20 22:57:48 +03:00
|
|
|
nsresult CopyInnerTo(FragmentOrElement* aDest, bool aPreallocateChildren);
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
public:
|
|
|
|
// Because of a bug in MS C++ compiler nsDOMSlots must be declared public,
|
|
|
|
// otherwise nsXULElement::nsXULSlots doesn't compile.
|
|
|
|
/**
|
|
|
|
* There are a set of DOM- and scripting-specific instance variables
|
|
|
|
* that may only be instantiated when a content object is accessed
|
|
|
|
* through the DOM. Rather than burn actual slots in the content
|
|
|
|
* objects for each of these instance variables, we put them off
|
|
|
|
* in a side structure that's only allocated when the content is
|
|
|
|
* accessed through the DOM.
|
|
|
|
*/
|
|
|
|
class nsDOMSlots : public nsINode::nsSlots
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsDOMSlots();
|
|
|
|
virtual ~nsDOMSlots();
|
|
|
|
|
|
|
|
void Traverse(nsCycleCollectionTraversalCallback &cb, bool aIsXUL);
|
|
|
|
void Unlink(bool aIsXUL);
|
|
|
|
|
2013-06-23 16:03:39 +04:00
|
|
|
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
2012-09-30 20:43:47 +04:00
|
|
|
|
2012-06-27 17:01:55 +04:00
|
|
|
/**
|
|
|
|
* The .style attribute (an interface that forwards to the actual
|
|
|
|
* style rules)
|
|
|
|
* @see nsGenericHTMLElement::GetStyle
|
|
|
|
*/
|
|
|
|
nsCOMPtr<nsICSSDeclaration> mStyle;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The .dataset attribute.
|
|
|
|
* @see nsGenericHTMLElement::GetDataset
|
|
|
|
*/
|
2012-10-17 05:14:32 +04:00
|
|
|
nsDOMStringMap* mDataset; // [Weak]
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* SMIL Overridde style rules (for SMIL animation of CSS properties)
|
2017-05-20 14:02:43 +03:00
|
|
|
* @see Element::GetSMILOverrideStyle
|
2012-06-27 17:01:55 +04:00
|
|
|
*/
|
|
|
|
nsCOMPtr<nsICSSDeclaration> mSMILOverrideStyle;
|
|
|
|
|
|
|
|
/**
|
2015-11-09 10:57:16 +03:00
|
|
|
* Holds any SMIL override style declaration for this element.
|
2012-06-27 17:01:55 +04:00
|
|
|
*/
|
2016-11-03 06:41:02 +03:00
|
|
|
RefPtr<mozilla::DeclarationBlock> mSMILOverrideStyleDeclaration;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
/**
|
2013-03-10 12:00:33 +04:00
|
|
|
* An object implementing nsIDOMMozNamedAttrMap for this content (attributes)
|
2012-06-27 17:01:55 +04:00
|
|
|
* @see FragmentOrElement::GetAttributes
|
|
|
|
*/
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsDOMAttributeMap> mAttributeMap;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
union {
|
|
|
|
/**
|
|
|
|
* The nearest enclosing content node with a binding that created us.
|
|
|
|
* @see FragmentOrElement::GetBindingParent
|
|
|
|
*/
|
|
|
|
nsIContent* mBindingParent; // [Weak]
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The controllers of the XUL Element.
|
|
|
|
*/
|
|
|
|
nsIControllers* mControllers; // [OWNER]
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* An object implementing the .children property for this element.
|
|
|
|
*/
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsContentList> mChildrenList;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* An object implementing the .classList property for this element.
|
|
|
|
*/
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsDOMTokenList> mClassList;
|
2013-07-17 20:05:03 +04:00
|
|
|
|
2013-12-02 14:26:11 +04:00
|
|
|
/**
|
|
|
|
* ShadowRoot bound to the element.
|
|
|
|
*/
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<ShadowRoot> mShadowRoot;
|
2013-12-02 14:26:11 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The root ShadowRoot of this element if it is in a shadow tree.
|
|
|
|
*/
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<ShadowRoot> mContainingShadow;
|
2013-12-02 14:26:11 +04:00
|
|
|
|
2014-05-22 10:11:53 +04:00
|
|
|
/**
|
|
|
|
* An array of web component insertion points to which this element
|
|
|
|
* is distributed.
|
|
|
|
*/
|
|
|
|
nsTArray<nsIContent*> mDestInsertionPoints;
|
|
|
|
|
2013-07-17 20:05:03 +04:00
|
|
|
/**
|
|
|
|
* XBL binding installed on the element.
|
|
|
|
*/
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<nsXBLBinding> mXBLBinding;
|
2013-07-17 20:05:06 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* XBL binding installed on the lement.
|
|
|
|
*/
|
|
|
|
nsCOMPtr<nsIContent> mXBLInsertionParent;
|
2014-02-24 01:01:26 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Web components custom element data.
|
|
|
|
*/
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<CustomElementData> mCustomElementData;
|
2016-10-28 17:24:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Registered Intersection Observers on the element.
|
|
|
|
*/
|
2017-02-22 21:45:13 +03:00
|
|
|
nsDataHashtable<nsRefPtrHashKey<DOMIntersectionObserver>, int32_t>
|
|
|
|
mRegisteredIntersectionObservers;
|
2012-06-27 17:01:55 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
protected:
|
2013-12-02 14:26:12 +04:00
|
|
|
void GetMarkup(bool aIncludeSelf, nsAString& aMarkup);
|
|
|
|
void SetInnerHTMLInternal(const nsAString& aInnerHTML, ErrorResult& aError);
|
|
|
|
|
2012-06-27 17:01:55 +04:00
|
|
|
// Override from nsINode
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsINode::nsSlots* CreateSlots() override;
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
nsDOMSlots *DOMSlots()
|
|
|
|
{
|
2012-08-11 02:27:28 +04:00
|
|
|
return static_cast<nsDOMSlots*>(Slots());
|
2012-06-27 17:01:55 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
nsDOMSlots *GetExistingDOMSlots() const
|
|
|
|
{
|
|
|
|
return static_cast<nsDOMSlots*>(GetExistingSlots());
|
|
|
|
}
|
|
|
|
|
2014-06-06 09:23:40 +04:00
|
|
|
/**
|
|
|
|
* Calls SetIsElementInStyleScopeFlagOnSubtree for each shadow tree attached
|
|
|
|
* to this node, which is assumed to be an Element.
|
|
|
|
*
|
|
|
|
* @param aInStyleScope The IsElementInStyleScope flag value to set.
|
|
|
|
*/
|
|
|
|
void SetIsElementInStyleScopeFlagOnShadowTree(bool aInStyleScope);
|
|
|
|
|
2012-06-27 17:01:55 +04:00
|
|
|
friend class ::ContentUnbinder;
|
|
|
|
/**
|
|
|
|
* Array containing all attributes and children for this element
|
|
|
|
*/
|
|
|
|
nsAttrAndChildArray mAttrsAndChildren;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#define NS_ELEMENT_INTERFACE_TABLE_TO_MAP_SEGUE \
|
|
|
|
if (NS_SUCCEEDED(rv)) \
|
|
|
|
return rv; \
|
|
|
|
\
|
2013-05-21 23:59:27 +04:00
|
|
|
rv = FragmentOrElement::QueryInterface(aIID, aInstancePtr); \
|
|
|
|
NS_INTERFACE_TABLE_TO_MAP_SEGUE
|
2012-06-27 17:01:55 +04:00
|
|
|
|
|
|
|
#endif /* FragmentOrElement_h___ */
|