layout/style/nsDOMCSSAttrDeclaration.h

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

     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 /* DOM object for element.style */
     8 #ifndef nsDOMCSSAttributeDeclaration_h
     9 #define nsDOMCSSAttributeDeclaration_h
    11 #include "mozilla/Attributes.h"
    12 #include "nsDOMCSSDeclaration.h"
    14 #include "nsAutoPtr.h"
    16 namespace mozilla {
    17 namespace dom {
    18 class Element;
    19 }
    20 }
    22 class nsDOMCSSAttributeDeclaration MOZ_FINAL : public nsDOMCSSDeclaration
    23 {
    24 public:
    25   typedef mozilla::dom::Element Element;
    26   nsDOMCSSAttributeDeclaration(Element* aContent, bool aIsSMILOverride);
    27   ~nsDOMCSSAttributeDeclaration();
    29   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
    30   NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsDOMCSSAttributeDeclaration,
    31                                                                    nsICSSDeclaration)
    33   // If GetCSSDeclaration returns non-null, then the decl it returns
    34   // is owned by our current style rule.
    35   virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate);
    36   virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE;
    37   NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) MOZ_OVERRIDE;
    39   virtual nsINode* GetParentObject() MOZ_OVERRIDE;
    41   NS_IMETHOD SetPropertyValue(const nsCSSProperty aPropID,
    42                               const nsAString& aValue) MOZ_OVERRIDE;
    44 protected:
    45   virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) MOZ_OVERRIDE;
    46   virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE;
    48   nsRefPtr<Element> mElement;
    50   /* If true, this indicates that this nsDOMCSSAttributeDeclaration
    51    * should interact with mContent's SMIL override style rule (rather
    52    * than the inline style rule).
    53    */
    54   const bool mIsSMILOverride;
    55 };
    57 #endif /* nsDOMCSSAttributeDeclaration_h */

mercurial