initial import
[vuplus_webkit] / Source / WebCore / css / CSSValue.h
1 /*
2  * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3  * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB.  If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20
21 #ifndef CSSValue_h
22 #define CSSValue_h
23
24 #include "KURLHash.h"
25 #include <wtf/ListHashSet.h>
26 #include <wtf/RefPtr.h>
27
28 namespace WebCore {
29
30 class CSSStyleSheet;
31
32 typedef int ExceptionCode;
33
34 class CSSValue : public RefCounted<CSSValue> {
35 public:
36     // FIXME: Change name to Type.
37     enum UnitTypes {
38         CSS_INHERIT = 0,
39         CSS_PRIMITIVE_VALUE = 1,
40         CSS_VALUE_LIST = 2,
41         CSS_CUSTOM = 3,
42         CSS_INITIAL = 4
43     };
44
45     virtual ~CSSValue() { }
46
47     // FIXME: Change this to return UnitTypes.
48     virtual unsigned short cssValueType() const { return CSS_CUSTOM; }
49
50     virtual String cssText() const = 0;
51     void setCssText(const String&, ExceptionCode&) { } // FIXME: Not implemented.
52
53     virtual bool isMutableValue() const { return false; }
54
55     virtual bool isBorderImageValue() const { return false; }
56     virtual bool isBorderImageSliceValue() const { return false; }
57     virtual bool isCursorImageValue() const { return false; }
58 #if ENABLE(CSS3_FLEXBOX)
59     virtual bool isFlexValue() const { return false; }
60 #endif
61     virtual bool isFontFamilyValue() const { return false; }
62     virtual bool isFontFeatureValue() const { return false; }
63     virtual bool isFontValue() const { return false; }
64     virtual bool isImageGeneratorValue() const { return false; }
65     virtual bool isImageValue() const { return false; }
66     virtual bool isImplicitInitialValue() const { return false; }
67     virtual bool isPrimitiveValue() const { return false; }
68     virtual bool isReflectValue() const { return false; }
69     virtual bool isShadowValue() const { return false; }
70     virtual bool isTimingFunctionValue() const { return false; }
71     virtual bool isValueList() const { return false; }
72     virtual bool isWebKitCSSTransformValue() const { return false; }
73     virtual bool isCSSLineBoxContainValue() const { return false; }
74     
75 #if ENABLE(SVG)
76     virtual bool isSVGColor() const { return false; }
77     virtual bool isSVGPaint() const { return false; }
78 #endif
79
80     virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*) { }
81 };
82
83 } // namespace WebCore
84
85 #endif // CSSValue_h