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"
22 class nsDOMCSSAttributeDeclaration MOZ_FINAL
: public nsDOMCSSDeclaration
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
,
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
;
42 virtual nsresult
SetCSSDeclaration(mozilla::css::Declaration
* aDecl
) MOZ_OVERRIDE
;
43 virtual nsIDocument
* DocToUpdate() MOZ_OVERRIDE
;
45 nsRefPtr
<Element
> mElement
;
47 /* If true, this indicates that this nsDOMCSSAttributeDeclaration
48 * should interact with mContent's SMIL override style rule (rather
49 * than the inline style rule).
51 const bool mIsSMILOverride
;
54 #endif /* nsDOMCSSAttributeDeclaration_h */