| 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, 2007, 2008, 2012 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2012 Apple Inc. All rights reserv
ed. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 case ViewportPercentageMax: | 294 case ViewportPercentageMax: |
| 295 init(length); | 295 init(length); |
| 296 return; | 296 return; |
| 297 case Fixed: | 297 case Fixed: |
| 298 m_primitiveUnitType = CSS_PX; | 298 m_primitiveUnitType = CSS_PX; |
| 299 m_value.num = length.value() / zoom; | 299 m_value.num = length.value() / zoom; |
| 300 return; | 300 return; |
| 301 case Calculated: | 301 case Calculated: |
| 302 init(CSSCalcValue::create(length.calculationValue(), zoom)); | 302 init(CSSCalcValue::create(length.calculationValue(), zoom)); |
| 303 return; | 303 return; |
| 304 case Relative: | |
| 305 case Undefined: | 304 case Undefined: |
| 306 ASSERT_NOT_REACHED(); | 305 ASSERT_NOT_REACHED(); |
| 307 break; | 306 break; |
| 308 } | 307 } |
| 309 } | 308 } |
| 310 | 309 |
| 311 void CSSPrimitiveValue::init(const Length& length) | 310 void CSSPrimitiveValue::init(const Length& length) |
| 312 { | 311 { |
| 313 switch (length.type()) { | 312 switch (length.type()) { |
| 314 case Auto: | 313 case Auto: |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 break; | 361 break; |
| 363 case ViewportPercentageMin: | 362 case ViewportPercentageMin: |
| 364 m_primitiveUnitType = CSS_VMIN; | 363 m_primitiveUnitType = CSS_VMIN; |
| 365 m_value.num = length.viewportPercentageLength(); | 364 m_value.num = length.viewportPercentageLength(); |
| 366 break; | 365 break; |
| 367 case ViewportPercentageMax: | 366 case ViewportPercentageMax: |
| 368 m_primitiveUnitType = CSS_VMAX; | 367 m_primitiveUnitType = CSS_VMAX; |
| 369 m_value.num = length.viewportPercentageLength(); | 368 m_value.num = length.viewportPercentageLength(); |
| 370 break; | 369 break; |
| 371 case Calculated: | 370 case Calculated: |
| 372 case Relative: | |
| 373 case Undefined: | 371 case Undefined: |
| 374 ASSERT_NOT_REACHED(); | 372 ASSERT_NOT_REACHED(); |
| 375 break; | 373 break; |
| 376 } | 374 } |
| 377 } | 375 } |
| 378 | 376 |
| 379 void CSSPrimitiveValue::init(PassRefPtr<Counter> c) | 377 void CSSPrimitiveValue::init(PassRefPtr<Counter> c) |
| 380 { | 378 { |
| 381 m_primitiveUnitType = CSS_COUNTER; | 379 m_primitiveUnitType = CSS_COUNTER; |
| 382 m_hasCachedCSSText = false; | 380 m_hasCachedCSSText = false; |
| (...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 return m_value.parserOperator == other.m_value.parserOperator; | 1331 return m_value.parserOperator == other.m_value.parserOperator; |
| 1334 case CSS_CALC: | 1332 case CSS_CALC: |
| 1335 return m_value.calc && other.m_value.calc && m_value.calc->equals(*other
.m_value.calc); | 1333 return m_value.calc && other.m_value.calc && m_value.calc->equals(*other
.m_value.calc); |
| 1336 case CSS_SHAPE: | 1334 case CSS_SHAPE: |
| 1337 return m_value.shape && other.m_value.shape && m_value.shape->equals(*ot
her.m_value.shape); | 1335 return m_value.shape && other.m_value.shape && m_value.shape->equals(*ot
her.m_value.shape); |
| 1338 } | 1336 } |
| 1339 return false; | 1337 return false; |
| 1340 } | 1338 } |
| 1341 | 1339 |
| 1342 } // namespace WebCore | 1340 } // namespace WebCore |
| OLD | NEW |