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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 return BBASELINE; | 704 return BBASELINE; |
705 default: | 705 default: |
706 break; | 706 break; |
707 } | 707 } |
708 | 708 |
709 NOTREACHED(); | 709 NOTREACHED(); |
710 return BSTRETCH; | 710 return BSTRETCH; |
711 } | 711 } |
712 | 712 |
713 template <> | 713 template <> |
714 inline CSSIdentifierValue::CSSIdentifierValue(EBoxDecorationBreak e) | |
715 : CSSValue(kIdentifierClass) { | |
716 switch (e) { | |
717 case EBoxDecorationBreak::kSlice: | |
718 value_id_ = CSSValueSlice; | |
719 break; | |
720 case EBoxDecorationBreak::kClone: | |
721 value_id_ = CSSValueClone; | |
722 break; | |
723 } | |
724 } | |
725 | |
726 template <> | |
727 inline EBoxDecorationBreak CSSIdentifierValue::ConvertTo() const { | |
728 switch (value_id_) { | |
729 case CSSValueSlice: | |
730 return EBoxDecorationBreak::kSlice; | |
731 case CSSValueClone: | |
732 return EBoxDecorationBreak::kClone; | |
733 default: | |
734 break; | |
735 } | |
736 | |
737 NOTREACHED(); | |
738 return EBoxDecorationBreak::kSlice; | |
739 } | |
740 | |
741 template <> | |
742 inline CSSIdentifierValue::CSSIdentifierValue(BackgroundEdgeOrigin e) | 714 inline CSSIdentifierValue::CSSIdentifierValue(BackgroundEdgeOrigin e) |
743 : CSSValue(kIdentifierClass) { | 715 : CSSValue(kIdentifierClass) { |
744 switch (e) { | 716 switch (e) { |
745 case kTopEdge: | 717 case kTopEdge: |
746 value_id_ = CSSValueTop; | 718 value_id_ = CSSValueTop; |
747 break; | 719 break; |
748 case kRightEdge: | 720 case kRightEdge: |
749 value_id_ = CSSValueRight; | 721 value_id_ = CSSValueRight; |
750 break; | 722 break; |
751 case kBottomEdge: | 723 case kBottomEdge: |
(...skipping 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3385 default: | 3357 default: |
3386 break; | 3358 break; |
3387 } | 3359 } |
3388 NOTREACHED(); | 3360 NOTREACHED(); |
3389 return kContainsNone; | 3361 return kContainsNone; |
3390 } | 3362 } |
3391 | 3363 |
3392 } // namespace blink | 3364 } // namespace blink |
3393 | 3365 |
3394 #endif | 3366 #endif |
OLD | NEW |