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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(double value, UnitTy
pe type) | 191 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(double value, UnitTy
pe type) |
192 { | 192 { |
193 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, type)); | 193 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, type)); |
194 } | 194 } |
195 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(const Length& value,
float zoom) | 195 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create(const Length& value,
float zoom) |
196 { | 196 { |
197 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, zoom)); | 197 return adoptRefWillBeNoop(new CSSPrimitiveValue(value, zoom)); |
198 } | 198 } |
199 template<typename T> static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create
(T value) | 199 template<typename T> static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> create
(T value) |
200 { | 200 { |
201 static_assert(!WTF::IsSameType<T, CSSValueID>::value, "Do not call creat
e() with a CSSValueID; call createIdentifier() instead"); | 201 static_assert(!std::is_same<T, CSSValueID>::value, "Do not call create()
with a CSSValueID; call createIdentifier() instead"); |
202 return adoptRefWillBeNoop(new CSSPrimitiveValue(value)); | 202 return adoptRefWillBeNoop(new CSSPrimitiveValue(value)); |
203 } | 203 } |
204 | 204 |
205 ~CSSPrimitiveValue(); | 205 ~CSSPrimitiveValue(); |
206 | 206 |
207 UnitType typeWithCalcResolved() const; | 207 UnitType typeWithCalcResolved() const; |
208 | 208 |
209 double computeDegrees() const; | 209 double computeDegrees() const; |
210 double computeSeconds() const; | 210 double computeSeconds() const; |
211 | 211 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 }; | 279 }; |
280 | 280 |
281 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; | 281 using CSSLengthArray = CSSPrimitiveValue::CSSLengthArray; |
282 using CSSLengthTypeArray = CSSPrimitiveValue::CSSLengthTypeArray; | 282 using CSSLengthTypeArray = CSSPrimitiveValue::CSSLengthTypeArray; |
283 | 283 |
284 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); | 284 DEFINE_CSS_VALUE_TYPE_CASTS(CSSPrimitiveValue, isPrimitiveValue()); |
285 | 285 |
286 } // namespace blink | 286 } // namespace blink |
287 | 287 |
288 #endif // CSSPrimitiveValue_h | 288 #endif // CSSPrimitiveValue_h |
OLD | NEW |