2001-11-07 10:06:31 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* ***** BEGIN LICENSE BLOCK *****
|
2004-04-18 01:52:36 +04:00
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
2001-11-07 10:06:31 +03:00
|
|
|
*
|
2004-04-18 01:52:36 +04:00
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
2001-11-07 10:06:31 +03:00
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is Mozilla Communicator client code.
|
|
|
|
*
|
2004-04-18 01:52:36 +04:00
|
|
|
* The Initial Developer of the Original Code is
|
2001-11-07 10:06:31 +03:00
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1998
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
2010-08-27 11:03:36 +04:00
|
|
|
* Ms2ger <ms2ger@gmail.com>
|
2001-11-07 10:06:31 +03:00
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
2004-04-18 01:52:36 +04:00
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
2001-11-07 10:06:31 +03:00
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
2004-04-18 01:52:36 +04:00
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
2001-11-07 10:06:31 +03:00
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
2004-04-18 01:52:36 +04:00
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
2001-11-07 10:06:31 +03:00
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
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
|
|
|
|
|
|
|
#include "nsDOMCSSDeclaration.h"
|
|
|
|
|
2010-08-27 11:03:36 +04:00
|
|
|
#include "nsAutoPtr.h"
|
2001-11-07 10:06:31 +03:00
|
|
|
#include "nsString.h"
|
2009-07-13 15:14:57 +04:00
|
|
|
#include "nsWrapperCache.h"
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2010-03-03 00:00:53 +03:00
|
|
|
namespace mozilla {
|
|
|
|
namespace css {
|
|
|
|
class Loader;
|
|
|
|
}
|
2010-08-27 11:03:36 +04:00
|
|
|
|
|
|
|
namespace dom {
|
|
|
|
class Element;
|
|
|
|
}
|
2010-03-03 00:00:53 +03:00
|
|
|
}
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2009-07-13 15:14:57 +04:00
|
|
|
class nsDOMCSSAttributeDeclaration : public nsDOMCSSDeclaration,
|
|
|
|
public nsWrapperCache
|
2001-11-07 10:06:31 +03:00
|
|
|
{
|
|
|
|
public:
|
2010-08-27 11:03:36 +04:00
|
|
|
typedef mozilla::dom::Element Element;
|
|
|
|
nsDOMCSSAttributeDeclaration(Element* aContent
|
2009-09-03 04:28:37 +04:00
|
|
|
#ifdef MOZ_SMIL
|
|
|
|
, PRBool aIsSMILOverride
|
|
|
|
#endif // MOZ_SMIL
|
|
|
|
);
|
2001-11-07 10:06:31 +03:00
|
|
|
~nsDOMCSSAttributeDeclaration();
|
|
|
|
|
2009-07-13 15:14:57 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
2010-07-15 00:58:56 +04:00
|
|
|
NS_DECL_CYCLE_COLLECTION_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.
|
2010-07-23 22:00:34 +04:00
|
|
|
virtual mozilla::css::Declaration* GetCSSDeclaration(PRBool aAllocate);
|
2011-04-28 00:53:49 +04:00
|
|
|
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv);
|
2003-06-24 10:20:18 +04:00
|
|
|
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent);
|
2001-11-07 10:06:31 +03:00
|
|
|
|
2010-08-27 11:03:36 +04:00
|
|
|
virtual nsINode* GetParentObject();
|
2009-07-13 15:14:57 +04:00
|
|
|
|
2001-11-07 10:06:31 +03:00
|
|
|
protected:
|
2010-07-23 22:00:47 +04:00
|
|
|
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl);
|
2009-12-11 19:13:19 +03:00
|
|
|
virtual nsIDocument* DocToUpdate();
|
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
|
|
|
|
|
|
|
#ifdef MOZ_SMIL
|
|
|
|
/* If true, this indicates that this nsDOMCSSAttributeDeclaration
|
|
|
|
* should interact with mContent's SMIL override style rule (rather
|
|
|
|
* than the inline style rule).
|
|
|
|
*/
|
|
|
|
const PRBool mIsSMILOverride;
|
|
|
|
#endif // MOZ_SMIL
|
2001-11-07 10:06:31 +03:00
|
|
|
};
|
|
|
|
|
2010-08-24 11:06:20 +04:00
|
|
|
#endif /* nsDOMCSSAttributeDeclaration_h */
|