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

Side by Side Diff: Source/core/css/parser/CSSParserValues.h

Issue 1157463002: Simplify UnicodeRangeToken handling (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 5 years, 7 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 | « no previous file | Source/core/css/parser/CSSParserValues.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 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 struct CSSParserValue { 105 struct CSSParserValue {
106 CSSValueID id; 106 CSSValueID id;
107 bool isInt; 107 bool isInt;
108 union { 108 union {
109 double fValue; 109 double fValue;
110 int iValue; 110 int iValue;
111 CSSParserString string; 111 CSSParserString string;
112 CSSParserFunction* function; 112 CSSParserFunction* function;
113 CSSParserValueList* valueList; 113 CSSParserValueList* valueList;
114 struct {
115 UChar32 start;
116 UChar32 end;
117 } m_unicodeRange;
114 }; 118 };
115 enum { 119 enum {
116 Operator = 0x100000, 120 Operator = 0x100000,
117 Function = 0x100001, 121 Function = 0x100001,
118 ValueList = 0x100002, 122 ValueList = 0x100002,
119 Q_EMS = 0x100003, 123 Q_EMS = 0x100003,
120 HexColor = 0x100004, 124 HexColor = 0x100004,
121 // Represents a dimension by a list of two values, a CSS_NUMBER and an C SS_IDENT 125 // Represents a dimension by a list of two values, a CSS_NUMBER and an C SS_IDENT
122 DimensionList = 0x100006, 126 DimensionList = 0x100006,
123 // Represents a unicode range by a list of two CSS_NUMBERs 127 // Represents a unicode range by a pair of UChar32 values
124 UnicodeRange = 0x100007, 128 UnicodeRange = 0x100007,
125 }; 129 };
126 int unit; 130 int unit;
127 131
128 inline void setFromNumber(double value, int unit = CSSPrimitiveValue::CSS_NU MBER); 132 inline void setFromNumber(double value, int unit = CSSPrimitiveValue::CSS_NU MBER);
129 inline void setFromOperator(UChar); 133 inline void setFromOperator(UChar);
130 inline void setFromFunction(CSSParserFunction*); 134 inline void setFromFunction(CSSParserFunction*);
131 inline void setFromValueList(PassOwnPtr<CSSParserValueList>); 135 inline void setFromValueList(PassOwnPtr<CSSParserValueList>);
132 }; 136 };
133 137
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 { 264 {
261 id = CSSValueInvalid; 265 id = CSSValueInvalid;
262 this->valueList = valueList.leakPtr(); 266 this->valueList = valueList.leakPtr();
263 unit = ValueList; 267 unit = ValueList;
264 isInt = false; 268 isInt = false;
265 } 269 }
266 270
267 } 271 }
268 272
269 #endif 273 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/parser/CSSParserValues.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698