| 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 2424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2435 case CSSValueRtl: | 2435 case CSSValueRtl: |
| 2436 return RTL; | 2436 return RTL; |
| 2437 default: | 2437 default: |
| 2438 break; | 2438 break; |
| 2439 } | 2439 } |
| 2440 | 2440 |
| 2441 ASSERT_NOT_REACHED(); | 2441 ASSERT_NOT_REACHED(); |
| 2442 return LTR; | 2442 return LTR; |
| 2443 } | 2443 } |
| 2444 | 2444 |
| 2445 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(WritingMode e) | |
| 2446 : CSSValue(PrimitiveClass) | |
| 2447 { | |
| 2448 m_primitiveUnitType = CSS_VALUE_ID; | |
| 2449 switch (e) { | |
| 2450 case TopToBottomWritingMode: | |
| 2451 m_value.valueID = CSSValueHorizontalTb; | |
| 2452 break; | |
| 2453 case RightToLeftWritingMode: | |
| 2454 m_value.valueID = CSSValueVerticalRl; | |
| 2455 break; | |
| 2456 case LeftToRightWritingMode: | |
| 2457 m_value.valueID = CSSValueVerticalLr; | |
| 2458 break; | |
| 2459 case BottomToTopWritingMode: | |
| 2460 m_value.valueID = CSSValueHorizontalBt; | |
| 2461 break; | |
| 2462 } | |
| 2463 } | |
| 2464 | |
| 2465 template<> inline CSSPrimitiveValue::operator WritingMode() const | |
| 2466 { | |
| 2467 ASSERT(isValueID()); | |
| 2468 switch (m_value.valueID) { | |
| 2469 case CSSValueHorizontalTb: | |
| 2470 return TopToBottomWritingMode; | |
| 2471 case CSSValueVerticalRl: | |
| 2472 return RightToLeftWritingMode; | |
| 2473 case CSSValueVerticalLr: | |
| 2474 return LeftToRightWritingMode; | |
| 2475 case CSSValueHorizontalBt: | |
| 2476 return BottomToTopWritingMode; | |
| 2477 default: | |
| 2478 break; | |
| 2479 } | |
| 2480 | |
| 2481 ASSERT_NOT_REACHED(); | |
| 2482 return TopToBottomWritingMode; | |
| 2483 } | |
| 2484 | |
| 2485 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextCombine e) | 2445 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(TextCombine e) |
| 2486 : CSSValue(PrimitiveClass) | 2446 : CSSValue(PrimitiveClass) |
| 2487 { | 2447 { |
| 2488 m_primitiveUnitType = CSS_VALUE_ID; | 2448 m_primitiveUnitType = CSS_VALUE_ID; |
| 2489 switch (e) { | 2449 switch (e) { |
| 2490 case TextCombineNone: | 2450 case TextCombineNone: |
| 2491 m_value.valueID = CSSValueNone; | 2451 m_value.valueID = CSSValueNone; |
| 2492 break; | 2452 break; |
| 2493 case TextCombineHorizontal: | 2453 case TextCombineHorizontal: |
| 2494 m_value.valueID = CSSValueHorizontal; | 2454 m_value.valueID = CSSValueHorizontal; |
| (...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3860 default: | 3820 default: |
| 3861 break; | 3821 break; |
| 3862 } | 3822 } |
| 3863 ASSERT_NOT_REACHED(); | 3823 ASSERT_NOT_REACHED(); |
| 3864 return ScrollBehaviorInstant; | 3824 return ScrollBehaviorInstant; |
| 3865 } | 3825 } |
| 3866 | 3826 |
| 3867 } | 3827 } |
| 3868 | 3828 |
| 3869 #endif | 3829 #endif |
| OLD | NEW |