2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/* DOM object for element.style */
|
|
|
|
|
2010-08-24 00:06:20 -07:00
|
|
|
#ifndef nsDOMCSSAttributeDeclaration_h
|
|
|
|
#define nsDOMCSSAttributeDeclaration_h
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-09-14 09:10:08 -07:00
|
|
|
#include "mozilla/Attributes.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsDOMCSSDeclaration.h"
|
|
|
|
|
2010-08-27 00:03:36 -07:00
|
|
|
#include "nsAutoPtr.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-03-02 13:00:53 -08:00
|
|
|
namespace mozilla {
|
2010-08-27 00:03:36 -07:00
|
|
|
namespace dom {
|
|
|
|
class Element;
|
|
|
|
}
|
2010-03-02 13:00:53 -08:00
|
|
|
}
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-23 21:08:08 -07:00
|
|
|
class nsDOMCSSAttributeDeclaration MOZ_FINAL : public nsDOMCSSDeclaration
|
2007-03-22 10:30:00 -07:00
|
|
|
{
|
|
|
|
public:
|
2010-08-27 00:03:36 -07:00
|
|
|
typedef mozilla::dom::Element Element;
|
2011-11-05 03:32:52 -07:00
|
|
|
nsDOMCSSAttributeDeclaration(Element* aContent, bool aIsSMILOverride);
|
2007-03-22 10:30:00 -07:00
|
|
|
~nsDOMCSSAttributeDeclaration();
|
|
|
|
|
2009-07-13 04:14:57 -07:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2012-08-05 19:16:30 -07:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsDOMCSSAttributeDeclaration,
|
|
|
|
nsICSSDeclaration)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
// If GetCSSDeclaration returns non-null, then the decl it returns
|
|
|
|
// is owned by our current style rule.
|
2011-09-28 23:19:26 -07:00
|
|
|
virtual mozilla::css::Declaration* GetCSSDeclaration(bool aAllocate);
|
2012-09-14 09:10:08 -07:00
|
|
|
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) MOZ_OVERRIDE;
|
|
|
|
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) MOZ_OVERRIDE;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-09-14 09:10:08 -07:00
|
|
|
virtual nsINode* GetParentObject() MOZ_OVERRIDE;
|
2009-07-13 04:14:57 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
2012-09-14 09:10:08 -07:00
|
|
|
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) MOZ_OVERRIDE;
|
|
|
|
virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE;
|
2010-03-02 12:59:32 -08:00
|
|
|
|
2010-08-27 00:03:36 -07:00
|
|
|
nsRefPtr<Element> mElement;
|
2009-09-02 17:28:37 -07:00
|
|
|
|
|
|
|
/* If true, this indicates that this nsDOMCSSAttributeDeclaration
|
|
|
|
* should interact with mContent's SMIL override style rule (rather
|
|
|
|
* than the inline style rule).
|
|
|
|
*/
|
2011-09-28 23:19:26 -07:00
|
|
|
const bool mIsSMILOverride;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2010-08-24 00:06:20 -07:00
|
|
|
#endif /* nsDOMCSSAttributeDeclaration_h */
|