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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h

Issue 2508743002: Changed EWhiteSpace to an enum class and renamed its members to keywords (Closed)
Patch Set: Small mac fix Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp » ('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. 4 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
5 * (http://www.torchmobile.com/) 5 * (http://www.torchmobile.com/)
6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com> 6 * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
(...skipping 2565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 } 2576 }
2577 2577
2578 ASSERT_NOT_REACHED(); 2578 ASSERT_NOT_REACHED();
2579 return EVisibility::Visible; 2579 return EVisibility::Visible;
2580 } 2580 }
2581 2581
2582 template <> 2582 template <>
2583 inline CSSIdentifierValue::CSSIdentifierValue(EWhiteSpace e) 2583 inline CSSIdentifierValue::CSSIdentifierValue(EWhiteSpace e)
2584 : CSSValue(IdentifierClass) { 2584 : CSSValue(IdentifierClass) {
2585 switch (e) { 2585 switch (e) {
2586 case NORMAL: 2586 case EWhiteSpace::Normal:
2587 m_valueID = CSSValueNormal; 2587 m_valueID = CSSValueNormal;
2588 break; 2588 break;
2589 case PRE: 2589 case EWhiteSpace::Pre:
2590 m_valueID = CSSValuePre; 2590 m_valueID = CSSValuePre;
2591 break; 2591 break;
2592 case PRE_WRAP: 2592 case EWhiteSpace::PreWrap:
2593 m_valueID = CSSValuePreWrap; 2593 m_valueID = CSSValuePreWrap;
2594 break; 2594 break;
2595 case PRE_LINE: 2595 case EWhiteSpace::PreLine:
2596 m_valueID = CSSValuePreLine; 2596 m_valueID = CSSValuePreLine;
2597 break; 2597 break;
2598 case NOWRAP: 2598 case EWhiteSpace::Nowrap:
2599 m_valueID = CSSValueNowrap; 2599 m_valueID = CSSValueNowrap;
2600 break; 2600 break;
2601 case KHTML_NOWRAP: 2601 case EWhiteSpace::KhtmlNowrap:
2602 m_valueID = CSSValueWebkitNowrap; 2602 m_valueID = CSSValueWebkitNowrap;
2603 break; 2603 break;
2604 } 2604 }
2605 } 2605 }
2606 2606
2607 template <> 2607 template <>
2608 inline EWhiteSpace CSSIdentifierValue::convertTo() const { 2608 inline EWhiteSpace CSSIdentifierValue::convertTo() const {
2609 switch (m_valueID) { 2609 switch (m_valueID) {
2610 case CSSValueWebkitNowrap: 2610 case CSSValueWebkitNowrap:
2611 return KHTML_NOWRAP; 2611 return EWhiteSpace::KhtmlNowrap;
2612 case CSSValueNowrap: 2612 case CSSValueNowrap:
2613 return NOWRAP; 2613 return EWhiteSpace::Nowrap;
2614 case CSSValuePre: 2614 case CSSValuePre:
2615 return PRE; 2615 return EWhiteSpace::Pre;
2616 case CSSValuePreWrap: 2616 case CSSValuePreWrap:
2617 return PRE_WRAP; 2617 return EWhiteSpace::PreWrap;
2618 case CSSValuePreLine: 2618 case CSSValuePreLine:
2619 return PRE_LINE; 2619 return EWhiteSpace::PreLine;
2620 case CSSValueNormal: 2620 case CSSValueNormal:
2621 return NORMAL; 2621 return EWhiteSpace::Normal;
2622 default: 2622 default:
2623 break; 2623 break;
2624 } 2624 }
2625 2625
2626 ASSERT_NOT_REACHED(); 2626 ASSERT_NOT_REACHED();
2627 return NORMAL; 2627 return EWhiteSpace::Normal;
2628 } 2628 }
2629 2629
2630 template <> 2630 template <>
2631 inline CSSIdentifierValue::CSSIdentifierValue(EWordBreak e) 2631 inline CSSIdentifierValue::CSSIdentifierValue(EWordBreak e)
2632 : CSSValue(IdentifierClass) { 2632 : CSSValue(IdentifierClass) {
2633 switch (e) { 2633 switch (e) {
2634 case NormalWordBreak: 2634 case NormalWordBreak:
2635 m_valueID = CSSValueNormal; 2635 m_valueID = CSSValueNormal;
2636 break; 2636 break;
2637 case BreakAllWordBreak: 2637 case BreakAllWordBreak:
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after
4663 default: 4663 default:
4664 break; 4664 break;
4665 } 4665 }
4666 ASSERT_NOT_REACHED(); 4666 ASSERT_NOT_REACHED();
4667 return ContainsNone; 4667 return ContainsNone;
4668 } 4668 }
4669 4669
4670 } // namespace blink 4670 } // namespace blink
4671 4671
4672 #endif 4672 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698