OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 Copyright (C) 2006, 2008 Apple Inc. All rights reserved. | 3 Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
4 Copyright (C) 2011 Rik Cabanier (cabanier@adobe.com) | 4 Copyright (C) 2011 Rik Cabanier (cabanier@adobe.com) |
5 Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
6 | 6 |
7 This library is free software; you can redistribute it and/or | 7 This library is free software; you can redistribute it and/or |
8 modify it under the terms of the GNU Library General Public | 8 modify it under the terms of the GNU Library General Public |
9 License as published by the Free Software Foundation; either | 9 License as published by the Free Software Foundation; either |
10 version 2 of the License, or (at your option) any later version. | 10 version 2 of the License, or (at your option) any later version. |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 if (range == ValueRangeNonNegative) | 284 if (range == ValueRangeNonNegative) |
285 blendedValue = clampTo<float>(blendedValue, 0); | 285 blendedValue = clampTo<float>(blendedValue, 0); |
286 return Length(blendedValue, resultType); | 286 return Length(blendedValue, resultType); |
287 } | 287 } |
288 | 288 |
289 float getFloatValue() const | 289 float getFloatValue() const |
290 { | 290 { |
291 ASSERT(!isMaxSizeNone()); | 291 ASSERT(!isMaxSizeNone()); |
292 return m_isFloat ? m_floatValue : m_intValue; | 292 return m_isFloat ? m_floatValue : m_intValue; |
293 } | 293 } |
294 float nonNanCalculatedValue(int maxValue) const; | 294 float nonNanCalculatedValue(float maxValue) const; |
295 | 295 |
296 Length subtractFromOneHundredPercent() const; | 296 Length subtractFromOneHundredPercent() const; |
297 | 297 |
298 private: | 298 private: |
299 int getIntValue() const | 299 int getIntValue() const |
300 { | 300 { |
301 ASSERT(!isMaxSizeNone()); | 301 ASSERT(!isMaxSizeNone()); |
302 return m_isFloat ? static_cast<int>(m_floatValue) : m_intValue; | 302 return m_isFloat ? static_cast<int>(m_floatValue) : m_intValue; |
303 } | 303 } |
304 | 304 |
(...skipping 14 matching lines...) Expand all Loading... |
319 bool m_quirk; | 319 bool m_quirk; |
320 unsigned char m_type; | 320 unsigned char m_type; |
321 bool m_isFloat; | 321 bool m_isFloat; |
322 }; | 322 }; |
323 | 323 |
324 PLATFORM_EXPORT Vector<Length> parseHTMLAreaElementCoords(const String&); | 324 PLATFORM_EXPORT Vector<Length> parseHTMLAreaElementCoords(const String&); |
325 | 325 |
326 } // namespace blink | 326 } // namespace blink |
327 | 327 |
328 #endif // Length_h | 328 #endif // Length_h |
OLD | NEW |