content/base/public/nsIAttribute.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 #ifndef nsIAttribute_h___
     7 #define nsIAttribute_h___
     9 #include "nsINode.h"
    11 class nsDOMAttributeMap;
    12 class nsIContent;
    14 #define NS_IATTRIBUTE_IID  \
    15 { 0x233a9c4d, 0xb27f, 0x4662, \
    16     { 0xbd, 0x90, 0xba, 0xd6, 0x2e, 0x76, 0xc8, 0xe1 } }
    18 class nsIAttribute : public nsINode
    19 {
    20 public:
    21   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IATTRIBUTE_IID)
    23   virtual void SetMap(nsDOMAttributeMap *aMap) = 0;
    25   nsDOMAttributeMap *GetMap()
    26   {
    27     return mAttrMap;
    28   }
    30   nsINodeInfo *NodeInfo() const
    31   {
    32     return mNodeInfo;
    33   }
    35   /**
    36    * Called when our ownerElement is moved into a new document.
    37    * Updates the nodeinfo of this node.
    38    */
    39   virtual nsresult SetOwnerDocument(nsIDocument* aDocument) = 0;
    41 protected:
    42 #ifdef MOZILLA_INTERNAL_API
    43   nsIAttribute(nsDOMAttributeMap *aAttrMap,
    44                already_AddRefed<nsINodeInfo>& aNodeInfo,
    45                bool aNsAware);
    46 #endif //MOZILLA_INTERNAL_API
    47   virtual ~nsIAttribute();
    49   nsRefPtr<nsDOMAttributeMap> mAttrMap;
    50   bool mNsAware;
    51 };
    53 NS_DEFINE_STATIC_IID_ACCESSOR(nsIAttribute, NS_IATTRIBUTE_IID)
    55 #endif /* nsIAttribute_h___ */

mercurial