2001-11-07 10:06:31 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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/. */
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2006-03-25 08:47:31 +03:00
|
|
|
/* DOM object for element.style */
|
|
|
|
|
2010-08-24 11:06:20 +04:00
|
|
|
#ifndef nsDOMCSSAttributeDeclaration_h
|
|
|
|
#define nsDOMCSSAttributeDeclaration_h
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2012-09-14 20:10:08 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-11-07 10:06:31 +03:00
|
|
|
#include "nsDOMCSSDeclaration.h"
|
|
|
|
|
2010-08-27 11:03:36 +04:00
|
|
|
#include "nsAutoPtr.h"
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2010-03-03 00:00:53 +03:00
|
|
|
namespace mozilla {
|
2010-08-27 11:03:36 +04:00
|
|
|
namespace dom {
|
|
|
|
class Element;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsDOMCSSAttributeDeclaration final : public nsDOMCSSDeclaration
|
2001-11-07 10:06:31 +03:00
|
|
|
{
|
|
|
|
public:
|
2010-08-27 11:03:36 +04:00
|
|
|
typedef mozilla::dom::Element Element;
|
2011-11-05 14:32:52 +04:00
|
|
|
nsDOMCSSAttributeDeclaration(Element* aContent, bool aIsSMILOverride);
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2009-07-13 15:14:57 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2012-08-06 06:16:30 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsDOMCSSAttributeDeclaration,
|
|
|
|
nsICSSDeclaration)
|
2003-09-24 07:34:27 +04:00
|
|
|
|
2003-03-17 06:46:17 +03:00
|
|
|
// If GetCSSDeclaration returns non-null, then the decl it returns
|
|
|
|
// is owned by our current style rule.
|
2015-04-10 03:41:35 +03:00
|
|
|
virtual mozilla::css::Declaration* GetCSSDeclaration(Operation aOperation) override;
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv) override;
|
|
|
|
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsINode* GetParentObject() override;
|
2009-07-13 15:14:57 +04:00
|
|
|
|
2013-09-04 15:47:23 +04:00
|
|
|
NS_IMETHOD SetPropertyValue(const nsCSSProperty aPropID,
|
2015-03-21 19:28:04 +03:00
|
|
|
const nsAString& aValue) override;
|
2013-09-04 15:47:23 +04:00
|
|
|
|
2001-11-07 10:06:31 +03:00
|
|
|
protected:
|
2014-06-24 02:40:01 +04:00
|
|
|
~nsDOMCSSAttributeDeclaration();
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) override;
|
|
|
|
virtual nsIDocument* DocToUpdate() override;
|
2010-03-02 23:59:32 +03:00
|
|
|
|
2010-08-27 11:03:36 +04:00
|
|
|
nsRefPtr<Element> mElement;
|
2009-09-03 04:28:37 +04: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-29 10:19:26 +04:00
|
|
|
const bool mIsSMILOverride;
|
2001-11-07 10:06:31 +03:00
|
|
|
};
|
|
|
|
|
2010-08-24 11:06:20 +04:00
|
|
|
#endif /* nsDOMCSSAttributeDeclaration_h */
|