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

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

Issue 1920583002: NOT FOR LANDING: Hack up CSSParser for speed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing consts. Created 4 years, 8 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, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 UFrequency, 154 UFrequency,
155 UResolution, 155 UResolution,
156 UOther 156 UOther
157 }; 157 };
158 static UnitCategory unitTypeToUnitCategory(UnitType); 158 static UnitCategory unitTypeToUnitCategory(UnitType);
159 static float clampToCSSLengthRange(double); 159 static float clampToCSSLengthRange(double);
160 160
161 static void initUnitTable(); 161 static void initUnitTable();
162 162
163 static UnitType fromName(const String& unit); 163 static UnitType fromName(const String& unit);
164 static UnitType fromName(const LChar* characters8, unsigned length);
165 static UnitType fromName(const UChar* characters16, unsigned length);
164 166
165 bool isAngle() const 167 bool isAngle() const
166 { 168 {
167 return type() == UnitType::Degrees 169 return type() == UnitType::Degrees
168 || type() == UnitType::Radians 170 || type() == UnitType::Radians
169 || type() == UnitType::Gradians 171 || type() == UnitType::Gradians
170 || type() == UnitType::Turns; 172 || type() == UnitType::Turns;
171 } 173 }
172 bool isFontRelativeLength() const 174 bool isFontRelativeLength() const
173 { 175 {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } m_value; 298 } m_value;
297 }; 299 };
298 300
299 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; 301 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray;
300 302
301 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); 303 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue());
302 304
303 } // namespace blink 305 } // namespace blink
304 306
305 #endif // CSSPrimitiveValue_h 307 #endif // CSSPrimitiveValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698