OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ComputedStyleCSSValueMapping_h | 5 #ifndef ComputedStyleCSSValueMapping_h |
6 #define ComputedStyleCSSValueMapping_h | 6 #define ComputedStyleCSSValueMapping_h |
7 | 7 |
8 #include "core/CSSPropertyNames.h" | 8 #include "core/CSSPropertyNames.h" |
9 #include "core/css/CSSValue.h" | 9 #include "core/css/CSSValue.h" |
10 #include "wtf/Allocator.h" | 10 #include "wtf/Allocator.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class LayoutObject; | 14 class LayoutObject; |
15 class ComputedStyle; | 15 class ComputedStyle; |
16 class FilterOperations; | 16 class FilterOperations; |
17 class ShadowData; | 17 class ShadowData; |
18 class ShadowList; | 18 class ShadowList; |
19 class StyleColor; | 19 class StyleColor; |
20 class Node; | 20 class Node; |
| 21 class CSSVariableData; |
21 | 22 |
22 class ComputedStyleCSSValueMapping { | 23 class ComputedStyleCSSValueMapping { |
23 STATIC_ONLY(ComputedStyleCSSValueMapping); | 24 STATIC_ONLY(ComputedStyleCSSValueMapping); |
24 public: | 25 public: |
25 // FIXME: Resolve computed auto alignment in applyProperty/ComputedStyle and
remove this non-const styledNode parameter. | 26 // FIXME: Resolve computed auto alignment in applyProperty/ComputedStyle and
remove this non-const styledNode parameter. |
26 static PassRefPtrWillBeRawPtr<CSSValue> get(CSSPropertyID, const ComputedSty
le&, const LayoutObject* = nullptr, Node* styledNode = nullptr, bool allowVisite
dStyle = false); | 27 static PassRefPtrWillBeRawPtr<CSSValue> get(CSSPropertyID, const ComputedSty
le&, const LayoutObject* = nullptr, Node* styledNode = nullptr, bool allowVisite
dStyle = false); |
27 static PassRefPtrWillBeRawPtr<CSSValue> get(const AtomicString customPropert
yName, const ComputedStyle&); | 28 static PassRefPtrWillBeRawPtr<CSSValue> get(const AtomicString customPropert
yName, const ComputedStyle&); |
| 29 static const HashMap<AtomicString, RefPtr<CSSVariableData>>* getVariables(co
nst ComputedStyle&); |
28 private: | 30 private: |
29 static PassRefPtrWillBeRawPtr<CSSValue> currentColorOrValidColor(const Compu
tedStyle&, const StyleColor&); | 31 static PassRefPtrWillBeRawPtr<CSSValue> currentColorOrValidColor(const Compu
tedStyle&, const StyleColor&); |
30 static PassRefPtrWillBeRawPtr<CSSValue> valueForShadowData(const ShadowData&
, const ComputedStyle&, bool useSpread); | 32 static PassRefPtrWillBeRawPtr<CSSValue> valueForShadowData(const ShadowData&
, const ComputedStyle&, bool useSpread); |
31 static PassRefPtrWillBeRawPtr<CSSValue> valueForShadowList(const ShadowList*
, const ComputedStyle&, bool useSpread); | 33 static PassRefPtrWillBeRawPtr<CSSValue> valueForShadowList(const ShadowList*
, const ComputedStyle&, bool useSpread); |
32 static PassRefPtrWillBeRawPtr<CSSValue> valueForFilter(const ComputedStyle&,
const FilterOperations&); | 34 static PassRefPtrWillBeRawPtr<CSSValue> valueForFilter(const ComputedStyle&,
const FilterOperations&); |
33 static PassRefPtrWillBeRawPtr<CSSValue> valueForFont(const ComputedStyle&); | 35 static PassRefPtrWillBeRawPtr<CSSValue> valueForFont(const ComputedStyle&); |
34 }; | 36 }; |
35 | 37 |
36 } // namespace blink | 38 } // namespace blink |
37 | 39 |
38 #endif // ComputedStyleCSSValueMapping_h | 40 #endif // ComputedStyleCSSValueMapping_h |
OLD | NEW |