Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.h

Issue 1545713003: Add StylePath and use it to store 'd' in ComputedStyle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2015->2016; Remove unnecessary explicit. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * * Redistributions of source code must retain the above copyright 4 * * Redistributions of source code must retain the above copyright
5 * notice, this list of conditions and the following disclaimer. 5 * notice, this list of conditions and the following disclaimer.
6 * * Redistributions in binary form must reproduce the above 6 * * Redistributions in binary form must reproduce the above
7 * copyright notice, this list of conditions and the following disclaimer 7 * copyright notice, this list of conditions and the following disclaimer
8 * in the documentation and/or other materials provided with the 8 * in the documentation and/or other materials provided with the
9 * distribution. 9 * distribution.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 28 matching lines...) Expand all
39 #include "platform/LengthSize.h" 39 #include "platform/LengthSize.h"
40 #include "platform/fonts/FontDescription.h" 40 #include "platform/fonts/FontDescription.h"
41 #include "platform/text/TabSize.h" 41 #include "platform/text/TabSize.h"
42 #include "wtf/Allocator.h" 42 #include "wtf/Allocator.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 class RotateTransformOperation; 46 class RotateTransformOperation;
47 class TranslateTransformOperation; 47 class TranslateTransformOperation;
48 class ScaleTransformOperation; 48 class ScaleTransformOperation;
49 class StylePath;
49 50
50 // Note that we assume the parser only allows valid CSSValue types. 51 // Note that we assume the parser only allows valid CSSValue types.
51 class StyleBuilderConverter { 52 class StyleBuilderConverter {
52 STATIC_ONLY(StyleBuilderConverter); 53 STATIC_ONLY(StyleBuilderConverter);
53 public: 54 public:
54 static PassRefPtr<StyleReflection> convertBoxReflect(StyleResolverState&, co nst CSSValue&); 55 static PassRefPtr<StyleReflection> convertBoxReflect(StyleResolverState&, co nst CSSValue&);
55 static AtomicString convertFragmentIdentifier(StyleResolverState&, const CSS Value&); 56 static AtomicString convertFragmentIdentifier(StyleResolverState&, const CSS Value&);
56 static Color convertColor(StyleResolverState&, const CSSValue&, bool forVisi tedLink = false); 57 static Color convertColor(StyleResolverState&, const CSSValue&, bool forVisi tedLink = false);
57 template <typename T> static T convertComputedLength(StyleResolverState&, co nst CSSValue&); 58 template <typename T> static T convertComputedLength(StyleResolverState&, co nst CSSValue&);
58 static LengthBox convertClip(StyleResolverState&, const CSSValue&); 59 static LengthBox convertClip(StyleResolverState&, const CSSValue&);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap& , NamedGridLinesMap&, GridTrackSizingDirection); 98 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap& , NamedGridLinesMap&, GridTrackSizingDirection);
98 static void convertOrderedNamedGridLinesMapToNamedGridLinesMap(const Ordered NamedGridLines&, NamedGridLinesMap&); 99 static void convertOrderedNamedGridLinesMapToNamedGridLinesMap(const Ordered NamedGridLines&, NamedGridLinesMap&);
99 100
100 static ScrollSnapPoints convertSnapPoints(StyleResolverState&, const CSSValu e&); 101 static ScrollSnapPoints convertSnapPoints(StyleResolverState&, const CSSValu e&);
101 static Vector<LengthPoint> convertSnapCoordinates(StyleResolverState&, const CSSValue&); 102 static Vector<LengthPoint> convertSnapCoordinates(StyleResolverState&, const CSSValue&);
102 static LengthPoint convertSnapDestination(StyleResolverState&, const CSSValu e&); 103 static LengthPoint convertSnapDestination(StyleResolverState&, const CSSValu e&);
103 static PassRefPtr<TranslateTransformOperation> convertTranslate(StyleResolve rState&, const CSSValue&); 104 static PassRefPtr<TranslateTransformOperation> convertTranslate(StyleResolve rState&, const CSSValue&);
104 static PassRefPtr<RotateTransformOperation> convertRotate(StyleResolverState &, const CSSValue&); 105 static PassRefPtr<RotateTransformOperation> convertRotate(StyleResolverState &, const CSSValue&);
105 static PassRefPtr<ScaleTransformOperation> convertScale(StyleResolverState&, const CSSValue&); 106 static PassRefPtr<ScaleTransformOperation> convertScale(StyleResolverState&, const CSSValue&);
106 static RespectImageOrientationEnum convertImageOrientation(StyleResolverStat e&, const CSSValue&); 107 static RespectImageOrientationEnum convertImageOrientation(StyleResolverStat e&, const CSSValue&);
107 static CSSPathValue* convertPath(StyleResolverState&, CSSValue&); 108 static PassRefPtr<StylePath> convertPath(StyleResolverState&, CSSValue&);
108 }; 109 };
109 110
110 template <typename T> 111 template <typename T>
111 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, const CSSValue& value) 112 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, const CSSValue& value)
112 { 113 {
113 return toCSSPrimitiveValue(value).computeLength<T>(state.cssToLengthConversi onData()); 114 return toCSSPrimitiveValue(value).computeLength<T>(state.cssToLengthConversi onData());
114 } 115 }
115 116
116 template <typename T> 117 template <typename T>
117 T StyleBuilderConverter::convertFlags(StyleResolverState& state, const CSSValue& value) 118 T StyleBuilderConverter::convertFlags(StyleResolverState& state, const CSSValue& value)
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 { 156 {
156 if (value.isStringValue()) 157 if (value.isStringValue())
157 return AtomicString(toCSSStringValue(value).value()); 158 return AtomicString(toCSSStringValue(value).value());
158 ASSERT(toCSSPrimitiveValue(value).getValueID() == IdForNone); 159 ASSERT(toCSSPrimitiveValue(value).getValueID() == IdForNone);
159 return nullAtom; 160 return nullAtom;
160 } 161 }
161 162
162 } // namespace blink 163 } // namespace blink
163 164
164 #endif 165 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698