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"
14 class CSSPrimitiveValue
;
17 class FilterOperations
;
23 class ComputedStyleCSSValueMapping
{
24 STATIC_ONLY(ComputedStyleCSSValueMapping
);
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);
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
&);
38 #endif // ComputedStyleCSSValueMapping_h