michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* DOM object representing values in DOM computed style */ michael@0: michael@0: #ifndef mozilla_dom_CSSValue_h_ michael@0: #define mozilla_dom_CSSValue_h_ michael@0: michael@0: #include "nsWrapperCache.h" michael@0: michael@0: #include "mozilla/ErrorResult.h" michael@0: #include "nsString.h" michael@0: michael@0: class nsIDOMCSSValue; michael@0: class nsROCSSPrimitiveValue; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: /** michael@0: * CSSValue - a DOM object representing values in DOM computed style. michael@0: */ michael@0: class CSSValue : public nsISupports, michael@0: public nsWrapperCache michael@0: { michael@0: public: michael@0: // CSSValue michael@0: virtual void GetCssText(nsString& aText, mozilla::ErrorResult& aRv) = 0; michael@0: virtual void SetCssText(const nsAString& aText, mozilla::ErrorResult& aRv) = 0; michael@0: virtual uint16_t CssValueType() const = 0; michael@0: michael@0: // Downcasting michael@0: michael@0: /** michael@0: * Return this as a nsROCSSPrimitiveValue* if its a primitive value, and null michael@0: * otherwise. michael@0: */ michael@0: nsROCSSPrimitiveValue *AsPrimitiveValue(); michael@0: }; michael@0: michael@0: } michael@0: } michael@0: michael@0: #endif