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