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

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: Fix review issues and add paint-order for text too Created 7 years, 5 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 4454 matching lines...) Expand 10 before | Expand all | Expand 10 after
4465 case CSSValueNone: 4465 case CSSValueNone:
4466 return VE_NONE; 4466 return VE_NONE;
4467 case CSSValueNonScalingStroke: 4467 case CSSValueNonScalingStroke:
4468 return VE_NON_SCALING_STROKE; 4468 return VE_NON_SCALING_STROKE;
4469 } 4469 }
4470 4470
4471 ASSERT_NOT_REACHED(); 4471 ASSERT_NOT_REACHED();
4472 return VE_NONE; 4472 return VE_NONE;
4473 } 4473 }
4474 4474
4475 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPaintOrderType e)
4476 : CSSValue(PrimitiveClass)
4477 {
4478 m_primitiveUnitType = CSS_IDENT;
4479 switch (e) {
4480 case PT_FILL:
4481 m_value.ident = CSSValueFill;
4482 break;
4483 case PT_STROKE:
4484 m_value.ident = CSSValueStroke;
4485 break;
4486 case PT_MARKERS:
4487 m_value.ident = CSSValueMarkers;
4488 break;
4489 default:
4490 ASSERT_NOT_REACHED();
4491 m_value.ident = CSSValueFill;
4492 break;
4493 }
4494 }
4495
4496 template<> inline CSSPrimitiveValue::operator EPaintOrderType() const
4497 {
4498 switch (m_value.ident) {
4499 case CSSValueFill:
4500 return PT_FILL;
4501 case CSSValueStroke:
4502 return PT_STROKE;
4503 case CSSValueMarkers:
4504 return PT_MARKERS;
4505 }
4506
4507 ASSERT_NOT_REACHED();
4508 return PT_NONE;
4509 }
4510
4475 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMaskType e) 4511 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMaskType e)
4476 : CSSValue(PrimitiveClass) 4512 : CSSValue(PrimitiveClass)
4477 { 4513 {
4478 m_primitiveUnitType = CSS_IDENT; 4514 m_primitiveUnitType = CSS_IDENT;
4479 switch (e) { 4515 switch (e) {
4480 case MT_LUMINANCE: 4516 case MT_LUMINANCE:
4481 m_value.ident = CSSValueLuminance; 4517 m_value.ident = CSSValueLuminance;
4482 break; 4518 break;
4483 case MT_ALPHA: 4519 case MT_ALPHA:
4484 m_value.ident = CSSValueAlpha; 4520 m_value.ident = CSSValueAlpha;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
4522 return TouchActionAuto; 4558 return TouchActionAuto;
4523 } 4559 }
4524 4560
4525 ASSERT_NOT_REACHED(); 4561 ASSERT_NOT_REACHED();
4526 return TouchActionNone; 4562 return TouchActionNone;
4527 } 4563 }
4528 4564
4529 } 4565 }
4530 4566
4531 #endif 4567 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698