content/base/public/nsIAttribute.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/public/nsIAttribute.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,55 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsIAttribute_h___
    1.10 +#define nsIAttribute_h___
    1.11 +
    1.12 +#include "nsINode.h"
    1.13 +
    1.14 +class nsDOMAttributeMap;
    1.15 +class nsIContent;
    1.16 +
    1.17 +#define NS_IATTRIBUTE_IID  \
    1.18 +{ 0x233a9c4d, 0xb27f, 0x4662, \
    1.19 +    { 0xbd, 0x90, 0xba, 0xd6, 0x2e, 0x76, 0xc8, 0xe1 } }
    1.20 +
    1.21 +class nsIAttribute : public nsINode
    1.22 +{
    1.23 +public:
    1.24 +  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IATTRIBUTE_IID)
    1.25 +
    1.26 +  virtual void SetMap(nsDOMAttributeMap *aMap) = 0;
    1.27 +  
    1.28 +  nsDOMAttributeMap *GetMap()
    1.29 +  {
    1.30 +    return mAttrMap;
    1.31 +  }
    1.32 +
    1.33 +  nsINodeInfo *NodeInfo() const
    1.34 +  {
    1.35 +    return mNodeInfo;
    1.36 +  }
    1.37 +
    1.38 +  /**
    1.39 +   * Called when our ownerElement is moved into a new document.
    1.40 +   * Updates the nodeinfo of this node.
    1.41 +   */
    1.42 +  virtual nsresult SetOwnerDocument(nsIDocument* aDocument) = 0;
    1.43 +
    1.44 +protected:
    1.45 +#ifdef MOZILLA_INTERNAL_API
    1.46 +  nsIAttribute(nsDOMAttributeMap *aAttrMap,
    1.47 +               already_AddRefed<nsINodeInfo>& aNodeInfo,
    1.48 +               bool aNsAware);
    1.49 +#endif //MOZILLA_INTERNAL_API
    1.50 +  virtual ~nsIAttribute();
    1.51 +
    1.52 +  nsRefPtr<nsDOMAttributeMap> mAttrMap;
    1.53 +  bool mNsAware;
    1.54 +};
    1.55 +
    1.56 +NS_DEFINE_STATIC_IID_ACCESSOR(nsIAttribute, NS_IATTRIBUTE_IID)
    1.57 +
    1.58 +#endif /* nsIAttribute_h___ */

mercurial