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

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

Issue 292173009: Web Animations - responsive interpolation (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@0519_MySeparation
Patch Set: RELEASE_ASSERT Created 6 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
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 bool isAttr() const { return m_primitiveUnitType == CSS_ATTR; } 184 bool isAttr() const { return m_primitiveUnitType == CSS_ATTR; }
185 bool isCounter() const { return m_primitiveUnitType == CSS_COUNTER; } 185 bool isCounter() const { return m_primitiveUnitType == CSS_COUNTER; }
186 bool isFontIndependentLength() const { return m_primitiveUnitType >= CSS_PX && m_primitiveUnitType <= CSS_PC; } 186 bool isFontIndependentLength() const { return m_primitiveUnitType >= CSS_PX && m_primitiveUnitType <= CSS_PC; }
187 bool isFontRelativeLength() const 187 bool isFontRelativeLength() const
188 { 188 {
189 return m_primitiveUnitType == CSS_EMS 189 return m_primitiveUnitType == CSS_EMS
190 || m_primitiveUnitType == CSS_EXS 190 || m_primitiveUnitType == CSS_EXS
191 || m_primitiveUnitType == CSS_REMS 191 || m_primitiveUnitType == CSS_REMS
192 || m_primitiveUnitType == CSS_CHS; 192 || m_primitiveUnitType == CSS_CHS;
193 } 193 }
194 bool isViewportPercentageLength() const { return isViewportPercentageLength( static_cast<UnitType>(m_primitiveUnitType)); }
194 static bool isViewportPercentageLength(UnitType type) { return type >= CSS_V W && type <= CSS_VMAX; } 195 static bool isViewportPercentageLength(UnitType type) { return type >= CSS_V W && type <= CSS_VMAX; }
195 static bool isLength(UnitType type) 196 static bool isLength(UnitType type)
196 { 197 {
197 return (type >= CSS_EMS && type <= CSS_PC) || type == CSS_REMS || type = = CSS_CHS || isViewportPercentageLength(type); 198 return (type >= CSS_EMS && type <= CSS_PC) || type == CSS_REMS || type = = CSS_CHS || isViewportPercentageLength(type);
198 } 199 }
199 bool isLength() const { return isLength(primitiveType()); } 200 bool isLength() const { return isLength(primitiveType()); }
200 bool isNumber() const { return primitiveType() == CSS_NUMBER; } 201 bool isNumber() const { return primitiveType() == CSS_NUMBER; }
201 bool isPercentage() const { return primitiveType() == CSS_PERCENTAGE; } 202 bool isPercentage() const { return primitiveType() == CSS_PERCENTAGE; }
202 bool isPx() const { return primitiveType() == CSS_PX; } 203 bool isPx() const { return primitiveType() == CSS_PX; }
203 bool isRect() const { return m_primitiveUnitType == CSS_RECT; } 204 bool isRect() const { return m_primitiveUnitType == CSS_RECT; }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } m_value; 425 } m_value;
425 }; 426 };
426 427
427 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray; 428 typedef CSSPrimitiveValue::CSSLengthArray CSSLengthArray;
428 429
429 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); 430 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue());
430 431
431 } // namespace WebCore 432 } // namespace WebCore
432 433
433 #endif // CSSPrimitiveValue_h 434 #endif // CSSPrimitiveValue_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698