CSSValue.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. /* DOM object representing values in DOM computed style */
  6. #ifndef mozilla_dom_CSSValue_h_
  7. #define mozilla_dom_CSSValue_h_
  8. #include "nsWrapperCache.h"
  9. #include "nsStringFwd.h"
  10. class nsROCSSPrimitiveValue;
  11. namespace mozilla {
  12. class ErrorResult;
  13. } // namespace mozilla
  14. namespace mozilla {
  15. namespace dom {
  16. /**
  17. * CSSValue - a DOM object representing values in DOM computed style.
  18. */
  19. class CSSValue : public nsISupports,
  20. public nsWrapperCache
  21. {
  22. public:
  23. // CSSValue
  24. virtual void GetCssText(nsString& aText, mozilla::ErrorResult& aRv) = 0;
  25. virtual void SetCssText(const nsAString& aText, mozilla::ErrorResult& aRv) = 0;
  26. virtual uint16_t CssValueType() const = 0;
  27. // Downcasting
  28. /**
  29. * Return this as a nsROCSSPrimitiveValue* if its a primitive value, and null
  30. * otherwise.
  31. */
  32. nsROCSSPrimitiveValue *AsPrimitiveValue();
  33. };
  34. } // namespace dom
  35. } // namespace mozilla
  36. #endif