OLD | NEW |
---|---|
1 /* | 1 /* |
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) | 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2012 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 17 matching lines...) Expand all Loading... | |
28 | 28 |
29 namespace WebCore { | 29 namespace WebCore { |
30 | 30 |
31 class CSSProperty; | 31 class CSSProperty; |
32 class CSSRule; | 32 class CSSRule; |
33 class CSSStyleSheet; | 33 class CSSStyleSheet; |
34 class CSSValue; | 34 class CSSValue; |
35 class ExceptionState; | 35 class ExceptionState; |
36 class MutableStylePropertySet; | 36 class MutableStylePropertySet; |
37 | 37 |
38 class CSSStyleDeclaration : public ScriptWrappable { | 38 class CSSStyleDeclaration : public NoBaseWillBeGarbageCollectedFinalized<CSSStyl eDeclaration>, public ScriptWrappable { |
39 WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration); WTF_MAKE_FAST_ALLOCATED; | 39 WTF_MAKE_NONCOPYABLE(CSSStyleDeclaration); WTF_MAKE_FAST_ALLOCATED_WILL_BE_R EMOVED; |
40 public: | 40 public: |
41 virtual ~CSSStyleDeclaration() { } | 41 virtual ~CSSStyleDeclaration() { } |
42 | 42 |
43 #if !ENABLE(OILPAN) | |
43 virtual void ref() = 0; | 44 virtual void ref() = 0; |
44 virtual void deref() = 0; | 45 virtual void deref() = 0; |
46 #endif | |
45 | 47 |
46 virtual CSSRule* parentRule() const = 0; | 48 virtual CSSRule* parentRule() const = 0; |
47 virtual String cssText() const = 0; | 49 virtual String cssText() const = 0; |
48 virtual void setCSSText(const String&, ExceptionState&) = 0; | 50 virtual void setCSSText(const String&, ExceptionState&) = 0; |
49 virtual unsigned length() const = 0; | 51 virtual unsigned length() const = 0; |
50 virtual String item(unsigned index) const = 0; | 52 virtual String item(unsigned index) const = 0; |
51 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(const String& p ropertyName) = 0; | 53 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(const String& p ropertyName) = 0; |
52 virtual String getPropertyValue(const String& propertyName) = 0; | 54 virtual String getPropertyValue(const String& propertyName) = 0; |
53 virtual String getPropertyPriority(const String& propertyName) = 0; | 55 virtual String getPropertyPriority(const String& propertyName) = 0; |
54 virtual String getPropertyShorthand(const String& propertyName) = 0; | 56 virtual String getPropertyShorthand(const String& propertyName) = 0; |
55 virtual bool isPropertyImplicit(const String& propertyName) = 0; | 57 virtual bool isPropertyImplicit(const String& propertyName) = 0; |
56 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) = 0; | 58 virtual void setProperty(const String& propertyName, const String& value, co nst String& priority, ExceptionState&) = 0; |
57 virtual String removeProperty(const String& propertyName, ExceptionState&) = 0; | 59 virtual String removeProperty(const String& propertyName, ExceptionState&) = 0; |
58 | 60 |
59 // CSSPropertyID versions of the CSSOM functions to support bindings and edi ting. | 61 // CSSPropertyID versions of the CSSOM functions to support bindings and edi ting. |
60 // Use the non-virtual methods in the concrete subclasses when possible. | 62 // Use the non-virtual methods in the concrete subclasses when possible. |
61 // The CSSValue returned by this function should not be exposed to the web a s it may be used by multiple documents at the same time. | 63 // The CSSValue returned by this function should not be exposed to the web a s it may be used by multiple documents at the same time. |
62 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp ertyID) = 0; | 64 virtual PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValueInternal(CSSProp ertyID) = 0; |
63 virtual String getPropertyValueInternal(CSSPropertyID) = 0; | 65 virtual String getPropertyValueInternal(CSSPropertyID) = 0; |
64 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) = 0; | 66 virtual void setPropertyInternal(CSSPropertyID, const String& value, bool im portant, ExceptionState&) = 0; |
65 | 67 |
66 virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con st = 0; | 68 virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con st = 0; |
67 | 69 |
68 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const = 0; | 70 virtual bool cssPropertyMatches(CSSPropertyID, const CSSValue*) const = 0; |
69 virtual CSSStyleSheet* parentStyleSheet() const { return 0; } | 71 virtual CSSStyleSheet* parentStyleSheet() const { return 0; } |
70 | 72 |
73 virtual void trace(Visitor*) { } | |
haraken
2014/03/20 11:22:38
Probably this could be a pure virtual function, si
wibling-chromium
2014/03/20 11:59:33
Done.
| |
74 | |
71 protected: | 75 protected: |
72 CSSStyleDeclaration() | 76 CSSStyleDeclaration() |
73 { | 77 { |
74 ScriptWrappable::init(this); | 78 ScriptWrappable::init(this); |
75 } | 79 } |
76 }; | 80 }; |
77 | 81 |
78 } // namespace WebCore | 82 } // namespace WebCore |
79 | 83 |
80 #endif // CSSStyleDeclaration_h | 84 #endif // CSSStyleDeclaration_h |
OLD | NEW |