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

Side by Side Diff: sky/engine/core/css/CSSPrimitiveValueMappings.h

Issue 760583004: Remove webkit-margin-collapse (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 { 1468 {
1469 ASSERT(isValueID()); 1469 ASSERT(isValueID());
1470 switch (m_value.valueID) { 1470 switch (m_value.valueID) {
1471 case CSSValueNone: 1471 case CSSValueNone:
1472 return NoneListStyle; 1472 return NoneListStyle;
1473 default: 1473 default:
1474 return static_cast<EListStyleType>(m_value.valueID - CSSValueDisc); 1474 return static_cast<EListStyleType>(m_value.valueID - CSSValueDisc);
1475 } 1475 }
1476 } 1476 }
1477 1477
1478 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMarginCollapse e)
1479 : CSSValue(PrimitiveClass)
1480 {
1481 m_primitiveUnitType = CSS_VALUE_ID;
1482 switch (e) {
1483 case MCOLLAPSE:
1484 m_value.valueID = CSSValueCollapse;
1485 break;
1486 case MSEPARATE:
1487 m_value.valueID = CSSValueSeparate;
1488 break;
1489 case MDISCARD:
1490 m_value.valueID = CSSValueDiscard;
1491 break;
1492 }
1493 }
1494
1495 template<> inline CSSPrimitiveValue::operator EMarginCollapse() const
1496 {
1497 ASSERT(isValueID());
1498 switch (m_value.valueID) {
1499 case CSSValueCollapse:
1500 return MCOLLAPSE;
1501 case CSSValueSeparate:
1502 return MSEPARATE;
1503 case CSSValueDiscard:
1504 return MDISCARD;
1505 default:
1506 break;
1507 }
1508
1509 ASSERT_NOT_REACHED();
1510 return MCOLLAPSE;
1511 }
1512
1513 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e) 1478 template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EOverflow e)
1514 : CSSValue(PrimitiveClass) 1479 : CSSValue(PrimitiveClass)
1515 { 1480 {
1516 m_primitiveUnitType = CSS_VALUE_ID; 1481 m_primitiveUnitType = CSS_VALUE_ID;
1517 switch (e) { 1482 switch (e) {
1518 case OVISIBLE: 1483 case OVISIBLE:
1519 m_value.valueID = CSSValueVisible; 1484 m_value.valueID = CSSValueVisible;
1520 break; 1485 break;
1521 case OHIDDEN: 1486 case OHIDDEN:
1522 m_value.valueID = CSSValueHidden; 1487 m_value.valueID = CSSValueHidden;
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after
3572 default: 3537 default:
3573 break; 3538 break;
3574 } 3539 }
3575 ASSERT_NOT_REACHED(); 3540 ASSERT_NOT_REACHED();
3576 return ScrollBehaviorInstant; 3541 return ScrollBehaviorInstant;
3577 } 3542 }
3578 3543
3579 } 3544 }
3580 3545
3581 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_ 3546 #endif // SKY_ENGINE_CORE_CSS_CSSPRIMITIVEVALUEMAPPINGS_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/CSSComputedStyleDeclaration.cpp ('k') | sky/engine/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698