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. | 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
5 * (http://www.torchmobile.com/) | 5 * (http://www.torchmobile.com/) |
6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> | 6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> |
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
8 * | 8 * |
9 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
10 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
(...skipping 3446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3457 case CSSValueSmooth: | 3457 case CSSValueSmooth: |
3458 return ScrollBehaviorSmooth; | 3458 return ScrollBehaviorSmooth; |
3459 default: | 3459 default: |
3460 break; | 3460 break; |
3461 } | 3461 } |
3462 ASSERT_NOT_REACHED(); | 3462 ASSERT_NOT_REACHED(); |
3463 return ScrollBehaviorAuto; | 3463 return ScrollBehaviorAuto; |
3464 } | 3464 } |
3465 | 3465 |
3466 template <> | 3466 template <> |
| 3467 inline CSSIdentifierValue::CSSIdentifierValue( |
| 3468 ScrollBoundaryBehavior boundaryBehavior) |
| 3469 : CSSValue(IdentifierClass) { |
| 3470 switch (boundaryBehavior) { |
| 3471 case ScrollBoundaryBehaviorPropagate: |
| 3472 m_valueID = CSSValuePropagate; |
| 3473 break; |
| 3474 case ScrollBoundaryBehaviorContain: |
| 3475 m_valueID = CSSValueContain; |
| 3476 break; |
| 3477 case ScrollBoundaryBehaviorNone: |
| 3478 m_valueID = CSSValueNone; |
| 3479 break; |
| 3480 } |
| 3481 } |
| 3482 |
| 3483 template <> |
| 3484 inline ScrollBoundaryBehavior CSSIdentifierValue::convertTo() const { |
| 3485 switch (getValueID()) { |
| 3486 case CSSValuePropagate: |
| 3487 return ScrollBoundaryBehaviorPropagate; |
| 3488 case CSSValueContain: |
| 3489 return ScrollBoundaryBehaviorContain; |
| 3490 case CSSValueNone: |
| 3491 return ScrollBoundaryBehaviorNone; |
| 3492 default: |
| 3493 break; |
| 3494 } |
| 3495 NOT_REACHED(); |
| 3496 return ScrollBoundaryBehaviorPropagate; |
| 3497 } |
| 3498 |
| 3499 template <> |
3467 inline CSSIdentifierValue::CSSIdentifierValue(ScrollSnapType snapType) | 3500 inline CSSIdentifierValue::CSSIdentifierValue(ScrollSnapType snapType) |
3468 : CSSValue(IdentifierClass) { | 3501 : CSSValue(IdentifierClass) { |
3469 switch (snapType) { | 3502 switch (snapType) { |
3470 case ScrollSnapTypeNone: | 3503 case ScrollSnapTypeNone: |
3471 m_valueID = CSSValueNone; | 3504 m_valueID = CSSValueNone; |
3472 break; | 3505 break; |
3473 case ScrollSnapTypeMandatory: | 3506 case ScrollSnapTypeMandatory: |
3474 m_valueID = CSSValueMandatory; | 3507 m_valueID = CSSValueMandatory; |
3475 break; | 3508 break; |
3476 case ScrollSnapTypeProximity: | 3509 case ScrollSnapTypeProximity: |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3543 default: | 3576 default: |
3544 break; | 3577 break; |
3545 } | 3578 } |
3546 ASSERT_NOT_REACHED(); | 3579 ASSERT_NOT_REACHED(); |
3547 return ContainsNone; | 3580 return ContainsNone; |
3548 } | 3581 } |
3549 | 3582 |
3550 } // namespace blink | 3583 } // namespace blink |
3551 | 3584 |
3552 #endif | 3585 #endif |
OLD | NEW |