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 4667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4678 case CSSValueNonScalingStroke: | 4678 case CSSValueNonScalingStroke: |
4679 return VE_NON_SCALING_STROKE; | 4679 return VE_NON_SCALING_STROKE; |
4680 default: | 4680 default: |
4681 break; | 4681 break; |
4682 } | 4682 } |
4683 | 4683 |
4684 ASSERT_NOT_REACHED(); | 4684 ASSERT_NOT_REACHED(); |
4685 return VE_NONE; | 4685 return VE_NONE; |
4686 } | 4686 } |
4687 | 4687 |
| 4688 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPaintOrderType e) |
| 4689 : CSSValue(PrimitiveClass) |
| 4690 { |
| 4691 m_primitiveUnitType = CSS_VALUE_ID; |
| 4692 switch (e) { |
| 4693 case PT_FILL: |
| 4694 m_value.valueID = CSSValueFill; |
| 4695 break; |
| 4696 case PT_STROKE: |
| 4697 m_value.valueID = CSSValueStroke; |
| 4698 break; |
| 4699 case PT_MARKERS: |
| 4700 m_value.valueID = CSSValueMarkers; |
| 4701 break; |
| 4702 default: |
| 4703 ASSERT_NOT_REACHED(); |
| 4704 m_value.valueID = CSSValueFill; |
| 4705 break; |
| 4706 } |
| 4707 } |
| 4708 |
| 4709 template<> inline CSSPrimitiveValue::operator EPaintOrderType() const |
| 4710 { |
| 4711 ASSERT(isValueID()); |
| 4712 switch (m_value.valueID) { |
| 4713 case CSSValueFill: |
| 4714 return PT_FILL; |
| 4715 case CSSValueStroke: |
| 4716 return PT_STROKE; |
| 4717 case CSSValueMarkers: |
| 4718 return PT_MARKERS; |
| 4719 default: |
| 4720 break; |
| 4721 } |
| 4722 |
| 4723 ASSERT_NOT_REACHED(); |
| 4724 return PT_NONE; |
| 4725 } |
| 4726 |
4688 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMaskType e) | 4727 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMaskType e) |
4689 : CSSValue(PrimitiveClass) | 4728 : CSSValue(PrimitiveClass) |
4690 { | 4729 { |
4691 m_primitiveUnitType = CSS_VALUE_ID; | 4730 m_primitiveUnitType = CSS_VALUE_ID; |
4692 switch (e) { | 4731 switch (e) { |
4693 case MT_LUMINANCE: | 4732 case MT_LUMINANCE: |
4694 m_value.valueID = CSSValueLuminance; | 4733 m_value.valueID = CSSValueLuminance; |
4695 break; | 4734 break; |
4696 case MT_ALPHA: | 4735 case MT_ALPHA: |
4697 m_value.valueID = CSSValueAlpha; | 4736 m_value.valueID = CSSValueAlpha; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4741 break; | 4780 break; |
4742 } | 4781 } |
4743 | 4782 |
4744 ASSERT_NOT_REACHED(); | 4783 ASSERT_NOT_REACHED(); |
4745 return TouchActionNone; | 4784 return TouchActionNone; |
4746 } | 4785 } |
4747 | 4786 |
4748 } | 4787 } |
4749 | 4788 |
4750 #endif | 4789 #endif |
OLD | NEW |