Thu, 15 Jan 2015 21:03:48 +0100
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.)
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | /* DOM object for element.style */ |
michael@0 | 7 | |
michael@0 | 8 | #ifndef nsDOMCSSAttributeDeclaration_h |
michael@0 | 9 | #define nsDOMCSSAttributeDeclaration_h |
michael@0 | 10 | |
michael@0 | 11 | #include "mozilla/Attributes.h" |
michael@0 | 12 | #include "nsDOMCSSDeclaration.h" |
michael@0 | 13 | |
michael@0 | 14 | #include "nsAutoPtr.h" |
michael@0 | 15 | |
michael@0 | 16 | namespace mozilla { |
michael@0 | 17 | namespace dom { |
michael@0 | 18 | class Element; |
michael@0 | 19 | } |
michael@0 | 20 | } |
michael@0 | 21 | |
michael@0 | 22 | class nsDOMCSSAttributeDeclaration MOZ_FINAL : public nsDOMCSSDeclaration |
michael@0 | 23 | { |
michael@0 | 24 | public: |
michael@0 | 25 | typedef mozilla::dom::Element Element; |
michael@0 | 26 | nsDOMCSSAttributeDeclaration(Element* aContent, bool aIsSMILOverride); |
michael@0 | 27 | ~nsDOMCSSAttributeDeclaration(); |
michael@0 | 28 | |
michael@0 | 29 | NS_DECL_CYCLE_COLLECTING_ISUPPORTS |
michael@0 | 30 | NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsDOMCSSAttributeDeclaration, |
michael@0 | 31 | nsICSSDeclaration) |
michael@0 | 32 | |
michael@0 | 33 | // If GetCSSDeclaration returns non-null, then the decl it returns |
michael@0 | 34 | // is owned by our current style rule. |
michael@0 | 35 | virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate); |
michael@0 | 36 | virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE; |
michael@0 | 37 | NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) MOZ_OVERRIDE; |
michael@0 | 38 | |
michael@0 | 39 | virtual nsINode* GetParentObject() MOZ_OVERRIDE; |
michael@0 | 40 | |
michael@0 | 41 | NS_IMETHOD SetPropertyValue(const nsCSSProperty aPropID, |
michael@0 | 42 | const nsAString& aValue) MOZ_OVERRIDE; |
michael@0 | 43 | |
michael@0 | 44 | protected: |
michael@0 | 45 | virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) MOZ_OVERRIDE; |
michael@0 | 46 | virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE; |
michael@0 | 47 | |
michael@0 | 48 | nsRefPtr<Element> mElement; |
michael@0 | 49 | |
michael@0 | 50 | /* If true, this indicates that this nsDOMCSSAttributeDeclaration |
michael@0 | 51 | * should interact with mContent's SMIL override style rule (rather |
michael@0 | 52 | * than the inline style rule). |
michael@0 | 53 | */ |
michael@0 | 54 | const bool mIsSMILOverride; |
michael@0 | 55 | }; |
michael@0 | 56 | |
michael@0 | 57 | #endif /* nsDOMCSSAttributeDeclaration_h */ |