Changeset 205980 in webkit for trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
- Timestamp:
- Sep 15, 2016, 10:45:56 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h
r201498 r205980 615 615 case ImageControlsButtonPart: 616 616 m_value.valueID = CSSValueImageControlsButton; 617 break; 618 #endif 619 #if ENABLE(APPLE_PAY) 620 case ApplePayButtonPart: 621 m_value.valueID = CSSValueApplePayButton; 617 622 break; 618 623 #endif … … 5474 5479 #endif 5475 5480 5481 #if ENABLE(APPLE_PAY) 5482 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ApplePayButtonStyle e) 5483 : CSSValue(PrimitiveClass) 5484 { 5485 m_primitiveUnitType = CSS_VALUE_ID; 5486 switch (e) { 5487 case ApplePayButtonStyle::White: 5488 m_value.valueID = CSSValueWhite; 5489 break; 5490 case ApplePayButtonStyle::WhiteOutline: 5491 m_value.valueID = CSSValueWhiteOutline; 5492 break; 5493 case ApplePayButtonStyle::Black: 5494 m_value.valueID = CSSValueBlack; 5495 break; 5496 default: 5497 ASSERT_NOT_REACHED(); 5498 break; 5499 } 5500 } 5501 5502 template<> inline CSSPrimitiveValue::operator ApplePayButtonStyle() const 5503 { 5504 ASSERT(isValueID()); 5505 switch (m_value.valueID) { 5506 case CSSValueWhite: 5507 return ApplePayButtonStyle::White; 5508 case CSSValueWhiteOutline: 5509 return ApplePayButtonStyle::WhiteOutline; 5510 case CSSValueBlack: 5511 return ApplePayButtonStyle::Black; 5512 default: 5513 break; 5514 } 5515 ASSERT_NOT_REACHED(); 5516 return ApplePayButtonStyle::Black; 5517 } 5518 5519 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ApplePayButtonType e) 5520 : CSSValue(PrimitiveClass) 5521 { 5522 m_primitiveUnitType = CSS_VALUE_ID; 5523 switch (e) { 5524 case ApplePayButtonType::Plain: 5525 m_value.valueID = CSSValuePlain; 5526 break; 5527 case ApplePayButtonType::Buy: 5528 m_value.valueID = CSSValueBuy; 5529 break; 5530 case ApplePayButtonType::SetUp: 5531 m_value.valueID = CSSValueSetUp; 5532 break; 5533 case ApplePayButtonType::InStore: 5534 m_value.valueID = CSSValueInStore; 5535 break; 5536 default: 5537 ASSERT_NOT_REACHED(); 5538 break; 5539 } 5540 } 5541 5542 template<> inline CSSPrimitiveValue::operator ApplePayButtonType() const 5543 { 5544 ASSERT(isValueID()); 5545 switch (m_value.valueID) { 5546 case CSSValuePlain: 5547 return ApplePayButtonType::Plain; 5548 case CSSValueBuy: 5549 return ApplePayButtonType::Buy; 5550 case CSSValueSetUp: 5551 return ApplePayButtonType::SetUp; 5552 case CSSValueInStore: 5553 return ApplePayButtonType::InStore; 5554 default: 5555 break; 5556 } 5557 ASSERT_NOT_REACHED(); 5558 return ApplePayButtonType::Plain; 5559 } 5560 #endif 5561 5476 5562 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(FontVariantPosition position) 5477 5563 : CSSValue(PrimitiveClass)
Note:
See TracChangeset
for help on using the changeset viewer.