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 4481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4492 case CSSValueLuminance: | 4492 case CSSValueLuminance: |
4493 return MT_LUMINANCE; | 4493 return MT_LUMINANCE; |
4494 case CSSValueAlpha: | 4494 case CSSValueAlpha: |
4495 return MT_ALPHA; | 4495 return MT_ALPHA; |
4496 } | 4496 } |
4497 | 4497 |
4498 ASSERT_NOT_REACHED(); | 4498 ASSERT_NOT_REACHED(); |
4499 return MT_LUMINANCE; | 4499 return MT_LUMINANCE; |
4500 } | 4500 } |
4501 | 4501 |
4502 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TouchAction t) | |
eseidel
2013/05/24 20:24:33
Lame that we don't autogen this stuff yet. :)
| |
4503 : CSSValue(PrimitiveClass) | |
4504 { | |
4505 m_primitiveUnitType = CSS_IDENT; | |
4506 switch (t) { | |
4507 case TouchActionNone: | |
4508 m_value.ident = CSSValueNone; | |
4509 break; | |
4510 case TouchActionAuto: | |
4511 m_value.ident = CSSValueAuto; | |
4512 break; | |
4513 } | |
4514 } | |
4515 | |
4516 template<> inline CSSPrimitiveValue::operator TouchAction() const | |
4517 { | |
4518 switch (m_value.ident) { | |
4519 case CSSValueNone: | |
4520 return TouchActionNone; | |
4521 case CSSValueAuto: | |
4522 return TouchActionAuto; | |
4523 } | |
4524 | |
4525 ASSERT_NOT_REACHED(); | |
4526 return TouchActionNone; | |
4527 } | |
4528 | |
4502 } | 4529 } |
4503 | 4530 |
4504 #endif | 4531 #endif |
OLD | NEW |