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

Side by Side Diff: Source/core/css/CSSValue.h

Issue 1304993002: Change Rect and Quad to be CSSValues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@split_counter_out_attempt_3
Patch Set: Created 5 years, 4 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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 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 Library General Public 6 * modify it under the terms of the GNU Library 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 bool isGradientValue() const { return m_classType >= LinearGradientClass && m_classType <= RadialGradientClass; } 75 bool isGradientValue() const { return m_classType >= LinearGradientClass && m_classType <= RadialGradientClass; }
76 bool isImageSetValue() const { return m_classType == ImageSetClass; } 76 bool isImageSetValue() const { return m_classType == ImageSetClass; }
77 bool isImageValue() const { return m_classType == ImageClass; } 77 bool isImageValue() const { return m_classType == ImageClass; }
78 bool isImplicitInitialValue() const; 78 bool isImplicitInitialValue() const;
79 bool isInheritedValue() const { return m_classType == InheritedClass; } 79 bool isInheritedValue() const { return m_classType == InheritedClass; }
80 bool isInitialValue() const { return m_classType == InitialClass; } 80 bool isInitialValue() const { return m_classType == InitialClass; }
81 bool isUnsetValue() const { return m_classType == UnsetClass; } 81 bool isUnsetValue() const { return m_classType == UnsetClass; }
82 bool isCSSWideKeyword() const { return m_classType >= InheritedClass && m_cl assType <= UnsetClass; } 82 bool isCSSWideKeyword() const { return m_classType >= InheritedClass && m_cl assType <= UnsetClass; }
83 bool isLinearGradientValue() const { return m_classType == LinearGradientCla ss; } 83 bool isLinearGradientValue() const { return m_classType == LinearGradientCla ss; }
84 bool isPathValue() const { return m_classType == PathClass; } 84 bool isPathValue() const { return m_classType == PathClass; }
85 bool isQuadValue() const { return m_classType == QuadClass; }
85 bool isRadialGradientValue() const { return m_classType == RadialGradientCla ss; } 86 bool isRadialGradientValue() const { return m_classType == RadialGradientCla ss; }
86 bool isReflectValue() const { return m_classType == ReflectClass; } 87 bool isReflectValue() const { return m_classType == ReflectClass; }
87 bool isShadowValue() const { return m_classType == ShadowClass; } 88 bool isShadowValue() const { return m_classType == ShadowClass; }
88 bool isCubicBezierTimingFunctionValue() const { return m_classType == CubicB ezierTimingFunctionClass; } 89 bool isCubicBezierTimingFunctionValue() const { return m_classType == CubicB ezierTimingFunctionClass; }
89 bool isStepsTimingFunctionValue() const { return m_classType == StepsTimingF unctionClass; } 90 bool isStepsTimingFunctionValue() const { return m_classType == StepsTimingF unctionClass; }
90 bool isLineBoxContainValue() const { return m_classType == LineBoxContainCla ss; } 91 bool isLineBoxContainValue() const { return m_classType == LineBoxContainCla ss; }
91 bool isGridTemplateAreasValue() const { return m_classType == GridTemplateAr easClass; } 92 bool isGridTemplateAreasValue() const { return m_classType == GridTemplateAr easClass; }
92 bool isSVGDocumentValue() const { return m_classType == CSSSVGDocumentClass; } 93 bool isSVGDocumentValue() const { return m_classType == CSSSVGDocumentClass; }
93 bool isContentDistributionValue() const { return m_classType == CSSContentDi stributionClass; } 94 bool isContentDistributionValue() const { return m_classType == CSSContentDi stributionClass; }
94 bool isUnicodeRangeValue() const { return m_classType == UnicodeRangeClass; } 95 bool isUnicodeRangeValue() const { return m_classType == UnicodeRangeClass; }
(...skipping 12 matching lines...) Expand all
107 // declared in class 'blink::CSSValue' when compiling 108 // declared in class 'blink::CSSValue' when compiling
108 // 'source\wtf\refcounted.h' by using msvc. 109 // 'source\wtf\refcounted.h' by using msvc.
109 ~CSSValue() { } 110 ~CSSValue() { }
110 111
111 protected: 112 protected:
112 113
113 static const size_t ClassTypeBits = 6; 114 static const size_t ClassTypeBits = 6;
114 enum ClassType { 115 enum ClassType {
115 PrimitiveClass, 116 PrimitiveClass,
116 CounterClass, 117 CounterClass,
118 QuadClass,
117 119
118 // Image classes. 120 // Image classes.
119 ImageClass, 121 ImageClass,
120 CursorImageClass, 122 CursorImageClass,
121 123
122 // Image generator classes. 124 // Image generator classes.
123 CanvasClass, 125 CanvasClass,
124 CrossfadeClass, 126 CrossfadeClass,
125 LinearGradientClass, 127 LinearGradientClass,
126 RadialGradientClass, 128 RadialGradientClass,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 return false; 245 return false;
244 return first->equals(*second); 246 return first->equals(*second);
245 } 247 }
246 248
247 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ 249 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \
248 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica te) 250 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica te)
249 251
250 } // namespace blink 252 } // namespace blink
251 253
252 #endif // CSSValue_h 254 #endif // CSSValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698