| 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 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2622 case CSSValueKeepAll: | 2622 case CSSValueKeepAll: |
| 2623 return KeepAllWordBreak; | 2623 return KeepAllWordBreak; |
| 2624 default: | 2624 default: |
| 2625 break; | 2625 break; |
| 2626 } | 2626 } |
| 2627 | 2627 |
| 2628 ASSERT_NOT_REACHED(); | 2628 ASSERT_NOT_REACHED(); |
| 2629 return NormalWordBreak; | 2629 return NormalWordBreak; |
| 2630 } | 2630 } |
| 2631 | 2631 |
| 2632 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflowAnchor e) |
| 2633 : CSSValue(PrimitiveClass) |
| 2634 { |
| 2635 init(UnitType::ValueID); |
| 2636 switch (e) { |
| 2637 case AnchorVisible: |
| 2638 m_value.valueID = CSSValueVisible; |
| 2639 break; |
| 2640 case AnchorNone: |
| 2641 m_value.valueID = CSSValueNone; |
| 2642 break; |
| 2643 case AnchorAuto: |
| 2644 m_value.valueID = CSSValueAuto; |
| 2645 break; |
| 2646 } |
| 2647 } |
| 2648 |
| 2649 template<> inline EOverflowAnchor CSSPrimitiveValue::convertTo() const |
| 2650 { |
| 2651 DCHECK(isValueID()); |
| 2652 switch (m_value.valueID) { |
| 2653 case CSSValueVisible: |
| 2654 return AnchorVisible; |
| 2655 case CSSValueNone: |
| 2656 return AnchorNone; |
| 2657 case CSSValueAuto: |
| 2658 return AnchorAuto; |
| 2659 default: |
| 2660 break; |
| 2661 } |
| 2662 |
| 2663 NOTREACHED(); |
| 2664 return AnchorNone; |
| 2665 } |
| 2666 |
| 2632 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflowWrap e) | 2667 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflowWrap e) |
| 2633 : CSSValue(PrimitiveClass) | 2668 : CSSValue(PrimitiveClass) |
| 2634 { | 2669 { |
| 2635 init(UnitType::ValueID); | 2670 init(UnitType::ValueID); |
| 2636 switch (e) { | 2671 switch (e) { |
| 2637 case NormalOverflowWrap: | 2672 case NormalOverflowWrap: |
| 2638 m_value.valueID = CSSValueNormal; | 2673 m_value.valueID = CSSValueNormal; |
| 2639 break; | 2674 break; |
| 2640 case BreakOverflowWrap: | 2675 case BreakOverflowWrap: |
| 2641 m_value.valueID = CSSValueBreakWord; | 2676 m_value.valueID = CSSValueBreakWord; |
| (...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4669 default: | 4704 default: |
| 4670 break; | 4705 break; |
| 4671 } | 4706 } |
| 4672 ASSERT_NOT_REACHED(); | 4707 ASSERT_NOT_REACHED(); |
| 4673 return ContainsNone; | 4708 return ContainsNone; |
| 4674 } | 4709 } |
| 4675 | 4710 |
| 4676 } // namespace blink | 4711 } // namespace blink |
| 4677 | 4712 |
| 4678 #endif | 4713 #endif |
| OLD | NEW |