Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / css / ComputedStyleCSSValueMapping.h
blobc7b355cbd03f5e814d6eee08bc52874f612314c1
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
3 // found in the LICENSE file.
5 #ifndef ComputedStyleCSSValueMapping_h
6 #define ComputedStyleCSSValueMapping_h
8 #include "core/CSSPropertyNames.h"
9 #include "core/css/CSSValue.h"
10 #include "wtf/Allocator.h"
12 namespace blink {
14 class CSSPrimitiveValue;
15 class LayoutObject;
16 class ComputedStyle;
17 class FilterOperations;
18 class ShadowData;
19 class ShadowList;
20 class StyleColor;
21 class Node;
23 class ComputedStyleCSSValueMapping {
24 STATIC_ONLY(ComputedStyleCSSValueMapping);
25 public:
26 // FIXME: Resolve computed auto alignment in applyProperty/ComputedStyle and remove this non-const styledNode parameter.
27 static PassRefPtrWillBeRawPtr<CSSValue> get(CSSPropertyID, const ComputedStyle&, const LayoutObject* = nullptr, Node* styledNode = nullptr, bool allowVisitedStyle = false);
28 private:
29 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> currentColorOrValidColor(const ComputedStyle&, const StyleColor&);
30 static PassRefPtrWillBeRawPtr<CSSValue> valueForShadowData(const ShadowData&, const ComputedStyle&, bool useSpread);
31 static PassRefPtrWillBeRawPtr<CSSValue> valueForShadowList(const ShadowList*, const ComputedStyle&, bool useSpread);
32 static PassRefPtrWillBeRawPtr<CSSValue> valueForFilter(const ComputedStyle&, const FilterOperations&);
33 static PassRefPtrWillBeRawPtr<CSSValue> valueForFont(const ComputedStyle&);
36 } // namespace blink
38 #endif // ComputedStyleCSSValueMapping_h