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

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

Issue 14907011: Support 'paint-order' from SVG2. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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 4494 matching lines...) Expand 10 before | Expand all | Expand 10 after
4505 case CSSValueNone: 4505 case CSSValueNone:
4506 return VE_NONE; 4506 return VE_NONE;
4507 case CSSValueNonScalingStroke: 4507 case CSSValueNonScalingStroke:
4508 return VE_NON_SCALING_STROKE; 4508 return VE_NON_SCALING_STROKE;
4509 } 4509 }
4510 4510
4511 ASSERT_NOT_REACHED(); 4511 ASSERT_NOT_REACHED();
4512 return VE_NONE; 4512 return VE_NONE;
4513 } 4513 }
4514 4514
4515 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPaintOrder e)
4516 : CSSValue(PrimitiveClass)
4517 {
4518 m_primitiveUnitType = CSS_IDENT;
4519 switch (e) {
4520 case PO_NORMAL:
4521 m_value.ident = CSSValueNormal;
4522 break;
4523 case PO_FILL:
4524 m_value.ident = CSSValueFill;
4525 break;
4526 case PO_STROKE:
4527 m_value.ident = CSSValueStroke;
4528 break;
4529 case PO_MARKERS:
4530 m_value.ident = CSSValueMarkers;
4531 break;
4532 default:
4533 ASSERT_NOT_REACHED();
4534 m_value.ident = CSSValueNormal;
4535 break;
4536 }
4537 }
4538
4539 template<> inline CSSPrimitiveValue::operator EPaintOrder() const
4540 {
4541 switch (m_value.ident) {
4542 case CSSValueNormal:
4543 return PO_NORMAL;
4544 case CSSValueFill:
4545 return PO_FILL;
4546 case CSSValueStroke:
4547 return PO_STROKE;
4548 case CSSValueMarkers:
4549 return PO_MARKERS;
4550 }
4551
4552 ASSERT_NOT_REACHED();
4553 return PO_NORMAL;
4554 }
4555
4515 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMaskType e) 4556 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMaskType e)
4516 : CSSValue(PrimitiveClass) 4557 : CSSValue(PrimitiveClass)
4517 { 4558 {
4518 m_primitiveUnitType = CSS_IDENT; 4559 m_primitiveUnitType = CSS_IDENT;
4519 switch (e) { 4560 switch (e) {
4520 case MT_LUMINANCE: 4561 case MT_LUMINANCE:
4521 m_value.ident = CSSValueLuminance; 4562 m_value.ident = CSSValueLuminance;
4522 break; 4563 break;
4523 case MT_ALPHA: 4564 case MT_ALPHA:
4524 m_value.ident = CSSValueAlpha; 4565 m_value.ident = CSSValueAlpha;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
4586 4627
4587 ASSERT_NOT_REACHED(); 4628 ASSERT_NOT_REACHED();
4588 return OriginTopLeft; 4629 return OriginTopLeft;
4589 } 4630 }
4590 4631
4591 #endif // ENABLE(CSS_IMAGE_ORIENTATION) 4632 #endif // ENABLE(CSS_IMAGE_ORIENTATION)
4592 4633
4593 } 4634 }
4594 4635
4595 #endif 4636 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698