OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. | 2 * Copyright (C) 2007 Alexey Proskuryakov <ap@nypop.com>. |
3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) | 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 5 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1392 case CSSValueNone: | 1392 case CSSValueNone: |
1393 return NoFloat; | 1393 return NoFloat; |
1394 default: | 1394 default: |
1395 break; | 1395 break; |
1396 } | 1396 } |
1397 | 1397 |
1398 ASSERT_NOT_REACHED(); | 1398 ASSERT_NOT_REACHED(); |
1399 return NoFloat; | 1399 return NoFloat; |
1400 } | 1400 } |
1401 | 1401 |
1402 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EHyphens e) | |
1403 : CSSValue(PrimitiveClass) | |
1404 { | |
1405 init(UnitType::ValueID); | |
1406 switch (e) { | |
1407 case HyphensAuto: | |
1408 m_value.valueID = CSSValueAuto; | |
1409 break; | |
1410 case HyphensManual: | |
1411 m_value.valueID = CSSValueManual; | |
1412 break; | |
1413 case HyphensNone: | |
1414 m_value.valueID = CSSValueNone; | |
1415 break; | |
1416 } | |
1417 } | |
1418 | |
1419 template<> inline EHyphens CSSPrimitiveValue::convertTo() const | |
1420 { | |
1421 ASSERT(isValueID()); | |
tkent
2016/04/26 07:08:50
Please use DCHECK for new code.
kojii
2016/04/26 07:38:03
Done, copy-pasted without checking, thanks.
| |
1422 switch (m_value.valueID) { | |
1423 case CSSValueAuto: | |
1424 return HyphensAuto; | |
1425 case CSSValueManual: | |
1426 return HyphensManual; | |
1427 case CSSValueNone: | |
1428 return HyphensNone; | |
1429 default: | |
1430 break; | |
1431 } | |
1432 | |
1433 ASSERT_NOT_REACHED(); | |
tkent
2016/04/26 07:08:51
Please use NOTREACHED for new code.
kojii
2016/04/26 07:38:03
Done.
| |
1434 return HyphensManual; | |
1435 } | |
1436 | |
1402 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineBreak e) | 1437 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineBreak e) |
1403 : CSSValue(PrimitiveClass) | 1438 : CSSValue(PrimitiveClass) |
1404 { | 1439 { |
1405 init(UnitType::ValueID); | 1440 init(UnitType::ValueID); |
1406 switch (e) { | 1441 switch (e) { |
1407 case LineBreakAuto: | 1442 case LineBreakAuto: |
1408 m_value.valueID = CSSValueAuto; | 1443 m_value.valueID = CSSValueAuto; |
1409 break; | 1444 break; |
1410 case LineBreakLoose: | 1445 case LineBreakLoose: |
1411 m_value.valueID = CSSValueLoose; | 1446 m_value.valueID = CSSValueLoose; |
(...skipping 3260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4672 default: | 4707 default: |
4673 break; | 4708 break; |
4674 } | 4709 } |
4675 ASSERT_NOT_REACHED(); | 4710 ASSERT_NOT_REACHED(); |
4676 return ContainsNone; | 4711 return ContainsNone; |
4677 } | 4712 } |
4678 | 4713 |
4679 } // namespace blink | 4714 } // namespace blink |
4680 | 4715 |
4681 #endif | 4716 #endif |
OLD | NEW |