michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* DOM object for element.style */ michael@0: michael@0: #ifndef nsDOMCSSAttributeDeclaration_h michael@0: #define nsDOMCSSAttributeDeclaration_h michael@0: michael@0: #include "mozilla/Attributes.h" michael@0: #include "nsDOMCSSDeclaration.h" michael@0: michael@0: #include "nsAutoPtr.h" michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: class Element; michael@0: } michael@0: } michael@0: michael@0: class nsDOMCSSAttributeDeclaration MOZ_FINAL : public nsDOMCSSDeclaration michael@0: { michael@0: public: michael@0: typedef mozilla::dom::Element Element; michael@0: nsDOMCSSAttributeDeclaration(Element* aContent, bool aIsSMILOverride); michael@0: ~nsDOMCSSAttributeDeclaration(); michael@0: michael@0: NS_DECL_CYCLE_COLLECTING_ISUPPORTS michael@0: NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsDOMCSSAttributeDeclaration, michael@0: nsICSSDeclaration) michael@0: michael@0: // If GetCSSDeclaration returns non-null, then the decl it returns michael@0: // is owned by our current style rule. michael@0: virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate); michael@0: virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE; michael@0: NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) MOZ_OVERRIDE; michael@0: michael@0: virtual nsINode* GetParentObject() MOZ_OVERRIDE; michael@0: michael@0: NS_IMETHOD SetPropertyValue(const nsCSSProperty aPropID, michael@0: const nsAString& aValue) MOZ_OVERRIDE; michael@0: michael@0: protected: michael@0: virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) MOZ_OVERRIDE; michael@0: virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE; michael@0: michael@0: nsRefPtr mElement; michael@0: michael@0: /* If true, this indicates that this nsDOMCSSAttributeDeclaration michael@0: * should interact with mContent's SMIL override style rule (rather michael@0: * than the inline style rule). michael@0: */ michael@0: const bool mIsSMILOverride; michael@0: }; michael@0: michael@0: #endif /* nsDOMCSSAttributeDeclaration_h */