OLD | NEW |
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 || type == UnitType::Rems | 186 || type == UnitType::Rems |
187 || type == UnitType::Chs | 187 || type == UnitType::Chs |
188 || isViewportPercentageLength(type); | 188 || isViewportPercentageLength(type); |
189 } | 189 } |
190 bool isLength() const { return isLength(typeWithCalcResolved()); } | 190 bool isLength() const { return isLength(typeWithCalcResolved()); } |
191 bool isNumber() const { return typeWithCalcResolved() == UnitType::Number ||
typeWithCalcResolved() == UnitType::Integer; } | 191 bool isNumber() const { return typeWithCalcResolved() == UnitType::Number ||
typeWithCalcResolved() == UnitType::Integer; } |
192 bool isPercentage() const { return typeWithCalcResolved() == UnitType::Perce
ntage; } | 192 bool isPercentage() const { return typeWithCalcResolved() == UnitType::Perce
ntage; } |
193 bool isPx() const { return typeWithCalcResolved() == UnitType::Pixels; } | 193 bool isPx() const { return typeWithCalcResolved() == UnitType::Pixels; } |
194 bool isTime() const { return type() == UnitType::Seconds || type() == UnitTy
pe::Milliseconds; } | 194 bool isTime() const { return type() == UnitType::Seconds || type() == UnitTy
pe::Milliseconds; } |
195 bool isCalculated() const { return type() == UnitType::Calc; } | 195 bool isCalculated() const { return type() == UnitType::Calc; } |
196 bool isCalculatedPercentageWithNumber() const { return typeWithCalcResolved(
) == UnitType::CalcPercentageWithNumber; } | |
197 bool isCalculatedPercentageWithLength() const { return typeWithCalcResolved(
) == UnitType::CalcPercentageWithLength; } | 196 bool isCalculatedPercentageWithLength() const { return typeWithCalcResolved(
) == UnitType::CalcPercentageWithLength; } |
198 static bool isResolution(UnitType type) { return type >= UnitType::DotsPerPi
xel && type <= UnitType::DotsPerCentimeter; } | 197 static bool isResolution(UnitType type) { return type >= UnitType::DotsPerPi
xel && type <= UnitType::DotsPerCentimeter; } |
199 bool isFlex() const { return typeWithCalcResolved() == UnitType::Fraction; } | 198 bool isFlex() const { return typeWithCalcResolved() == UnitType::Fraction; } |
200 bool isValueID() const { return type() == UnitType::ValueID; } | 199 bool isValueID() const { return type() == UnitType::ValueID; } |
201 bool colorIsDerivedFromElement() const; | 200 bool colorIsDerivedFromElement() const; |
202 | 201 |
203 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createIdentifier(CSSValueID
valueID) | 202 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> createIdentifier(CSSValueID
valueID) |
204 { | 203 { |
205 return adoptRefWillBeNoop(new CSSPrimitiveValue(valueID)); | 204 return adoptRefWillBeNoop(new CSSPrimitiveValue(valueID)); |
206 } | 205 } |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 }; | 294 }; |
296 | 295 |
297 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; | 296 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; |
298 using CSSLengthTypeArray = CSSPrimitiveValue::CSSLengthTypeArray; | 297 using CSSLengthTypeArray = CSSPrimitiveValue::CSSLengthTypeArray; |
299 | 298 |
300 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 299 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
301 | 300 |
302 } // namespace blink | 301 } // namespace blink |
303 | 302 |
304 #endif // CSSPrimitiveValue_h | 303 #endif // CSSPrimitiveValue_h |
OLD | NEW |