| 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 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2406 case CSSValueGeometricprecision: | 2406 case CSSValueGeometricprecision: |
| 2407 return GeometricPrecision; | 2407 return GeometricPrecision; |
| 2408 default: | 2408 default: |
| 2409 break; | 2409 break; |
| 2410 } | 2410 } |
| 2411 | 2411 |
| 2412 ASSERT_NOT_REACHED(); | 2412 ASSERT_NOT_REACHED(); |
| 2413 return AutoTextRendering; | 2413 return AutoTextRendering; |
| 2414 } | 2414 } |
| 2415 | 2415 |
| 2416 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ESpeak e) | |
| 2417 : CSSValue(PrimitiveClass) | |
| 2418 { | |
| 2419 m_primitiveUnitType = CSS_VALUE_ID; | |
| 2420 switch (e) { | |
| 2421 case SpeakNone: | |
| 2422 m_value.valueID = CSSValueNone; | |
| 2423 break; | |
| 2424 case SpeakNormal: | |
| 2425 m_value.valueID = CSSValueNormal; | |
| 2426 break; | |
| 2427 case SpeakSpellOut: | |
| 2428 m_value.valueID = CSSValueSpellOut; | |
| 2429 break; | |
| 2430 case SpeakDigits: | |
| 2431 m_value.valueID = CSSValueDigits; | |
| 2432 break; | |
| 2433 case SpeakLiteralPunctuation: | |
| 2434 m_value.valueID = CSSValueLiteralPunctuation; | |
| 2435 break; | |
| 2436 case SpeakNoPunctuation: | |
| 2437 m_value.valueID = CSSValueNoPunctuation; | |
| 2438 break; | |
| 2439 } | |
| 2440 } | |
| 2441 | |
| 2442 template<> inline CSSPrimitiveValue::operator Order() const | 2416 template<> inline CSSPrimitiveValue::operator Order() const |
| 2443 { | 2417 { |
| 2444 ASSERT(isValueID()); | 2418 ASSERT(isValueID()); |
| 2445 switch (m_value.valueID) { | 2419 switch (m_value.valueID) { |
| 2446 case CSSValueLogical: | 2420 case CSSValueLogical: |
| 2447 return LogicalOrder; | 2421 return LogicalOrder; |
| 2448 case CSSValueVisual: | 2422 case CSSValueVisual: |
| 2449 return VisualOrder; | 2423 return VisualOrder; |
| 2450 default: | 2424 default: |
| 2451 break; | 2425 break; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2462 switch (e) { | 2436 switch (e) { |
| 2463 case LogicalOrder: | 2437 case LogicalOrder: |
| 2464 m_value.valueID = CSSValueLogical; | 2438 m_value.valueID = CSSValueLogical; |
| 2465 break; | 2439 break; |
| 2466 case VisualOrder: | 2440 case VisualOrder: |
| 2467 m_value.valueID = CSSValueVisual; | 2441 m_value.valueID = CSSValueVisual; |
| 2468 break; | 2442 break; |
| 2469 } | 2443 } |
| 2470 } | 2444 } |
| 2471 | 2445 |
| 2472 template<> inline CSSPrimitiveValue::operator ESpeak() const | |
| 2473 { | |
| 2474 ASSERT(isValueID()); | |
| 2475 switch (m_value.valueID) { | |
| 2476 case CSSValueNone: | |
| 2477 return SpeakNone; | |
| 2478 case CSSValueNormal: | |
| 2479 return SpeakNormal; | |
| 2480 case CSSValueSpellOut: | |
| 2481 return SpeakSpellOut; | |
| 2482 case CSSValueDigits: | |
| 2483 return SpeakDigits; | |
| 2484 case CSSValueLiteralPunctuation: | |
| 2485 return SpeakLiteralPunctuation; | |
| 2486 case CSSValueNoPunctuation: | |
| 2487 return SpeakNoPunctuation; | |
| 2488 default: | |
| 2489 break; | |
| 2490 } | |
| 2491 | |
| 2492 ASSERT_NOT_REACHED(); | |
| 2493 return SpeakNormal; | |
| 2494 } | |
| 2495 | |
| 2496 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(blink::WebBlendMode blend
Mode) | 2446 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(blink::WebBlendMode blend
Mode) |
| 2497 : CSSValue(PrimitiveClass) | 2447 : CSSValue(PrimitiveClass) |
| 2498 { | 2448 { |
| 2499 m_primitiveUnitType = CSS_VALUE_ID; | 2449 m_primitiveUnitType = CSS_VALUE_ID; |
| 2500 switch (blendMode) { | 2450 switch (blendMode) { |
| 2501 case blink::WebBlendModeNormal: | 2451 case blink::WebBlendModeNormal: |
| 2502 m_value.valueID = CSSValueNormal; | 2452 m_value.valueID = CSSValueNormal; |
| 2503 break; | 2453 break; |
| 2504 case blink::WebBlendModeMultiply: | 2454 case blink::WebBlendModeMultiply: |
| 2505 m_value.valueID = CSSValueMultiply; | 2455 m_value.valueID = CSSValueMultiply; |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2991 default: | 2941 default: |
| 2992 break; | 2942 break; |
| 2993 } | 2943 } |
| 2994 ASSERT_NOT_REACHED(); | 2944 ASSERT_NOT_REACHED(); |
| 2995 return OverflowAlignmentTrue; | 2945 return OverflowAlignmentTrue; |
| 2996 } | 2946 } |
| 2997 | 2947 |
| 2998 } | 2948 } |
| 2999 | 2949 |
| 3000 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ | 2950 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ |
| OLD | NEW |