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

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

Issue 1316153003: Removed m_isQuirkValue and used CSSPrimitiveValue::QuirkyEms instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: g clt Created 5 years, 3 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
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 SpaceSeparator, 167 SpaceSeparator,
168 CommaSeparator, 168 CommaSeparator,
169 SlashSeparator 169 SlashSeparator
170 }; 170 };
171 171
172 ClassType classType() const { return static_cast<ClassType>(m_classType); } 172 ClassType classType() const { return static_cast<ClassType>(m_classType); }
173 173
174 explicit CSSValue(ClassType classType) 174 explicit CSSValue(ClassType classType)
175 : m_primitiveUnitType(0) 175 : m_primitiveUnitType(0)
176 , m_hasCachedCSSText(false) 176 , m_hasCachedCSSText(false)
177 , m_isQuirkValue(false)
178 , m_valueListSeparator(SpaceSeparator) 177 , m_valueListSeparator(SpaceSeparator)
179 , m_classType(classType) 178 , m_classType(classType)
180 { 179 {
181 } 180 }
182 181
183 // NOTE: This class is non-virtual for memory and performance reasons. 182 // NOTE: This class is non-virtual for memory and performance reasons.
184 // Don't go making it virtual again unless you know exactly what you're doin g! 183 // Don't go making it virtual again unless you know exactly what you're doin g!
185 184
186 private: 185 private:
187 void destroy(); 186 void destroy();
188 187
189 protected: 188 protected:
190 // The bits in this section are only used by specific subclasses but kept he re 189 // The bits in this section are only used by specific subclasses but kept he re
191 // to maximize struct packing. 190 // to maximize struct packing.
192 191
193 // CSSPrimitiveValue bits: 192 // CSSPrimitiveValue bits:
194 unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitType 193 unsigned m_primitiveUnitType : 7; // CSSPrimitiveValue::UnitType
195 mutable unsigned m_hasCachedCSSText : 1; 194 mutable unsigned m_hasCachedCSSText : 1;
196 unsigned m_isQuirkValue : 1;
197 195
198 unsigned m_valueListSeparator : ValueListSeparatorBits; 196 unsigned m_valueListSeparator : ValueListSeparatorBits;
199 197
200 private: 198 private:
201 unsigned m_classType : ClassTypeBits; // ClassType 199 unsigned m_classType : ClassTypeBits; // ClassType
202 }; 200 };
203 201
204 template<typename CSSValueType, size_t inlineCapacity> 202 template<typename CSSValueType, size_t inlineCapacity>
205 inline bool compareCSSValueVector(const WillBeHeapVector<RefPtrWillBeMember<CSSV alueType>, inlineCapacity>& firstVector, const WillBeHeapVector<RefPtrWillBeMemb er<CSSValueType>, inlineCapacity>& secondVector) 203 inline bool compareCSSValueVector(const WillBeHeapVector<RefPtrWillBeMember<CSSV alueType>, inlineCapacity>& firstVector, const WillBeHeapVector<RefPtrWillBeMemb er<CSSValueType>, inlineCapacity>& secondVector)
206 { 204 {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 return false; 245 return false;
248 return first->equals(*second); 246 return first->equals(*second);
249 } 247 }
250 248
251 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \ 249 #define DEFINE_CSS_VALUE_TYPE_CASTS(thisType, predicate) \
252 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica te) 250 DEFINE_TYPE_CASTS(thisType, CSSValue, value, value->predicate, value.predica te)
253 251
254 } // namespace blink 252 } // namespace blink
255 253
256 #endif // CSSValue_h 254 #endif // CSSValue_h
OLDNEW
« no previous file with comments | « Source/core/css/CSSPrimitiveValue.cpp ('k') | Source/core/css/parser/CSSPropertyParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698