OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@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 Lesser General Public | 6 * modify it under the terms of the GNU Lesser 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 class ShadowData; | 42 class ShadowData; |
43 class ShadowList; | 43 class ShadowList; |
44 class StyleColor; | 44 class StyleColor; |
45 class StylePropertySet; | 45 class StylePropertySet; |
46 class StylePropertyShorthand; | 46 class StylePropertyShorthand; |
47 | 47 |
48 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; | 48 enum EUpdateLayout { DoNotUpdateLayout = false, UpdateLayout = true }; |
49 | 49 |
50 class CSSComputedStyleDeclaration FINAL : public CSSStyleDeclaration { | 50 class CSSComputedStyleDeclaration FINAL : public CSSStyleDeclaration { |
51 public: | 51 public: |
52 static PassRefPtr<CSSComputedStyleDeclaration> create(PassRefPtr<Node> node,
bool allowVisitedStyle = false, const String& pseudoElementName = String()) | 52 static PassRefPtrWillBeRawPtr<CSSComputedStyleDeclaration> create(PassRefPtr
<Node> node, bool allowVisitedStyle = false, const String& pseudoElementName = S
tring()) |
53 { | 53 { |
54 return adoptRef(new CSSComputedStyleDeclaration(node, allowVisitedStyle,
pseudoElementName)); | 54 return adoptRefWillBeNoop(new CSSComputedStyleDeclaration(node, allowVis
itedStyle, pseudoElementName)); |
55 } | 55 } |
56 virtual ~CSSComputedStyleDeclaration(); | 56 virtual ~CSSComputedStyleDeclaration(); |
57 | 57 |
| 58 #if !ENABLE(OILPAN) |
58 virtual void ref() OVERRIDE; | 59 virtual void ref() OVERRIDE; |
59 virtual void deref() OVERRIDE; | 60 virtual void deref() OVERRIDE; |
| 61 #endif |
60 | 62 |
61 PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const; | 63 PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID) const; |
62 String getPropertyValue(CSSPropertyID) const; | 64 String getPropertyValue(CSSPropertyID) const; |
63 bool getPropertyPriority(CSSPropertyID) const; | 65 bool getPropertyPriority(CSSPropertyID) const; |
64 | 66 |
65 virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con
st OVERRIDE; | 67 virtual PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyProperties() con
st OVERRIDE; |
66 | 68 |
67 PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateL
ayout) const; | 69 PassRefPtrWillBeRawPtr<CSSValue> getPropertyCSSValue(CSSPropertyID, EUpdateL
ayout) const; |
68 PassRefPtrWillBeRawPtr<CSSValue> getFontSizeCSSValuePreferringKeyword() cons
t; | 70 PassRefPtrWillBeRawPtr<CSSValue> getFontSizeCSSValuePreferringKeyword() cons
t; |
69 bool useFixedFontDefaultSize() const; | 71 bool useFixedFontDefaultSize() const; |
70 PassRefPtrWillBeRawPtr<CSSValue> getSVGPropertyCSSValue(CSSPropertyID, EUpda
teLayout) const; | 72 PassRefPtrWillBeRawPtr<CSSValue> getSVGPropertyCSSValue(CSSPropertyID, EUpda
teLayout) const; |
71 | 73 |
72 PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyPropertiesInSet(const Ve
ctor<CSSPropertyID>&) const; | 74 PassRefPtrWillBeRawPtr<MutableStylePropertySet> copyPropertiesInSet(const Ve
ctor<CSSPropertyID>&) const; |
73 | 75 |
| 76 virtual void trace(Visitor* visitor) { } |
| 77 |
74 private: | 78 private: |
75 CSSComputedStyleDeclaration(PassRefPtr<Node>, bool allowVisitedStyle, const
String&); | 79 CSSComputedStyleDeclaration(PassRefPtr<Node>, bool allowVisitedStyle, const
String&); |
76 | 80 |
77 // The styled node is either the node passed into getComputedStyle, or the | 81 // The styled node is either the node passed into getComputedStyle, or the |
78 // PseudoElement for :before and :after if they exist. | 82 // PseudoElement for :before and :after if they exist. |
79 // FIXME: This should be styledElement since in JS getComputedStyle only wor
ks | 83 // FIXME: This should be styledElement since in JS getComputedStyle only wor
ks |
80 // on Elements, but right now editing creates these for text nodes. We shoul
d fix | 84 // on Elements, but right now editing creates these for text nodes. We shoul
d fix |
81 // that. | 85 // that. |
82 Node* styledNode() const; | 86 Node* styledNode() const; |
83 | 87 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 119 |
116 RefPtr<Node> m_node; | 120 RefPtr<Node> m_node; |
117 PseudoId m_pseudoElementSpecifier; | 121 PseudoId m_pseudoElementSpecifier; |
118 bool m_allowVisitedStyle; | 122 bool m_allowVisitedStyle; |
119 unsigned m_refCount; | 123 unsigned m_refCount; |
120 }; | 124 }; |
121 | 125 |
122 } // namespace WebCore | 126 } // namespace WebCore |
123 | 127 |
124 #endif // CSSComputedStyleDeclaration_h | 128 #endif // CSSComputedStyleDeclaration_h |
OLD | NEW |