2017-10-27 20:33:53 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
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/. */
|
2002-07-08 11:11:59 +04:00
|
|
|
|
2006-03-25 08:47:31 +03:00
|
|
|
/* DOM object representing lists of values in DOM computed style */
|
|
|
|
|
2002-07-08 11:11:59 +04:00
|
|
|
#ifndef nsDOMCSSValueList_h___
|
|
|
|
#define nsDOMCSSValueList_h___
|
|
|
|
|
2012-10-01 20:49:41 +04:00
|
|
|
#include "CSSValue.h"
|
2011-10-28 11:35:45 +04:00
|
|
|
#include "nsTArray.h"
|
|
|
|
|
2018-09-27 01:25:20 +03:00
|
|
|
class nsDOMCSSValueList final
|
|
|
|
: public mozilla::dom::CSSValue
|
2002-07-08 11:11:59 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// nsDOMCSSValueList
|
2018-09-27 01:25:20 +03:00
|
|
|
explicit nsDOMCSSValueList(bool aCommaDelimited);
|
2002-07-08 11:11:59 +04:00
|
|
|
|
2005-03-20 16:35:31 +03:00
|
|
|
/**
|
|
|
|
* Adds a value to this list.
|
|
|
|
*/
|
2015-12-24 03:25:43 +03:00
|
|
|
void AppendCSSValue(already_AddRefed<CSSValue> aValue);
|
2012-10-01 20:49:41 +04:00
|
|
|
|
2018-02-09 08:22:43 +03:00
|
|
|
void GetCssText(nsString& aText, mozilla::ErrorResult& aRv) final;
|
2018-09-27 01:25:20 +03:00
|
|
|
uint16_t CssValueType() const final
|
2012-10-01 20:49:41 +04:00
|
|
|
{
|
2018-09-27 01:25:20 +03:00
|
|
|
return CSSValue::CSS_VALUE_LIST;
|
2008-10-22 18:31:14 +04:00
|
|
|
}
|
|
|
|
|
2012-10-01 20:49:41 +04:00
|
|
|
uint32_t Length() const
|
2008-10-22 18:31:14 +04:00
|
|
|
{
|
2012-10-01 20:49:41 +04:00
|
|
|
return mCSSValues.Length();
|
2008-10-22 18:31:14 +04:00
|
|
|
}
|
|
|
|
|
2018-09-27 01:25:20 +03:00
|
|
|
void GetCssText(nsAString& aText);
|
|
|
|
|
2018-05-08 10:20:43 +03:00
|
|
|
protected:
|
|
|
|
virtual ~nsDOMCSSValueList();
|
2014-06-26 20:29:06 +04:00
|
|
|
|
2018-09-27 01:25:20 +03:00
|
|
|
bool mCommaDelimited; // some value lists use a comma as the delimiter, some
|
|
|
|
// just use spaces.
|
2002-07-08 11:11:59 +04:00
|
|
|
|
2018-09-27 01:25:20 +03:00
|
|
|
nsTArray<RefPtr<CSSValue>> mCSSValues;
|
2002-07-08 11:11:59 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsDOMCSSValueList_h___ */
|