Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: trunk/Source/core/css/CSSPrimitiveValueMappings.h

Issue 195823006: Revert 169264 "Add plumbing for font-stretch" (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/Source/core/css/CSSFontValue.cpp ('k') | trunk/Source/core/css/CSSProperties.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3464 matching lines...) Expand 10 before | Expand all | Expand 10 after
3475 case CSSValue100: 3475 case CSSValue100:
3476 return FontWeight100; 3476 return FontWeight100;
3477 default: 3477 default:
3478 break; 3478 break;
3479 } 3479 }
3480 3480
3481 ASSERT_NOT_REACHED(); 3481 ASSERT_NOT_REACHED();
3482 return FontWeightNormal; 3482 return FontWeightNormal;
3483 } 3483 }
3484 3484
3485 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontStretch stretch)
3486 : CSSValue(PrimitiveClass)
3487 {
3488 fprintf(stderr, "CSSPrimitiveValue::CSSPrimitiveValue(FontStretch stretch)\n ");
3489 m_primitiveUnitType = CSS_VALUE_ID;
3490 switch (stretch) {
3491 case FontStretchUltraCondensed:
3492 m_value.valueID = CSSValueUltraCondensed;
3493 return;
3494 case FontStretchExtraCondensed:
3495 m_value.valueID = CSSValueExtraCondensed;
3496 return;
3497 case FontStretchCondensed:
3498 m_value.valueID = CSSValueCondensed;
3499 return;
3500 case FontStretchSemiCondensed:
3501 m_value.valueID = CSSValueSemiCondensed;
3502 return;
3503 case FontStretchNormal:
3504 m_value.valueID = CSSValueNormal;
3505 return;
3506 case FontStretchSemiExpanded:
3507 m_value.valueID = CSSValueSemiExpanded;
3508 return;
3509 case FontStretchExpanded:
3510 m_value.valueID = CSSValueExpanded;
3511 return;
3512 case FontStretchExtraExpanded:
3513 m_value.valueID = CSSValueExtraExpanded;
3514 return;
3515 case FontStretchUltraExpanded:
3516 m_value.valueID = CSSValueUltraExpanded;
3517 return;
3518 }
3519
3520 ASSERT_NOT_REACHED();
3521 m_value.valueID = CSSValueNormal;
3522 }
3523
3524 template<> inline CSSPrimitiveValue::operator FontStretch() const
3525 {
3526 fprintf(stderr, "CSSPrimitiveValue::operator FontStretch\n");
3527 ASSERT(isValueID());
3528 switch (m_value.valueID) {
3529 case CSSValueUltraCondensed:
3530 return FontStretchUltraCondensed;
3531 case CSSValueExtraCondensed:
3532 return FontStretchExtraCondensed;
3533 case CSSValueCondensed:
3534 return FontStretchCondensed;
3535 case CSSValueSemiCondensed:
3536 return FontStretchSemiCondensed;
3537 case CSSValueNormal:
3538 return FontStretchNormal;
3539 case CSSValueSemiExpanded:
3540 return FontStretchSemiExpanded;
3541 case CSSValueExpanded:
3542 return FontStretchExpanded;
3543 case CSSValueExtraExpanded:
3544 return FontStretchExtraExpanded;
3545 case CSSValueUltraExpanded:
3546 return FontStretchUltraExpanded;
3547 default:
3548 break;
3549 }
3550
3551 ASSERT_NOT_REACHED();
3552 return FontStretchNormal;
3553 }
3554
3555 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontItalic italic) 3485 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontItalic italic)
3556 : CSSValue(PrimitiveClass) 3486 : CSSValue(PrimitiveClass)
3557 { 3487 {
3558 m_primitiveUnitType = CSS_VALUE_ID; 3488 m_primitiveUnitType = CSS_VALUE_ID;
3559 switch (italic) { 3489 switch (italic) {
3560 case FontItalicOff: 3490 case FontItalicOff:
3561 m_value.valueID = CSSValueNormal; 3491 m_value.valueID = CSSValueNormal;
3562 return; 3492 return;
3563 case FontItalicOn: 3493 case FontItalicOn:
3564 m_value.valueID = CSSValueItalic; 3494 m_value.valueID = CSSValueItalic;
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
5019 default: 4949 default:
5020 break; 4950 break;
5021 } 4951 }
5022 ASSERT_NOT_REACHED(); 4952 ASSERT_NOT_REACHED();
5023 return ScrollBehaviorInstant; 4953 return ScrollBehaviorInstant;
5024 } 4954 }
5025 4955
5026 } 4956 }
5027 4957
5028 #endif 4958 #endif
OLDNEW
« no previous file with comments | « trunk/Source/core/css/CSSFontValue.cpp ('k') | trunk/Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698