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
|
|
|
|
|
|
|
#include "nsDOMCSSDeclaration.h"
|
|
|
|
|
2010-08-27 00:03:36 -07:00
|
|
|
#include "nsAutoPtr.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
#include "nsString.h"
|
2009-07-13 04:14:57 -07:00
|
|
|
#include "nsWrapperCache.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-03-02 13:00:53 -08:00
|
|
|
namespace mozilla {
|
|
|
|
namespace css {
|
|
|
|
class Loader;
|
|
|
|
}
|
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
|
|
|
|
2009-07-13 04:14:57 -07:00
|
|
|
class nsDOMCSSAttributeDeclaration : public nsDOMCSSDeclaration,
|
|
|
|
public nsWrapperCache
|
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-02-16 08:45:19 -08:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_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);
|
2011-04-27 13:53:49 -07:00
|
|
|
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv);
|
2007-03-22 10:30:00 -07:00
|
|
|
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent);
|
|
|
|
|
2010-08-27 00:03:36 -07:00
|
|
|
virtual nsINode* GetParentObject();
|
2009-07-13 04:14:57 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
protected:
|
2010-07-23 11:00:47 -07:00
|
|
|
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl);
|
2009-12-11 08:13:19 -08:00
|
|
|
virtual nsIDocument* DocToUpdate();
|
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 */
|