• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
~CSSValue()45     virtual ~CSSValue() { }
46 
47     // FIXME: Change this to return UnitTypes.
cssValueType()48     virtual unsigned short cssValueType() const { return CSS_CUSTOM; }
49 
50     virtual String cssText() const = 0;
setCssText(const String &,ExceptionCode &)51     void setCssText(const String&, ExceptionCode&) { } // FIXME: Not implemented.
52 
isBorderImageValue()53     virtual bool isBorderImageValue() const { return false; }
isCursorImageValue()54     virtual bool isCursorImageValue() const { return false; }
isFontFamilyValue()55     virtual bool isFontFamilyValue() const { return false; }
isFontValue()56     virtual bool isFontValue() const { return false; }
isImageGeneratorValue()57     virtual bool isImageGeneratorValue() const { return false; }
isImageValue()58     virtual bool isImageValue() const { return false; }
isImplicitInitialValue()59     virtual bool isImplicitInitialValue() const { return false; }
isPrimitiveValue()60     virtual bool isPrimitiveValue() const { return false; }
isReflectValue()61     virtual bool isReflectValue() const { return false; }
isShadowValue()62     virtual bool isShadowValue() const { return false; }
isTimingFunctionValue()63     virtual bool isTimingFunctionValue() const { return false; }
isValueList()64     virtual bool isValueList() const { return false; }
isWebKitCSSTransformValue()65     virtual bool isWebKitCSSTransformValue() const { return false; }
isCSSLineBoxContainValue()66     virtual bool isCSSLineBoxContainValue() const { return false; }
67 
68 #if ENABLE(SVG)
isSVGColor()69     virtual bool isSVGColor() const { return false; }
isSVGPaint()70     virtual bool isSVGPaint() const { return false; }
71 #endif
72 
addSubresourceStyleURLs(ListHashSet<KURL> &,const CSSStyleSheet *)73     virtual void addSubresourceStyleURLs(ListHashSet<KURL>&, const CSSStyleSheet*) { }
74 };
75 
76 } // namespace WebCore
77 
78 #endif // CSSValue_h
79