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

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

Issue 1766723004: style: Remame values in EOverflow and EVerticalAlign to CamelCase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enum-clash-EOverflowEVerticalAlign: rebase Created 4 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
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 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 1685
1686 ASSERT_NOT_REACHED(); 1686 ASSERT_NOT_REACHED();
1687 return MarginCollapseCollapse; 1687 return MarginCollapseCollapse;
1688 } 1688 }
1689 1689
1690 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e) 1690 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e)
1691 : CSSValue(PrimitiveClass) 1691 : CSSValue(PrimitiveClass)
1692 { 1692 {
1693 init(UnitType::ValueID); 1693 init(UnitType::ValueID);
1694 switch (e) { 1694 switch (e) {
1695 case OVISIBLE: 1695 case OverflowVisible:
1696 m_value.valueID = CSSValueVisible; 1696 m_value.valueID = CSSValueVisible;
1697 break; 1697 break;
1698 case OHIDDEN: 1698 case OverflowHidden:
1699 m_value.valueID = CSSValueHidden; 1699 m_value.valueID = CSSValueHidden;
1700 break; 1700 break;
1701 case OSCROLL: 1701 case OverflowScroll:
1702 m_value.valueID = CSSValueScroll; 1702 m_value.valueID = CSSValueScroll;
1703 break; 1703 break;
1704 case OAUTO: 1704 case OverflowAuto:
1705 m_value.valueID = CSSValueAuto; 1705 m_value.valueID = CSSValueAuto;
1706 break; 1706 break;
1707 case OOVERLAY: 1707 case OverflowOverlay:
1708 m_value.valueID = CSSValueOverlay; 1708 m_value.valueID = CSSValueOverlay;
1709 break; 1709 break;
1710 case OPAGEDX: 1710 case OverflowPagedX:
1711 m_value.valueID = CSSValueWebkitPagedX; 1711 m_value.valueID = CSSValueWebkitPagedX;
1712 break; 1712 break;
1713 case OPAGEDY: 1713 case OverflowPagedY:
1714 m_value.valueID = CSSValueWebkitPagedY; 1714 m_value.valueID = CSSValueWebkitPagedY;
1715 break; 1715 break;
1716 } 1716 }
1717 } 1717 }
1718 1718
1719 template<> inline EOverflow CSSPrimitiveValue::convertTo() const 1719 template<> inline EOverflow CSSPrimitiveValue::convertTo() const
1720 { 1720 {
1721 ASSERT(isValueID()); 1721 ASSERT(isValueID());
1722 switch (m_value.valueID) { 1722 switch (m_value.valueID) {
1723 case CSSValueVisible: 1723 case CSSValueVisible:
1724 return OVISIBLE; 1724 return OverflowVisible;
1725 case CSSValueHidden: 1725 case CSSValueHidden:
1726 return OHIDDEN; 1726 return OverflowHidden;
1727 case CSSValueScroll: 1727 case CSSValueScroll:
1728 return OSCROLL; 1728 return OverflowScroll;
1729 case CSSValueAuto: 1729 case CSSValueAuto:
1730 return OAUTO; 1730 return OverflowAuto;
1731 case CSSValueOverlay: 1731 case CSSValueOverlay:
1732 return OOVERLAY; 1732 return OverflowOverlay;
1733 case CSSValueWebkitPagedX: 1733 case CSSValueWebkitPagedX:
1734 return OPAGEDX; 1734 return OverflowPagedX;
1735 case CSSValueWebkitPagedY: 1735 case CSSValueWebkitPagedY:
1736 return OPAGEDY; 1736 return OverflowPagedY;
1737 default: 1737 default:
1738 break; 1738 break;
1739 } 1739 }
1740 1740
1741 ASSERT_NOT_REACHED(); 1741 ASSERT_NOT_REACHED();
1742 return OVISIBLE; 1742 return OverflowVisible;
1743 } 1743 }
1744 1744
1745 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBreak e) 1745 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBreak e)
1746 : CSSValue(PrimitiveClass) 1746 : CSSValue(PrimitiveClass)
1747 { 1747 {
1748 init(UnitType::ValueID); 1748 init(UnitType::ValueID);
1749 switch (e) { 1749 switch (e) {
1750 default: 1750 default:
1751 ASSERT_NOT_REACHED(); 1751 ASSERT_NOT_REACHED();
1752 case BreakAuto: 1752 case BreakAuto:
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 2395
2396 ASSERT_NOT_REACHED(); 2396 ASSERT_NOT_REACHED();
2397 return SELECT_TEXT; 2397 return SELECT_TEXT;
2398 } 2398 }
2399 2399
2400 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVerticalAlign a) 2400 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVerticalAlign a)
2401 : CSSValue(PrimitiveClass) 2401 : CSSValue(PrimitiveClass)
2402 { 2402 {
2403 init(UnitType::ValueID); 2403 init(UnitType::ValueID);
2404 switch (a) { 2404 switch (a) {
2405 case TOP: 2405 case VerticalAlignTop:
2406 m_value.valueID = CSSValueTop; 2406 m_value.valueID = CSSValueTop;
2407 break; 2407 break;
2408 case BOTTOM: 2408 case VerticalAlignBottom:
2409 m_value.valueID = CSSValueBottom; 2409 m_value.valueID = CSSValueBottom;
2410 break; 2410 break;
2411 case MIDDLE: 2411 case VerticalAlignMiddle:
2412 m_value.valueID = CSSValueMiddle; 2412 m_value.valueID = CSSValueMiddle;
2413 break; 2413 break;
2414 case BASELINE: 2414 case VerticalAlignBaseline:
2415 m_value.valueID = CSSValueBaseline; 2415 m_value.valueID = CSSValueBaseline;
2416 break; 2416 break;
2417 case TEXT_BOTTOM: 2417 case VerticalAlignTextBottom:
2418 m_value.valueID = CSSValueTextBottom; 2418 m_value.valueID = CSSValueTextBottom;
2419 break; 2419 break;
2420 case TEXT_TOP: 2420 case VerticalAlignTextTop:
2421 m_value.valueID = CSSValueTextTop; 2421 m_value.valueID = CSSValueTextTop;
2422 break; 2422 break;
2423 case SUB: 2423 case VerticalAlignSub:
2424 m_value.valueID = CSSValueSub; 2424 m_value.valueID = CSSValueSub;
2425 break; 2425 break;
2426 case SUPER: 2426 case VerticalAlignSuper:
2427 m_value.valueID = CSSValueSuper; 2427 m_value.valueID = CSSValueSuper;
2428 break; 2428 break;
2429 case BASELINE_MIDDLE: 2429 case VerticalAlignBaselineMiddle:
2430 m_value.valueID = CSSValueWebkitBaselineMiddle; 2430 m_value.valueID = CSSValueWebkitBaselineMiddle;
2431 break; 2431 break;
2432 case LENGTH: 2432 case VerticalAlignLength:
2433 m_value.valueID = CSSValueInvalid; 2433 m_value.valueID = CSSValueInvalid;
2434 } 2434 }
2435 } 2435 }
2436 2436
2437 template<> inline EVerticalAlign CSSPrimitiveValue::convertTo() const 2437 template<> inline EVerticalAlign CSSPrimitiveValue::convertTo() const
2438 { 2438 {
2439 ASSERT(isValueID()); 2439 ASSERT(isValueID());
2440 switch (m_value.valueID) { 2440 switch (m_value.valueID) {
2441 case CSSValueTop: 2441 case CSSValueTop:
2442 return TOP; 2442 return VerticalAlignTop;
2443 case CSSValueBottom: 2443 case CSSValueBottom:
2444 return BOTTOM; 2444 return VerticalAlignBottom;
2445 case CSSValueMiddle: 2445 case CSSValueMiddle:
2446 return MIDDLE; 2446 return VerticalAlignMiddle;
2447 case CSSValueBaseline: 2447 case CSSValueBaseline:
2448 return BASELINE; 2448 return VerticalAlignBaseline;
2449 case CSSValueTextBottom: 2449 case CSSValueTextBottom:
2450 return TEXT_BOTTOM; 2450 return VerticalAlignTextBottom;
2451 case CSSValueTextTop: 2451 case CSSValueTextTop:
2452 return TEXT_TOP; 2452 return VerticalAlignTextTop;
2453 case CSSValueSub: 2453 case CSSValueSub:
2454 return SUB; 2454 return VerticalAlignSub;
2455 case CSSValueSuper: 2455 case CSSValueSuper:
2456 return SUPER; 2456 return VerticalAlignSuper;
2457 case CSSValueWebkitBaselineMiddle: 2457 case CSSValueWebkitBaselineMiddle:
2458 return BASELINE_MIDDLE; 2458 return VerticalAlignBaselineMiddle;
2459 default: 2459 default:
2460 break; 2460 break;
2461 } 2461 }
2462 2462
2463 ASSERT_NOT_REACHED(); 2463 ASSERT_NOT_REACHED();
2464 return TOP; 2464 return VerticalAlignTop;
2465 } 2465 }
2466 2466
2467 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVisibility e) 2467 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EVisibility e)
2468 : CSSValue(PrimitiveClass) 2468 : CSSValue(PrimitiveClass)
2469 { 2469 {
2470 init(UnitType::ValueID); 2470 init(UnitType::ValueID);
2471 switch (e) { 2471 switch (e) {
2472 case VISIBLE: 2472 case VISIBLE:
2473 m_value.valueID = CSSValueVisible; 2473 m_value.valueID = CSSValueVisible;
2474 break; 2474 break;
(...skipping 2176 matching lines...) Expand 10 before | Expand all | Expand 10 after
4651 default: 4651 default:
4652 break; 4652 break;
4653 } 4653 }
4654 ASSERT_NOT_REACHED(); 4654 ASSERT_NOT_REACHED();
4655 return ContainsNone; 4655 return ContainsNone;
4656 } 4656 }
4657 4657
4658 } // namespace blink 4658 } // namespace blink
4659 4659
4660 #endif 4660 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698