summaryrefslogtreecommitdiff
path: root/Source/WebCore/css/CSSFunctionValue.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/css/CSSFunctionValue.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/css/CSSFunctionValue.h')
-rw-r--r--Source/WebCore/css/CSSFunctionValue.h42
1 files changed, 17 insertions, 25 deletions
diff --git a/Source/WebCore/css/CSSFunctionValue.h b/Source/WebCore/css/CSSFunctionValue.h
index 511123b87..ebb3d5bab 100644
--- a/Source/WebCore/css/CSSFunctionValue.h
+++ b/Source/WebCore/css/CSSFunctionValue.h
@@ -23,44 +23,36 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CSSFunctionValue_h
-#define CSSFunctionValue_h
+#pragma once
-#include "CSSValue.h"
+#include "CSSValueKeywords.h"
+#include "CSSValueList.h"
namespace WebCore {
-class CSSValueList;
-struct CSSParserFunction;
-
-class CSSFunctionValue : public CSSValue {
+class CSSFunctionValue final : public CSSValueList {
public:
- static PassRef<CSSFunctionValue> create(CSSParserFunction* function)
- {
- return adoptRef(*new CSSFunctionValue(function));
- }
-
- static PassRef<CSSFunctionValue> create(String name, PassRefPtr<CSSValueList> args)
+ static Ref<CSSFunctionValue> create(CSSValueID name)
{
- return adoptRef(*new CSSFunctionValue(name, args));
+ return adoptRef(*new CSSFunctionValue(name));
}
-
+
String customCSSText() const;
- bool equals(const CSSFunctionValue&) const;
+ CSSValueID name() const { return m_name; }
- CSSValueList* arguments() const { return m_args.get(); }
+ bool equals(const CSSFunctionValue& other) const { return m_name == other.m_name && CSSValueList::equals(other); }
private:
- explicit CSSFunctionValue(CSSParserFunction*);
- CSSFunctionValue(String, PassRefPtr<CSSValueList>);
+ CSSFunctionValue(CSSValueID name)
+ : CSSValueList(FunctionClass, CommaSeparator)
+ , m_name(name)
+ {
+ }
- String m_name;
- RefPtr<CSSValueList> m_args;
+ CSSValueID m_name { CSSValueInvalid };
};
-CSS_VALUE_TYPE_CASTS(CSSFunctionValue, isFunctionValue())
-
-}
-#endif
+} // namespace WebCore
+SPECIALIZE_TYPE_TRAITS_CSS_VALUE(CSSFunctionValue, isFunctionValue())